Skip to content
This repository was archived by the owner on Jul 14, 2026. It is now read-only.
Merged
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ dist/
src/version.ts
node_modules/
.idea
octomind.config.json
81 changes: 48 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,50 +13,66 @@ See [API documentation](https://octomind.dev/docs/api-reference/)

## Commands

### Init

Initialize configuration by setting up your API key and optionally a test target ID. This allows you to avoid passing these parameters for subsequent commands.

```bash
octomind init \
[--api-key <key>] \
[--test-target-id <id>] \
[--force]
```

Options:
- `-k, --api-key`: Your Octomind API key (will prompt if not provided)
- `-t, --test-target-id`: Test target ID (optional)
- `-f, --force`: Force overwrite existing configuration

If you don't provide the API key via the command line option, the CLI will prompt you to enter it interactively. You can get your API key from https://octomind.dev/docs/run-tests/execution-curl#create-an-api-key.

### Execute Tests

Run test cases against a specified URL.

```bash
octomind execute \
--api-key <key> \
--test-target-id <id> \
--url <url> \
[--api-key <key>] \
[--test-target-id <id>] \
[--environment <name>] \
[--tags <list of tags>] \
[-v, --variables-to-overwrite <variables>] \
[--description <text>] \
[--tags <tags> ] \
[--json]
```

Options:
- `-k, --api-key` (required): Your Octomind API key
- `-t, --test-target-id` (required): Test target ID
- `-u, --url` (required): URL to test
- `-k, --api-key`: Your Octomind API key (optional if configured via `init`)
- `-t, --test-target-id`: Test target ID (optional if configured via `init`)
- `-e, --environment`: Environment name (default: "default")
- `-d, --description`: Test description
- `-g, --tags`: comma separated list of tags for tests to execute
- `-v, --variables-to-overwrite`: JSON object for variables to override for this run e.g. `{ "key": ["v1", "v2"]}`
- `-j, --json`: Output raw JSON response
- `-g, --tags <tags>`: comma separated list of tags

### Get Test Report

Retrieve details about a specific test report.

```bash
octomind report \
--api-key <key> \
--test-target-id <id> \
--report-id <id> \
[--api-key <key>] \
[--test-target-id <id>] \
[--json]
```

Options:
- `-k, --api-key` (required): Your Octomind API key
- `-t, --test-target-id` (required): Test target ID
- `-r, --report-id` (required): Test report ID
- `-k, --api-key`: Your Octomind API key (optional if configured via `init`)
- `-t, --test-target-id`: Test target ID (optional if configured via `init`)
- `-j, --json`: Output raw JSON response

Example text output:
Expand Down Expand Up @@ -104,20 +120,20 @@ Register a new private location worker. If you use the [private location worker]

```bash
octomind register-location \
--api-key <key> \
--name <name> \
--proxypass <password> \
--proxyuser <user> \
--address <address> \
[--api-key <key>] \
[--json]
```

Options:
- `-k, --api-key` (required): Your Octomind API key
- `-n, --name` (required): Location name
- `-p, --proxypass` (required): Proxy password
- `-u, --proxyuser` (required): Proxy user
- `-a, --address` (required): Location address (format: IP:PORT)
- `-k, --api-key`: Your Octomind API key (optional if configured via `init`)
- `-j, --json`: Output raw JSON response

### Unregister Private Location
Expand All @@ -126,14 +142,14 @@ Remove a registered private location worker. If you use the [private location wo

```bash
octomind unregister-location \
--api-key <key> \
--name <name> \
[--api-key <key>] \
[--json]
```

Options:
- `-k, --api-key` (required): Your Octomind API key
- `-n, --name` (required): Location name
- `-k, --api-key`: Your Octomind API key (optional if configured via `init`)
- `-j, --json`: Output raw JSON response

### List Private Locations
Expand All @@ -142,12 +158,12 @@ List all registered private locations.

```bash
octomind list-private-locations \
--api-key <key> \
[--api-key <key>] \
[--json]
```

Options:
- `-k, --api-key` (required): Your Octomind API key
- `-k, --api-key`: Your Octomind API key (optional if configured via `init`)
- `-j, --json`: Output raw JSON response

Example text output:
Expand All @@ -167,14 +183,14 @@ List all available environments.

```bash
octomind list-environments \
--api-key <key> \
--test-target-id <id> \
[--api-key <key>] \
[--test-target-id <id>] \
[--json]
```

Options:
- `-k, --api-key` (required): Your Octomind API key
- `-t, --test-target-id` (required): Test target ID
- `-k, --api-key`: Your Octomind API key (optional if configured via `init`)
- `-t, --test-target-id`: Test target ID (optional if configured via `init`)
- `-j, --json`: Output raw JSON response

### Create Environment
Expand All @@ -183,10 +199,10 @@ Create a new environment for a test target.

```bash
octomind create-environment \
--api-key <key> \
--test-target-id <id> \
--name <name> \
--discovery-url <url> \
[--api-key <key>] \
[--test-target-id <id>] \
[--test-account-username <username>] \
[--test-account-password <password>] \
[--test-account-otp-initializer-key <key>] \
Expand All @@ -198,10 +214,10 @@ octomind create-environment \
```

Options:
- `-k, --api-key` (required): Your Octomind API key
- `-t, --test-target-id` (required): Test target ID
- `-n, --name` (required): Environment name
- `-d, --discovery-url` (required): Discovery URL
- `-k, --api-key`: Your Octomind API key (optional if configured via `init`)
- `-t, --test-target-id`: Test target ID (optional if configured via `init`)
- `--test-account-username`: Test account username
- `--test-account-password`: Test account password
- `--test-account-otp-initializer-key`: OTP initializer key for test account
Expand All @@ -217,9 +233,9 @@ Update an existing environment.

```bash
octomind update-environment \
--api-key <key> \
--test-target-id <id> \
--environment-id <id> \
[--api-key <key>] \
[--test-target-id <id>] \
[--name <name>] \
[--discovery-url <url>] \
[--test-account-username <username>] \
Expand All @@ -233,9 +249,9 @@ octomind update-environment \
```

Options:
- `-k, --api-key` (required): Your Octomind API key
- `-t, --test-target-id` (required): Test target ID
- `-e, --environment-id` (required): Environment ID
- `-k, --api-key`: Your Octomind API key (optional if configured via `init`)
- `-t, --test-target-id`: Test target ID (optional if configured via `init`)
- `-n, --name`: New environment name
- `-d, --discovery-url`: New discovery URL
- `--test-account-username`: New test account username
Expand All @@ -253,16 +269,16 @@ Delete an existing environment.

```bash
octomind delete-environment \
--api-key <key> \
--test-target-id <id> \
--environment-id <id> \
[--api-key <key>] \
[--test-target-id <id>] \
[--json]
```

Options:
- `-k, --api-key` (required): Your Octomind API key
- `-t, --test-target-id` (required): Test target ID
- `-e, --environment-id` (required): Environment ID
- `-k, --api-key`: Your Octomind API key (optional if configured via `init`)
- `-t, --test-target-id`: Test target ID (optional if configured via `init`)
- `-j, --json`: Output raw JSON response

## Output Formats
Expand Down Expand Up @@ -305,7 +321,6 @@ pnpm install

The CLI is written in TypeScript and uses the following dependencies:
- `commander`: For command-line argument parsing
- `axios`: For making HTTP requests

To build from source:
```bash
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"lint": "npx genversion -des src/version.ts && eslint src/**/*.ts tests/**/*.ts --max-warnings=0",
"apigen": "openapi-typescript ./openapi.yaml --output src/api.ts",
"build": "npx genversion -des src/version.ts && pnpm apigen && tsc --project tsconfig.build.json",
"octomind": "tsx src/cli.ts",
"octomind": "tsx src/index.ts",
"test": "npx genversion -des src/version.ts && jest",
"test:watch": "npx genversion -e src/version.ts && jest --watch"
},
Expand Down Expand Up @@ -45,4 +45,4 @@
"tsx": "^4.19.3",
"typescript": "^5.0.4"
}
}
}
Loading