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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
notes.txt
dist/
src/version.ts
node_modules/
.idea
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ See [API documentation](https://octomind.dev/docs/api-reference/)

## Usage

1. Install the package - `npm i -g @octomind/cli` and use it directly e.g. `@octomind/cli -h`
2. Use the cli through npx e.g. `npx @octomind/cli -h`
1. Install the package - `npm i -g @octomind/octomind` and use it directly e.g. `octomind -h`
2. Use the cli through npx e.g. `npx @octomind/octomind -h`

## Commands

Expand All @@ -18,7 +18,7 @@ See [API documentation](https://octomind.dev/docs/api-reference/)
Run test cases against a specified URL.

```bash
npx @octomind/cli execute \
octomind execute \
--api-key <key> \
--test-target-id <id> \
--url <url> \
Expand Down Expand Up @@ -46,7 +46,7 @@ Options:
Retrieve details about a specific test report.

```bash
npx @octomind/cli report \
octomind report \
--api-key <key> \
--test-target-id <id> \
--report-id <id> \
Expand Down Expand Up @@ -103,7 +103,7 @@ Example JSON output:
Register a new private location worker. If you use the [private location worker](https://github.com/OctoMind-dev/private-location-worker) it will register itself on startup automatically.

```bash
npx @octomind/cli register-location \
octomind register-location \
--api-key <key> \
--name <name> \
--proxypass <password> \
Expand All @@ -125,7 +125,7 @@ Options:
Remove a registered private location worker. If you use the [private location worker](https://github.com/OctoMind-dev/private-location-worker) it will unregister itself when going offline automatically.

```bash
npx @octomind/cli unregister-location \
octomind unregister-location \
--api-key <key> \
--name <name> \
[--json]
Expand All @@ -141,7 +141,7 @@ Options:
List all registered private locations.

```bash
npx @octomind/cli list-private-locations \
octomind list-private-locations \
--api-key <key> \
[--json]
```
Expand All @@ -166,7 +166,7 @@ Private Locations:
List all available environments.

```bash
npx @octomind/cli list-environments \
octomind list-environments \
--api-key <key> \
--test-target-id <id> \
[--json]
Expand All @@ -182,7 +182,7 @@ Options:
Create a new environment for a test target.

```bash
npx @octomind/cli create-environment \
octomind create-environment \
--api-key <key> \
--test-target-id <id> \
--name <name> \
Expand Down Expand Up @@ -216,7 +216,7 @@ Options:
Update an existing environment.

```bash
npx @octomind/cli update-environment \
octomind update-environment \
--api-key <key> \
--test-target-id <id> \
--environment-id <id> \
Expand Down Expand Up @@ -252,7 +252,7 @@ Options:
Delete an existing environment.

```bash
npx @octomind/cli delete-environment \
octomind delete-environment \
--api-key <key> \
--test-target-id <id> \
--environment-id <id> \
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"name": "@octomind/cli",
"version": "1.0.2",
"name": "@octomind/octomind",
"version": "1.0.4",
"description": "a command line client for octomind apis",
"main": "./dist/index.js",
"packageManager": "pnpm@9.15.6+sha512.139cab068fdf0b751268179ac5f909b5be72afb4a75c513d1905d151befc8977b593d3cf8671ed83d4d6637c5c94b98ffbce108125de4a5a27a31233601a99de",
"engines": {
"node": ">=20.0.0"
},
"bin": {
"cli": "./dist/index.js"
"octomind": "./dist/index.js"
},
"scripts": {
"lint": "eslint src/**/*.ts tests/**/*.ts --max-warnings=0",
"build": "tsc --project tsconfig.build.json",
"octomind-cli": "tsx src/cli.ts",
"test": "jest",
"test:watch": "jest --watch"
"lint": "npx genversion -des src/version.ts && eslint src/**/*.ts tests/**/*.ts --max-warnings=0",
"build": "npx genversion -des src/version.ts && tsc --project tsconfig.build.json",
"octomind": "tsx src/cli.ts",
"test": "npx genversion -des src/version.ts && jest",
"test:watch": "npx genversion -e src/version.ts && jest --watch"
},
"keywords": [],
"author": "",
Expand Down
1 change: 1 addition & 0 deletions src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export const executeTests = async (
},
environmentName: options.environment,
tags: options.tags,
variablesToOverwrite: options.variablesToOverwrite,
};

const response = await apiCall<TestReportResponse>(
Expand Down
6 changes: 4 additions & 2 deletions src/cli.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { program, Option, Command } from "commander";
import { version } from "./version";
import {
createEnvironment,
deleteEnvironment,
Expand Down Expand Up @@ -32,8 +33,9 @@ export const buildCmd = (): Command => {
program
.name("octomind-cli")
.description(
"Octomind CLI tool. see https://octomind.dev/docs/api-reference/",
);
`Octomind CLI tool. Version: ${version}. see https://octomind.dev/docs/api-reference/`,
)
.version(version);

createCommandWithCommonOptions("execute")
.description("Execute test cases")
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"rootDir": ".",
"strict": true,
"noImplicitAny": true,
"esModuleInterop": true
"esModuleInterop": true,
"resolveJsonModule": true
},
"exclude": [
"node_modules",
Expand Down