github.com/criteo/command-launcher@v0.0.0-20230407142452-fb616f546e98/gh-pages/content/en/docs/overview/built-in-commands.md (about) 1 --- 2 title: "Built-in commands" 3 description: "Command launcher built-in commands" 4 lead: "Command launcher built-in commands" 5 date: 2022-10-02T18:41:12+02:00 6 lastmod: 2022-10-02T18:41:12+02:00 7 draft: false 8 images: [] 9 menu: 10 docs: 11 parent: "overview" 12 identifier: "built-in-commands-5a823aed27c15b41cdaff2e32e58944e" 13 weight: 220 14 toc: true 15 --- 16 17 ## config 18 19 Get or set command launcher configuration. 20 21 Use `cola config` to list all configurations. 22 23 Use `cola config [key]` to get one configuration. 24 25 Use `cola config [key] [value]` to set one configuration. 26 27 ## completion 28 29 setup auto completion. See help to get instructions: 30 31 ```shell 32 cola completion --help 33 ``` 34 35 ## login 36 37 Store your credentials securely and pass them to managed commands when requested and under your agreements. More details see: [Managed resources](../resources) 38 39 ## update 40 41 Check updates for command launcher and managed commands. 42 43 ## version 44 45 Return command launcher version information. 46 47 ## package 48 49 A collection of commands to manage installed packages and commands 50 51 ### package list 52 53 List installed packages and commands 54 55 ```shell 56 # list local installed packages 57 cola package list --local 58 59 # list local installed packages and commands 60 cola package list --local --include-cmd 61 62 # list dropin packages 63 cola package list --dropin 64 65 # list local dropin packages and commands 66 cola package list --dropin --include-cmd 67 68 # list remote packages 69 cola package list --remote 70 ``` 71 72 ### package install 73 74 Install a dropin package from a git repo or from a zip file 75 76 ```shell 77 # install a dropin package from git repository 78 cola package install --git https://github.com/criteo/command-launcher-package-example 79 80 # install a dropin package from zip file 81 cola package install --file https://github.com/criteo/command-launcher/raw/main/examples/remote-repo/command-launcher-demo-1.0.0.pkg 82 ``` 83 84 ### package delete 85 86 Remove a dropin package from the package name defined in manifest 87 88 ```shell 89 cola package delete command-launcher-example-package 90 ``` 91 92 ### package setup 93 94 Manually trigger the package [setup hook](../manifest/#__setup__) 95 96 ```shell 97 cola package setup command-launcher-example-package 98 ``` 99 100 ## remote 101 102 A collection of commands to manage extra remote registries. A registry is a URI that hosts multiple packages. The list of available packages of the registry is defined in its `/index.json` endpoint. 103 104 ### remote list 105 106 List remote registries. 107 108 ```shell 109 cola remote list 110 ``` 111 112 ### remote add 113 114 Add a new remote registry. Command launcher will synchronize from this remote registry once added. 115 116 ```shell 117 cola remote add myregistry https://raw.githubusercontent.com/criteo/command-launcher/main/examples/remote-repo 118 ``` 119 120 ### remote delete 121 122 Delete a remote registry by its name. 123 124 ```shell 125 cola delete myregistry 126 ``` 127 128 ## rename 129 130 ### rename 131 132 Rename a command into a different name 133 134 To avoid command conflicts, each command has a unique full name in form of `[name]@[group]@[package]@[repository]`, for group command and root level command, it's group is empty. For example: `hello@@my-package@dropin` is the full name of the command `hello` in `my-package` package, which can be found in the `dropin` repository. 135 136 Usually, such command is launched through: `cola [group] [name]`. You can rename the group and the name of the command to a different name, so that you can call it through: `cola [new group] [new name]` 137 138 To rename a command to a different name, use following commands: 139 140 ```shell 141 # To change the group name: 142 cola rename [group]@@[package]@[repository] [new group] 143 144 # To change the command name: 145 cola rename [name]@[group]@[package]@[repository] [new name] 146 ``` 147 148 For example, you can rename the `hello` command to `bonjour` using following rename command: 149 150 ```shell 151 cola rename hello@@my-package@dropin bonjour 152 153 # now call it from cola will trigger the original hello command 154 cola bonjour 155 ``` 156 157 ### rename --delete 158 159 To delete a renamed command name 160 161 ```shell 162 cola rename --delete [command full name] 163 ``` 164 165 Now you have to use its original name to call the command 166 167 ### rename --list 168 169 > available in 1.10.0+ 170 171 To list all renamed command 172 173 ```shell 174 cola rename --list 175 ```