To install the package globally do NOT just a npm i -g @octomind/octomind but instead
Copy
mkdir -p ~/.local/packagescd ~/.local/packagesnpm install @octomind/octomind@latest# either create an aliasalias octomind="node ~/.local/packages/node_modules/@octomind/octomind/dist/index.js"# or create a symlinksudo ln -s ~/.local/packages/node_modules/@octomind/octomind/dist/index.js /usr/local/bin/octomind
this will install the package to ~/.local/packages and create symlinks in /usr/local/bin or creates an alias.
This is necessary for the cli to work and avoid dependency conflicts, when installing the package globally.
Use the cli through npx e.g. npx @octomind/octomind -h
After installing the CLI, you need to initialize it by setting up your API key and optionally a test target ID. This configuration allows you to avoid passing these parameters for subsequent commands.
# Initialize with API keyoctomind init --api-key your-api-key-here# Initialize with API key and test target IDoctomind init --api-key your-api-key-here --test-target-id your-test-target-id# Force overwrite existing configurationoctomind init --force
Once initialized, you can use other CLI commands without having to specify your API key or test
target ID with each command.
On macOS and linux you can enable autocompletion by running the following command (works for bash, zsh & fish):
Copy
npx @octomind/octomind install-completion
You can disable autocompletion by running the following command:
Copy
npx @octomind/octomind uninstall-completion
Autocompletion will only work if you have installed the package globally and created a config file with npx @octomind/octomind init.
This way even entityIds like environmentIds or testCaseIds will be autocompleted.