Skip to main content
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

Usage / Installation

  1. To install the package globally do NOT just a npm i -g @octomind/octomind but 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/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.
  1. Use the cli through npx e.g. npx @octomind/octomind -h

Autocompletion

On macOS and linux you can enable autocompletion by running the following command (works for bash, zsh & fish):
npx @octomind/octomind install-completion
You can disable autocompletion by running the following command:
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.

octomind

Octomind cli tool. Version: 4.3.1. Additional documentation see https://octomind.dev/docs/api-reference/ Usage: octomind [options] [command]

Options

OptionDescriptionRequiredDefault
-V, --versionoutput the version numberNo

Setup

init

Initialize configuration by setting up API key. This will create a config file in ~/.config/octomind.json Usage: init [options]

Options

OptionDescriptionRequiredDefault
-t, --test-target-id <id>Test target IDYes
-k, --api-key <key>the api key for authenticationYes
-f, --forceForce overwrite existing configurationNo

switch-test-target

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]

Completion

install-completion

Install tab completion Usage: install-completion [options]

uninstall-completion

Uninstall tab completion Usage: uninstall-completion [options]

completion

Tab completion Usage: completion [options]

Environments

list-environments

List all environments Usage: list-environments [options]

Options

OptionDescriptionRequiredDefault
-j, --jsonOutput raw JSON responseNo
-t, --test-target-id [id]Test target ID, if not provided will use the test target id from the configNo

create-environment

Create a new environment Usage: create-environment [options]

Options

OptionDescriptionRequiredDefault
-j, --jsonOutput raw JSON responseNo
-n, --name <name>Environment nameYes
-d, --discovery-url <url>Discovery URLYes
-t, --test-target-id [id]Test target ID, if not provided will use the test target id from the configNo
--test-account-username [username]Test account usernameNo
--test-account-password [password]Test account passwordNo
--test-account-otp-initializer-key [key]Test account OTP initializer keyNo
--basic-auth-username [username]Basic auth usernameNo
--basic-auth-password [password]Basic auth passwordNo
--private-location-name [name]Private location nameNo

environment

Get an environment Usage: environment [options]

Options

OptionDescriptionRequiredDefault
-j, --jsonOutput raw JSON responseNo
-e, --environment-id <id>Environment IDYes
-t, --test-target-id [id]Test target ID, if not provided will use the test target id from the configNo

update-environment

Update an existing environment Usage: update-environment [options]

Options

OptionDescriptionRequiredDefault
-j, --jsonOutput raw JSON responseNo
-e, --environment-id <id>Environment IDYes
-t, --test-target-id [id]Test target ID, if not provided will use the test target id from the configNo
-n, --name [name]Environment nameNo
-d, --discovery-url [url]Discovery URLNo
--test-account-username [username]Test account usernameNo
--test-account-password [password]Test account passwordNo
--test-account-otp-initializer-key [key]Test account OTP initializer keyNo
--basic-auth-username [username]Basic auth usernameNo
--basic-auth-password [password]Basic auth passwordNo
--private-location-name [name]Private location nameNo

delete-environment

Delete an environment Usage: delete-environment [options]

Options

OptionDescriptionRequiredDefault
-j, --jsonOutput raw JSON responseNo
-e, --environment-id <id>Environment IDYes
-t, --test-target-id [id]Test target ID, if not provided will use the test target id from the configNo

Execute

debug

run test cases against local build Usage: debug [options]

Options

OptionDescriptionRequiredDefault
-j, --jsonOutput raw JSON responseNo
-u, --url <url>url the tests should run againstYes
-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 targetNo
-e, --environment-id [uuid]id of the environment you want to run against, if not provided will run all test cases against the default environmentNo
-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 configNo
--headlessif we should run headless without the UI of playwright and the browserNo
--persistif we should write playwright config and files to current directory, you can then run ‘npx playwright test’ to run them againNo
--grep [substring]filter test cases by substringNo
--bypass-proxybypass proxy when accessing the test targetNo
--browser [CHROMIUM, FIREFOX, SAFARI]Browser typeNoCHROMIUM
--breakpoint [DESKTOP, MOBILE, TABLET]BreakpointNoDESKTOP
--run-status [ON, OFF]only run test cases that are either ON or OFFNo

execute

Execute test cases to create a test report Usage: execute [options]

Options

OptionDescriptionRequiredDefault
-j, --jsonOutput raw JSON responseNo
-u, --url <url>URL to testYes
-t, --test-target-id [id]Test target ID, if not provided will use the test target id from the configNo
-e, --environment-name [name]Environment nameNodefault
-d, --description [text]Test descriptionNo
-g, --tags [tags]Comma separated list of tagsNo
-v, --variables-to-overwrite [variables]JSON object of variables to overwriteNo
-b, --browser [type]Browser type [CHROMIUM, FIREFOX, SAFARI]NoCHROMIUM
-r, --breakpoint [name]Breakpoint [DESKTOP, MOBILE, TABLET]NoDESKTOP

execute-local

Execute local YAML test cases Usage: execute-local [options]

Options

OptionDescriptionRequiredDefault
-j, --jsonOutput raw JSON responseNo
-u, --url <url>Url the tests should run againstYes
-p, --test-case-path [string]Path of the test case you want to run, if not provided will run all test cases in the test targetNo
-e, --environment-id [uuid]Id of the environment you want to run against, if not provided will run all test cases against the default environmentNo
-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 configNo
--headlessIf we should run headless without the UI of playwright and the browserNo
--bypass-proxyBypass proxy when accessing the test targetNo
--browser [CHROMIUM, FIREFOX, SAFARI]Browser typeNoCHROMIUM
--breakpoint [DESKTOP, MOBILE, TABLET]BreakpointNoDESKTOP

