Answers.Body: <p>If the tool is command-line only, it probably shouldn't be an extension.</p>
  
  <p>If you need to bootstrap CiviCRM from the command line, and you can presume that the <a href="https://github.com/civicrm/cv" rel="nofollow noreferrer">cv</a> tool is in the path, and your tool is PHP-based, you can add the line:</p>
  
  
  
  <pre><code>eval(`cv php:boot`);
  </code></pre>
  
  <p>or just:</p>
  
  
  
  <pre><code>cv php:boot --level=classloader
  </code></pre>
  
  <p>This should give you the ability to call CiviCRM classes without creating an extension.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-03-09T09:29:51.087Z
Answers.Text: Thank you for your answer. It is command-line online, but I think exentions can also be used as a way to distribute the program (with upgrades) if i created a project in Github and manage to add that to the https://civicrm.org/extensions.
Answers.UserDisplayName: HanV
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-03-09T14:29:56.843Z
Answers.Text: This is an interesting use case!  I would discuss it with the extension team lead, Allen.  His username is @twomice on https://chat.civicrm.org, I would join the `~extensions` channel.
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-03-02T04:29:38.553Z
Answers.LastActivityDate: 2020-03-02T04:29:38.553Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Body: <p>I have made a standalone tool which i start with the command-line to see possible updates in the database to use the actual translations, and a program to compare an existing database with a new installation.
  Now you can use the sql-files in the localization-files only with a new installation and i use the new po-files to find possible updates after the normal upgrading in CiviCRM. The translated strings in the database are now never upgraded with new Transifex translations. 
  After making the programs i looked how extensions work, but this is not really an extension for users but may be something for the system administrator. 
  Are there other kinds of extensions?  </p>
  
Tags: <extension>
Title: Must my command-line tool be an extension?
ThreadText: # Must my command-line tool be an extension?
  
  (Asked by: username_0 on 2020-03-01)
  
  I have made a standalone tool which i start with the command-line to see possible updates in the database to use the actual translations, and a program to compare an existing database with a new installation.
  Now you can use the sql-files in the localization-files only with a new installation and i use the new po-files to find possible updates after the normal upgrading in CiviCRM. The translated strings in the database are now never upgraded with new Transifex translations.
  After making the programs i looked how extensions work, but this is not really an extension for users but may be something for the system administrator.
  Are there other kinds of extensions?
  
  **Tags:** extension
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-03-02. Score: 1
  
  If the tool is command-line only, it probably shouldn't be an extension.
  
  If you need to bootstrap CiviCRM from the command line, and you can presume that the [cv](https://github.com/civicrm/cv) tool is in the path, and your tool is PHP-based, you can add the line:
  
  ```
  eval(`cv php:boot`);
  
  ```
  
  or just:
  
  ```
  cv php:boot --level=classloader
  
  ```
  
  This should give you the ability to call CiviCRM classes without creating an extension.
  
  > **Comments:**
  > **username_0**: Thank you for your answer. It is command-line online, but I think exentions can also be used as a way to distribute the program (with upgrades) if i created a project in Github and manage to add that to the https://civicrm.org/extensions.  
  > **username_1**: This is an interesting use case!  I would discuss it with the extension team lead, Allen.  His username is @twomice on https://chat.civicrm.org, I would join the `~extensions` channel.  
  
  ---
  
  