A command-line interface for interacting with the Octomind API. This CLI allows you to execute tests, retrieve test reports, and manage private locations as well as environments. See API documentation
- To install the package globally do NOT just a
npm i -g @octomind/octomindbut instead
mkdir -p ~/.local/packages
cd ~/.local/packages
npm install @octomind/octomind@latest
# either create an alias
alias octomind="node ~/.local/packages/node_modules/@octomind/octomind/dist/index.js"
# or create a symlink
sudo ln -s ~/.local/packages/node_modules/@octomind/octomind/dist/index.js /usr/local/bin/octomindthis 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
On macOS and linux you can enable autocompletion by running the following command (works for bash, zsh & fish):
npx @octomind/octomind install-completionYou can disable autocompletion by running the following command:
npx @octomind/octomind uninstall-completionAutocompletion 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.
Octomind cli tool. Version: 4.1.0. Additional documentation see https://octomind.dev/docs/api-reference/
Usage: octomind [options] [command]
| Option | Description | Required | Default |
|---|---|---|---|
-V, --version |
output the version number | No |
Initialize configuration by setting up API key. This will create a config file in ~/.config/octomind.json
Usage: init [options]
| Option | Description | Required | Default |
|---|---|---|---|
-t, --test-target-id <id> |
Test target ID | Yes | |
-k, --api-key <key> |
the api key for authentication | Yes | |
-f, --force |
Force overwrite existing configuration | No |
Switch to a different test target. This will list all available test targets and update the config file in ~/.config/octomind.json
Usage: switch-test-target [options]
Install tab completion
Usage: install-completion [options]
Uninstall tab completion
Usage: uninstall-completion [options]
Tab completion
Usage: completion [options]
List all environments
Usage: list-environments [options]
| Option | Description | Required | Default |
|---|---|---|---|
-j, --json |
Output raw JSON response | No | |
-t, --test-target-id [id] |
Test target ID, if not provided will use the test target id from the config | No |
Create a new environment
Usage: create-environment [options]
| Option | Description | Required | Default |
|---|---|---|---|
-j, --json |
Output raw JSON response | No | |
-n, --name <name> |
Environment name | Yes | |
-d, --discovery-url <url> |
Discovery URL | Yes | |
-t, --test-target-id [id] |
Test target ID, if not provided will use the test target id from the config | No | |
--test-account-username [username] |
Test account username | No | |
--test-account-password [password] |
Test account password | No | |
--test-account-otp-initializer-key [key] |
Test account OTP initializer key | No | |
--basic-auth-username [username] |
Basic auth username | No | |
--basic-auth-password [password] |
Basic auth password | No | |
--private-location-name [name] |
Private location name | No |
Get an environment
Usage: environment [options]
| Option | Description | Required | Default |
|---|---|---|---|
-j, --json |
Output raw JSON response | No | |
-e, --environment-id <id> |
Environment ID | Yes | |
-t, --test-target-id [id] |
Test target ID, if not provided will use the test target id from the config | No |
Update an existing environment
Usage: update-environment [options]
| Option | Description | Required | Default |
|---|---|---|---|
-j, --json |
Output raw JSON response | No | |
-e, --environment-id <id> |
Environment ID | Yes | |
-t, --test-target-id [id] |
Test target ID, if not provided will use the test target id from the config | No | |
-n, --name [name] |
Environment name | No | |
-d, --discovery-url [url] |
Discovery URL | No | |
--test-account-username [username] |
Test account username | No | |
--test-account-password [password] |
Test account password | No | |
--test-account-otp-initializer-key [key] |
Test account OTP initializer key | No | |
--basic-auth-username [username] |
Basic auth username | No | |
--basic-auth-password [password] |
Basic auth password | No | |
--private-location-name [name] |
Private location name | No |
Delete an environment
Usage: delete-environment [options]
| Option | Description | Required | Default |
|---|---|---|---|
-j, --json |
Output raw JSON response | No | |
-e, --environment-id <id> |
Environment ID | Yes | |
-t, --test-target-id [id] |
Test target ID, if not provided will use the test target id from the config | No |
run test cases against local build
Usage: debug [options]
| Option | Description | Required | Default |
|---|---|---|---|
-j, --json |
Output raw JSON response | No | |
-u, --url <url> |
url the tests should run against | Yes | |
-c, --test-case-id [uuid] |
id of the test case you want to run, if not provided will run all test cases in the test target | No | |
-e, --environment-id [uuid] |
id of the environment you want to run against, if not provided will run all test cases against the default environment | No | |
-t, --test-target-id [uuid] |
id of the test target of the test case, if not provided will use the test target id from the config | No | |
--headless |
if we should run headless without the UI of playwright and the browser | No | |
--persist |
if we should write playwright config and files to current directory, you can then run 'npx playwright test' to run them again | No | |
--grep [substring] |
filter test cases by substring | No | |
--bypass-proxy |
bypass proxy when accessing the test target | No | |
--browser [CHROMIUM, FIREFOX, SAFARI] |
Browser type | No | CHROMIUM |
--breakpoint [DESKTOP, MOBILE, TABLET] |
Breakpoint | No | DESKTOP |
--run-status [ON, OFF] |
only run test cases that are either ON or OFF | No |
Execute test cases to create a test report
Usage: execute [options]
| Option | Description | Required | Default |
|---|---|---|---|
-j, --json |
Output raw JSON response | No | |
-u, --url <url> |
URL to test | Yes | |
-t, --test-target-id [id] |
Test target ID, if not provided will use the test target id from the config | No | |
-e, --environment-name [name] |
Environment name | No | default |
-d, --description [text] |
Test description | No | |
-g, --tags [tags] |
comma separated list of tags | No | |
-v, --variables-to-overwrite [variables] |
JSON object of variables to overwrite | No | |
-b, --browser [type] |
Browser type [CHROMIUM, FIREFOX, SAFARI] | No | CHROMIUM |
-r, --breakpoint [name] |
Breakpoint [DESKTOP, MOBILE, TABLET] | No | DESKTOP |
Execute local YAML test cases
Usage: execute-local [options]
| Option | Description | Required | Default |
|---|---|---|---|
-j, --json |
Output raw JSON response | No | |
-u, --url <url> |
url the tests should run against | Yes | |
-e, --environment-id [uuid] |
id of the environment you want to run against, if not provided will run all test cases against the default environment | No | |
-t, --test-target-id [uuid] |
id of the test target of the test case, if not provided will use the test target id from the config | No | |
--headless |
if we should run headless without the UI of playwright and the browser | No | |
--bypass-proxy |
bypass proxy when accessing the test target | No | |
--browser [CHROMIUM, FIREFOX, SAFARI] |
Browser type | No | CHROMIUM |
--breakpoint [DESKTOP, MOBILE, TABLET] |
Breakpoint | No | DESKTOP |
Create a new test case discovery
Usage: create-discovery [options]
| Option | Description | Required | Default |
|---|---|---|---|
-j, --json |
Output raw JSON response | No | |
-n, --name <name> |
Discovery name | Yes | |
-p, --prompt <prompt> |
Discovery prompt | Yes | |
-t, --test-target-id [id] |
Test target ID, if not provided will use the test target id from the config | No | |
-e, --entry-point-url-path [path] |
Entry point URL path | No | |
--prerequisite-id [id] |
Prerequisite test case ID | No | |
--external-id [id] |
External identifier | No | |
--assigned-tag-ids [ids] |
Comma-separated list of tag IDs | No | |
--folder-id [id] |
Folder ID | No |
Batch generation of test cases
Usage: batch-generation [options]
| Option | Description | Required | Default |
|---|---|---|---|
-j, --json |
Output raw JSON response | No | |
-p, --prompt <prompt> |
Batch generation prompt | Yes | |
-u, --url <url> |
Start url for generation | Yes | |
-e, --environment-id <id> |
Environment ID | Yes | |
-d, --prerequisite-id <id> |
Prerequisite ID | Yes | |
-t, --test-target-id [id] |
Test target ID, if not provided will use the test target id from the config | No |
Get notifications for a test target
Usage: notifications [options]
| Option | Description | Required | Default |
|---|---|---|---|
-j, --json |
Output raw JSON response | No | |
-t, --test-target-id [id] |
Test target ID, if not provided will use the test target id from the config | No |
Register a private location
Usage: register-location [options]
| Option | Description | Required | Default |
|---|---|---|---|
-j, --json |
Output raw JSON response | No | |
-n, --name <name> |
Location name | Yes | |
-p, --password <password> |
Proxy password | Yes | |
-u, --username <user> |
Proxy user | Yes | |
-a, --address <address> |
Location address | Yes |
Unregister a private location
Usage: unregister-location [options]
| Option | Description | Required | Default |
|---|---|---|---|
-j, --json |
Output raw JSON response | No | |
-n, --name <name> |
Location name | Yes |
List all private locations
Usage: list-private-locations [options]
| Option | Description | Required | Default |
|---|---|---|---|
-j, --json |
Output raw JSON response | No |
Start a private location worker, see https://octomind.dev/docs/proxy/private-location
Usage: start-private-location [options]
| Option | Description | Required | Default |
|---|---|---|---|
-n, --name [name] |
Location name | No | |
-u, --username [username] |
Proxy user | No | |
-p, --password [password] |
Proxy password | No | |
-l, --host-network |
Use host network (default: false). If set you can use localhost directly | No | false |
Stop a private location worker, see https://octomind.dev/docs/proxy/private-location
Usage: stop-private-location [options]
Delete a test case
Usage: delete-test-case [options]
| Option | Description | Required | Default |
|---|---|---|---|
-j, --json |
Output raw JSON response | No | |
-c, --test-case-id <id> |
Test case ID | Yes | |
-t, --test-target-id [id] |
Test target ID, if not provided will use the test target id from the config | No |
Get code of a specific test case
Usage: code [options]
| Option | Description | Required | Default |
|---|---|---|---|
-j, --json |
Output raw JSON response | No | |
-c, --test-case-id <id> |
Test case ID | Yes | |
-u, --url <url> |
URL to execute the test case against | Yes | |
-e, --environment-id [id] |
Environment ID | No | default |
-t, --test-target-id [id] |
Test target ID, if not provided will use the test target id from the config | No |
Get details of a specific test case
Usage: test-case [options]
| Option | Description | Required | Default |
|---|---|---|---|
-j, --json |
Output raw JSON response | No | |
-c, --test-case-id <id> |
Test case ID | Yes | |
-t, --test-target-id [id] |
Test target ID, if not provided will use the test target id from the config | No |
List all test cases
Usage: list-test-cases [options]
| Option | Description | Required | Default |
|---|---|---|---|
-j, --json |
Output raw JSON response | No | |
-t, --test-target-id [id] |
Test target ID, if not provided will use the test target id from the config | No |
Pull test cases from the test target
Usage: pull [options]
| Option | Description | Required | Default |
|---|---|---|---|
-j, --json |
Output raw JSON response | No | |
-t, --test-target-id [id] |
Test target ID, if not provided will use the test target id from the config | No |
Push local YAML test cases to the test target
Usage: push [options]
| Option | Description | Required | Default |
|---|---|---|---|
-j, --json |
Output raw JSON response | No | |
-t, --test-target-id [id] |
Test target ID, if not provided will use the test target id from the config | No |
Edit yaml test case
Usage: edit-test-case [options]
| Option | Description | Required | Default |
|---|---|---|---|
-j, --json |
Output raw JSON response | No | |
-t, --test-target-id [id] |
Test target ID, if not provided will use the test target id from the config | No | |
-f, --file-path <path> |
The path to the local yaml file you want to edit | Yes |
Get test report details
Usage: test-report [options]
| Option | Description | Required | Default |
|---|---|---|---|
-j, --json |
Output raw JSON response | No | |
-r, --test-report-id <id> |
Test report ID | Yes | |
-t, --test-target-id [id] |
Test target ID, if not provided will use the test target id from the config | No |
List all test targets
Usage: list-test-targets [options]
| Option | Description | Required | Default |
|---|---|---|---|
-j, --json |
Output raw JSON response | No |
update your local cli version
Usage: update [options]
By default, the CLI provides formatted text output for better readability. Add the --json flag to any command to get the raw JSON response instead. This is useful for scripting or when you need to process the output programmatically.
Example of JSON output:
{
"id": "826c15af-644b-4b28-89b4-f50ff34e46b7",
"testTargetId": "3435918b-3d29-4ebd-8c68-9a540532f45a",
"status": "PASSED",
"executionUrl": "https://example.com",
"testResults": [
{
"id": "abc-123-456",
"testTargetId": "3435918b-3d29-4ebd-8c68-9a540532f45a",
"testCaseId": "test-1",
"status": "PASSED",
"traceUrl": "https://storage.googleapis.com/automagically-traces/abc-123-trace.zip"
},
{
"id": "def-456-789",
"testTargetId": "3435918b-3d29-4ebd-8c68-9a540532f45a",
"testCaseId": "test-2",
"status": "PASSED",
"traceUrl": "https://storage.googleapis.com/automagically-traces/def-456-trace.zip"
}
]
}- Clone the repository
- Install dependencies:
pnpm installThe CLI is written in TypeScript and uses the following dependencies:
- commander: For command-line argument parsing
- openapi-fetch: For making openapi API calls
- openapi-typescript: For generating types from openapi spec
To build from source:
pnpm run build