github.com/criteo/command-launcher@v0.0.0-20230407142452-fb616f546e98/gh-pages/content/en/docs/overview/dropin.md (about)

     1  ---
     2  title: "Dropin package"
     3  description: "The easiest way to integrate your own scripts/tools to command launcher"
     4  lead: "The easiest way to integrate your own scripts/tools to command launcher"
     5  date: 2022-10-02T19:29:47+02:00
     6  lastmod: 2022-10-02T19:29:47+02:00
     7  draft: false
     8  images: []
     9  menu:
    10    docs:
    11      parent: "overview"
    12      identifier: "dropin-affc160f6b7478c1050512a4037f5ca2"
    13  weight: 245
    14  toc: true
    15  ---
    16  
    17  ## What is dropin package? and why do I need it?
    18  
    19  A dropin package is a package that are not managed by the remote repository. It is only available on the developer's machine. It allows developers to integrate their own scripts/tools into command launcher to benefit the feature provided by the command launcher, for example, auto-complete, monitoring etc.
    20  
    21  For example, you probably already has lots of shell scripts to maintain your infrastructure. Writing auto-completion for all these scripts is time consuming and it is difficult to remember which script doing what, and what parameters they accept. By writing a simple `manifest.mf` file, you can let command launcher to manage these scripts for you with auto-complete, secret management, and monitoring.
    22  
    23  Dropin package is also a good way for you to develop and test your command launcher package, as it follows the same structure as a regular command launcher package.
    24  
    25  ## How to create a dropin package?
    26  
    27  1. identify the dropins folder: run the following command:
    28  
    29      ```shell
    30      cola config dropin_folder
    31      ```
    32  
    33      If the dropin folder returned by the command doesn't exist, create it.
    34  1. create a package folder in the dropin folder, let's say, a package named `my-first-package`. You can named it whatever you want.
    35  1. add a `manifest.mf` in the newly created package folder, follow [MANIFEST](../manifest) guide to define your command in the manifest file. Note: you can copy your scripts in the package folder and use `{{.PackageDir}}` to reference the package location in your manifest file.
    36  1. run `cola` any time to test your command
    37  
    38  ## How to share a dropin package with others?
    39  
    40  A dropin package is simply a directory with manifest.mf in it, the best way to share a dropin package is to push it to a git repository and ask for others to clone it in their own dropin folder.
    41  
    42  Starting from 1.7.0, you can use the built-in `install` command to install a dropin package hosted in a git repository or a zip file:
    43  
    44  ```shell
    45  cola package install --git https://github.com/criteo/command-launcher-package-example
    46  ```
    47  
    48  If you uploaded your package to an http server as a zip file, you can install it with `cola install --file`
    49  
    50  ```shell
    51  cola package install --file https://github.com/criteo/command-launcher/raw/main/examples/remote-repo/command-launcher-demo-1.0.0.pkg
    52  ```
    53  
    54  ## How to update dropin package?
    55  
    56  For now, the command launcher does not update the dropin folder automatically, it is up to developers themselve to keep these dropin package up-to-date.