Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 28 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Octomind CLI

A command-line interface for interacting with the Octomind API. This CLI allows you to execute tests, retrieve test reports, and manage private locations.
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](https://octomind.dev/docs/api-reference/)

## Installation

Expand Down Expand Up @@ -93,7 +95,7 @@ Example JSON output:

### Register Private Location

Register a new private location worker.
Register a new private location worker. If you use the [private location worker](https://github.com/OctoMind-dev/private-location-worker) is will register itself on startup automatically.

```bash
tsx src/index.ts register-location \
Expand All @@ -115,7 +117,7 @@ Options:

### Unregister Private Location

Remove a registered private location worker.
Remove a registered private location worker. If you use the [private location worker](https://github.com/OctoMind-dev/private-location-worker) is will unregister itself when going offline automatically.

```bash
tsx src/index.ts unregister-location \
Expand Down Expand Up @@ -263,8 +265,29 @@ Optionen:
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:
```bash
tsx src/index.ts report --api-key key123 --test-target-id target123 --report-id report123 --json
```json
{
"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"
}
]
}
```

## Error Handling
Expand Down
7 changes: 6 additions & 1 deletion src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {

/* eslint no-console: ["error", { allow: ["warn", "error", "log"] }] */
/* eslint i18n-text/no-en: "off" */
/* eslint github/array-foreach: "off" */

const BASE_URL = "https://app.octomind.dev/api";

Expand Down Expand Up @@ -356,7 +357,11 @@ function createCommandWithCommonOptions(command: string) {

export function run() {
// CLI program setup
program.name("octomind-cli").description("Octomind CLI tool");
program
.name("octomind-cli")
.description(
"Octomind CLI tool. see https://octomind.dev/docs/api-reference/",
);

createCommandWithCommonOptions("execute")
.description("Execute test cases")
Expand Down