From 8f2d84d57d4095247611b1d15e8211a36c422e1f Mon Sep 17 00:00:00 2001 From: Stefan Rinke Date: Sat, 22 Feb 2025 12:51:48 +0100 Subject: [PATCH 1/4] update readme --- README.md | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2af55c7..b28bdad 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,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 \ @@ -115,7 +115,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 \ @@ -263,8 +263,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 From 5bf0264f306bbf2ac2635916ae50293c9d28eb43 Mon Sep 17 00:00:00 2001 From: Stefan Rinke Date: Sat, 22 Feb 2025 12:54:11 +0100 Subject: [PATCH 2/4] - disable foreach --- src/cli.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cli.ts b/src/cli.ts index bd9e2e0..d2423e5 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -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"; From 13bcd23174e42a48737d752d214092985fa9de4e Mon Sep 17 00:00:00 2001 From: Stefan Rinke Date: Sun, 23 Feb 2025 12:55:30 +0100 Subject: [PATCH 3/4] add docs link --- README.md | 4 +++- src/cli.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b28bdad..d61e048 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/src/cli.ts b/src/cli.ts index d2423e5..2a7bd61 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -357,7 +357,7 @@ 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") From c968d7bc5d98befbe789006dab02968a19c2c550 Mon Sep 17 00:00:00 2001 From: Stefan Rinke Date: Sun, 23 Feb 2025 16:03:27 +0100 Subject: [PATCH 4/4] lint --- src/cli.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cli.ts b/src/cli.ts index 2a7bd61..d13fcca 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -357,7 +357,11 @@ function createCommandWithCommonOptions(command: string) { export function run() { // CLI program setup - program.name("octomind-cli").description("Octomind CLI tool. see https://octomind.dev/docs/api-reference/"); + program + .name("octomind-cli") + .description( + "Octomind CLI tool. see https://octomind.dev/docs/api-reference/", + ); createCommandWithCommonOptions("execute") .description("Execute test cases")