create-discovery

Create a new test case discovery Usage: create-discovery [options]

Options

OptionDescriptionRequiredDefault
-j, --jsonOutput raw JSON responseNo
-n, --name <name>Discovery nameYes
-p, --prompt <prompt>Discovery promptYes
-t, --test-target-id [id]Test target ID, if not provided will use the test target id from the configNo
-e, --entry-point-url-path [path]Entry point URL pathNo
--prerequisite-id [id]Prerequisite test case IDNo
--external-id [id]External identifierNo
--assigned-tag-ids [ids]Comma-separated list of tag IDsNo
--folder-id [id]Folder IDNo

batch-generation

Batch generation of test cases Usage: batch-generation [options]

Options

OptionDescriptionRequiredDefault
-j, --jsonOutput raw JSON responseNo
-p, --prompt <prompt>Batch generation promptYes
-u, --url <url>Start url for generationYes
-e, --environment-id <id>Environment IDYes
-d, --prerequisite-id <id>Prerequisite IDYes
-t, --test-target-id [id]Test target ID, if not provided will use the test target id from the configNo

Notifications

notifications

Get notifications for a test target Usage: notifications [options]

Options

OptionDescriptionRequiredDefault
-j, --jsonOutput raw JSON responseNo
-t, --test-target-id [id]Test target ID, if not provided will use the test target id from the configNo

Private Locations

register-location

Register a private location Usage: register-location [options]

Options

OptionDescriptionRequiredDefault
-j, --jsonOutput raw JSON responseNo
-n, --name <name>Location nameYes
-p, --password <password>Proxy passwordYes
-u, --username <user>Proxy userYes
-a, --address <address>Location addressYes

unregister-location

Unregister a private location Usage: unregister-location [options]

Options

OptionDescriptionRequiredDefault
-j, --jsonOutput raw JSON responseNo
-n, --name <name>Location nameYes

list-private-locations

List all private locations Usage: list-private-locations [options]

Options

OptionDescriptionRequiredDefault
-j, --jsonOutput raw JSON responseNo

start-private-location

Start a private location worker, see https://octomind.dev/docs/proxy/private-location Usage: start-private-location [options]

Options

OptionDescriptionRequiredDefault
-n, --name [name]Location nameNo
-u, --username [username]Proxy userNo
-p, --password [password]Proxy passwordNo
-l, --host-networkUse host network (default: false). If set you can use localhost directlyNofalse

stop-private-location

Stop a private location worker, see https://octomind.dev/docs/proxy/private-location Usage: stop-private-location [options]

Test Cases

delete-test-case

Delete a test case Usage: delete-test-case [options]

Options

OptionDescriptionRequiredDefault
-j, --jsonOutput raw JSON responseNo
-c, --test-case-id <id>Test case IDYes
-t, --test-target-id [id]Test target ID, if not provided will use the test target id from the configNo

code

Get code of a specific test case Usage: code [options]

Options

OptionDescriptionRequiredDefault
-j, --jsonOutput raw JSON responseNo
-c, --test-case-id <id>Test case IDYes
-u, --url <url>URL to execute the test case againstYes
-e, --environment-id [id]Environment IDNodefault
-t, --test-target-id [id]Test target ID, if not provided will use the test target id from the configNo

test-case

Get details of a specific test case Usage: test-case [options]

Options

OptionDescriptionRequiredDefault
-j, --jsonOutput raw JSON responseNo
-c, --test-case-id <id>Test case IDYes
-t, --test-target-id [id]Test target ID, if not provided will use the test target id from the configNo

list-test-cases

List all test cases Usage: list-test-cases [options]

Options

OptionDescriptionRequiredDefault
-j, --jsonOutput raw JSON responseNo
-t, --test-target-id [id]Test target ID, if not provided will use the test target id from the configNo

pull

Pull test cases from the test target Usage: pull [options]

Options

OptionDescriptionRequiredDefault
-j, --jsonOutput raw JSON responseNo
-t, --test-target-id [id]Test target ID, if not provided will use the test target id from the configNo

push

Push local YAML test cases to the test target Usage: push [options]

Options

OptionDescriptionRequiredDefault
-j, --jsonOutput raw JSON responseNo
-t, --test-target-id [id]Test target ID, if not provided will use the test target id from the configNo
-y, --yesSkip confirmation promptNo

create-test-case

Create a new test case Usage: create-test-case [options]

Options

OptionDescriptionRequiredDefault
-j, --jsonOutput raw JSON responseNo
-t, --test-target-id [id]Test target ID, if not provided will use the test target id from the configNo
-n, --name <string>The name of the test case you want to createYes
-d, --dependency-path [path]The path of to test case you want to use as dependencyNo

edit-test-case

Edit yaml test case Usage: edit-test-case [options] <file-path>

Options

OptionDescriptionRequiredDefault
-j, --jsonOutput raw JSON responseNo
-t, --test-target-id [id]Test target ID, if not provided will use the test target id from the configNo

Test Reports

test-report

Get test report details Usage: test-report [options]

Options

OptionDescriptionRequiredDefault
-j, --jsonOutput raw JSON responseNo
-r, --test-report-id <id>Test report IDYes
-t, --test-target-id [id]Test target ID, if not provided will use the test target id from the configNo

Test Targets

list-test-targets

List all test targets Usage: list-test-targets [options]

Options

OptionDescriptionRequiredDefault
-j, --jsonOutput raw JSON responseNo

Update

update

update your local cli version Usage: update [options]

Output Formats

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"
    }
  ]
}

Development

  1. Clone the repository
  2. Install dependencies:
pnpm install
The CLI is written in TypeScript and uses the following dependencies: To build from source:
pnpm run build