Answers.Body: <p><a href="https://github.com/civicrm/civicrm-buildkit" rel="nofollow">civicrm-buildkit</a> uses</p>
  
  <pre><code>drush cvapi extension.install
  </code></pre>
  
  <p>eg</p>
  
  <pre><code>drush -y -u admin cvapi extension.install key=org.civicrm.module.cividiscount debug=1
  </code></pre>
  
  <p>Using the Drush commands as Coleman says is probably easier (no <code>-u admin</code> at least), but adding this method for completeness.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-13T09:49:31.520Z
Answers.LastActivityDate: 2015-07-13T09:49:31.520Z
Answers.UserDisplayName: Chris Burgess
Answers.Body: <p>You can now use eg</p>
  
  <pre><code>cv ext:download ca.civicrm.logviewer
  </code></pre>
  
  <p>which would give an output of </p>
  
  <pre><code>Using extension feed "https://civicrm.org/extdir/ver=4.7.27|uf=Drupal|status=stable|ready=ready"
  
  Downloading extension "ca.civicrm.logviewer" (https://github.com/adixon/ca.civicrm.logviewer/archive/1.1.zip)
  </code></pre>
  
  <p>and which unzips and renames the extension correctly and enables it. Job done!</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-25T22:30:05.733Z
Answers.LastActivityDate: 2018-02-25T22:30:05.733Z
Answers.UserDisplayName: petednz - fuzion
Answers.Body: <p>The <a href="https://github.com/civicrm/cv" rel="nofollow noreferrer">cv cli tool</a> provides the following commands for working with extensions:</p>
  
  <pre><code>ext:disable             Disable an extension
  ext:download            Download and enable an extension
  ext:enable              Enable an extension
  ext:uninstall           Uninstall an extension and purge its data
  ext:upgrade-db          Apply DB upgrades for any extensions
  ext:list                List extensions (local and remote)
  </code></pre>
  
  <p>To see the full list of commands, type <code>cv</code> in your console.</p>
  
  <p>Or if you prefer <code>drush</code> (Drupal only):</p>
  
  <pre><code>civicrm-ext-disable    Disable a CiviCRM extension.                                                                                      
   (ced)                                                                                                                                   
  civicrm-ext-install    Install a CiviCRM extension.                                                                                      
   (cei)                                                                                                                                   
  civicrm-ext-list       List of CiviCRM extensions enabled.                                                                               
   (cel)                                                                                                                                   
  civicrm-ext-uninstall  Uninstall a CiviCRM extension.                                                                                    
   (ceui)
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-12T20:25:25.113Z
Answers.LastActivityDate: 2017-08-27T22:53:02.017Z
Answers.LastEditDate: 2017-08-27T22:53:02.017Z
Answers.UserDisplayName: Coleman
Body: <p>Is there a way to automatically install and enable CiviCRM extensions? Is it possible to do this via drush on a Drupal install for example? Or is use if the UI required?</p>
  
Tags: <extension>
Title: Way to automatically install extensions?
ThreadText: # Way to automatically install extensions?
  
  (Asked by: username_0 on 2015-07-12)
  
  Is there a way to automatically install and enable CiviCRM extensions? Is it possible to do this via drush on a Drupal install for example? Or is use if the UI required?
  
  **Tags:** extension
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_3 on 2015-07-12. Score: 11 | Accepted answer
  
  The cv cli tool provides the following commands for working with extensions:
  ext:disable             Disable an extension
  ext:download            Download and enable an extension
  ext:enable              Enable an extension
  ext:uninstall           Uninstall an extension and purge its data
  ext:upgrade-db          Apply DB upgrades for any extensions
  ext:list                List extensions (local and remote)
  
  To see the full list of commands, type cv in your console.
  Or if you prefer drush (Drupal only):
  civicrm-ext-disable    Disable a CiviCRM extension.                                                                                      
   (ced)                                                                                                                                   
  civicrm-ext-install    Install a CiviCRM extension.                                                                                      
   (cei)                                                                                                                                   
  civicrm-ext-list       List of CiviCRM extensions enabled.                                                                               
   (cel)                                                                                                                                   
  civicrm-ext-uninstall  Uninstall a CiviCRM extension.                                                                                    
   (ceui)
  
  
  ---
  
  ### Answer by username_1 on 2015-07-13. Score: 4
  
  civicrm-buildkit uses
  drush cvapi extension.install
  
  eg
  drush -y -u admin cvapi extension.install key=org.civicrm.module.cividiscount debug=1
  
  Using the Drush commands as username_3 says is probably easier (no -u admin at least), but adding this method for completeness.
  
  
  ---
  
  ### Answer by username_2 on 2018-02-25. Score: 0
  
  You can now use eg
  cv ext:download ca.civicrm.logviewer
  
  which would give an output of 
  Using extension feed "https://civicrm.org/extdir/ver=4.7.27|uf=Drupal|status=stable|ready=ready"
  
  Downloading extension "ca.civicrm.logviewer" (https://github.com/adixon/ca.civicrm.logviewer/archive/1.1.zip)
  
  and which unzips and renames the extension correctly and enables it. Job done!
  
  
  ---
  
  