@aiaiai-pt/martha-cli 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/README.md +127 -0
- package/dist/index.js +16825 -0
- package/package.json +56 -0
- package/skills/martha-cli/SKILL.md +907 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `@aiaiai-pt/martha-cli`. Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). This project adheres to semver — `0.x` releases may include breaking changes between minor versions.
|
|
4
|
+
|
|
5
|
+
## [0.2.0] — 2026-05-09
|
|
6
|
+
|
|
7
|
+
First public release on npm.
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
- Published as `@aiaiai-pt/martha-cli` on the public npm registry.
|
|
11
|
+
- `README.md` with install + quickstart.
|
|
12
|
+
- Agent skill reference (`skills/martha-cli/SKILL.md`) bundled inside the npm tarball so agent harnesses can pull it post-install.
|
|
13
|
+
- `prepack` script that builds `dist/` and copies the skill before publishing.
|
|
14
|
+
- Provenance attestation on publish via GitHub Actions OIDC.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
- Package name: `martha-cli` → `@aiaiai-pt/martha-cli`.
|
|
18
|
+
- Version bump to mark first published release (the unpublished `0.1.0` was dev-only).
|
|
19
|
+
|
|
20
|
+
### Notes
|
|
21
|
+
- This is a `0.x` release — CLI flags and JSON output may change between minor versions. Pin a version (`npx -y @aiaiai-pt/martha-cli@0.2.0`) when calling from CI or agent runtimes.
|
|
22
|
+
- Tracking issue: [#292](https://github.com/westeuropeco/martha/issues/292) (third-party + agent-runtime distribution plan).
|
package/README.md
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# martha-cli
|
|
2
|
+
|
|
3
|
+
Terminal-first client for the [Martha](https://martha.nomadriver.co) AI platform.
|
|
4
|
+
|
|
5
|
+
Manage agents, functions, workflows, tasks, documents, and more from your shell. Designed for both human developers and external agent harnesses (Claude Code, ork, CrewAI, Pydantic AI, etc.) — see [Agent integration](#agent-integration) below.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
### Run on demand (recommended)
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npx -y @aiaiai-pt/martha-cli@latest --help
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Pin a version when calling from CI or agent runtimes:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npx -y @aiaiai-pt/martha-cli@0.2.0 agents list --json
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Install globally
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm i -g @aiaiai-pt/martha-cli
|
|
25
|
+
martha --version
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Requires Node.js >= 22.
|
|
29
|
+
|
|
30
|
+
## Quickstart
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
# 1. Configure a profile (interactive wizard ships in 0.3.0; until then edit ~/.martha/config.yaml)
|
|
34
|
+
martha config show
|
|
35
|
+
|
|
36
|
+
# 2. Authenticate
|
|
37
|
+
martha auth login # browser flow (PKCE)
|
|
38
|
+
martha auth login --username u --password p # headless
|
|
39
|
+
export MARTHA_TOKEN=eyJhbGc... # bypass login (CI / one-off)
|
|
40
|
+
|
|
41
|
+
# 3. Run something
|
|
42
|
+
martha agents list
|
|
43
|
+
martha functions list --json | jq '.[].name'
|
|
44
|
+
martha chat my-agent "Summarise the latest task in tracker INGEST-42"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Full command reference: `martha --help` (or any subcommand `--help`).
|
|
48
|
+
|
|
49
|
+
## Configuration
|
|
50
|
+
|
|
51
|
+
Profiles live at `~/.martha/config.yaml`. Each profile defines:
|
|
52
|
+
|
|
53
|
+
```yaml
|
|
54
|
+
current_profile: default
|
|
55
|
+
profiles:
|
|
56
|
+
default:
|
|
57
|
+
api_url: https://martha.nomadriver.co
|
|
58
|
+
keycloak_url: https://auth.nomadriver.co
|
|
59
|
+
keycloak_realm: frank
|
|
60
|
+
auth_type: oidc
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Override per-command:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
martha --profile staging agents list
|
|
67
|
+
martha --api-url http://localhost:8080 status
|
|
68
|
+
MARTHA_PROFILE=cloud martha tasks list
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Auth precedence
|
|
72
|
+
|
|
73
|
+
1. `MARTHA_TOKEN` env var (raw JWT, bypasses everything)
|
|
74
|
+
2. `MARTHA_CLIENT_ID` + `MARTHA_CLIENT_SECRET` (client_credentials grant, auto-refresh)
|
|
75
|
+
3. Profile-stored token from prior `martha auth login`
|
|
76
|
+
4. Browser-based OIDC (interactive only)
|
|
77
|
+
|
|
78
|
+
## JSON output
|
|
79
|
+
|
|
80
|
+
Every command supports `--json` for machine-readable output. Use it when piping to `jq` or calling from scripts/agents:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
martha agents list --json | jq '.[] | {name, status}'
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Exit codes: `0` success · `1` generic error · `2` auth failure · `3` not found · `4` validation · `5` conflict (409).
|
|
87
|
+
|
|
88
|
+
## Agent integration
|
|
89
|
+
|
|
90
|
+
This package ships an agent-facing skill reference at `skills/martha-cli/SKILL.md` describing every command, JSON contract, and conceptual primitive (tenant, agent, function, task, etc.). Agent harnesses can pull it directly:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
# After global install
|
|
94
|
+
cat $(npm root -g)/@aiaiai-pt/martha-cli/skills/martha-cli/SKILL.md
|
|
95
|
+
|
|
96
|
+
# Or via npx (no install)
|
|
97
|
+
npx -y -p @aiaiai-pt/martha-cli@latest sh -c 'cat $(dirname $(which martha))/../lib/node_modules/@aiaiai-pt/martha-cli/skills/martha-cli/SKILL.md' 2>/dev/null
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
A first-class `martha skill` command lands in 0.3.0.
|
|
101
|
+
|
|
102
|
+
## Stability
|
|
103
|
+
|
|
104
|
+
`0.x` releases may change CLI flags or JSON output between minor versions. Pin a version in CI/agent contexts:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
npx -y @aiaiai-pt/martha-cli@0.2.0 ...
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
`1.0.0` will commit to a stable contract — see the [tracking issue](https://github.com/westeuropeco/martha/issues/292).
|
|
111
|
+
|
|
112
|
+
## Development
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
cd martha-cli
|
|
116
|
+
bun install
|
|
117
|
+
bun run dev -- agents list # run from source
|
|
118
|
+
bun run build # produce dist/index.js
|
|
119
|
+
bun run test:run # unit + integration tests
|
|
120
|
+
MARTHA_LIVE=1 bun run test:run tests/live/ # live tests against local Martha
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
The CLI lives in the [westeuropeco/martha](https://github.com/westeuropeco/martha) monorepo under `martha-cli/`. PRs welcome.
|
|
124
|
+
|
|
125
|
+
## License
|
|
126
|
+
|
|
127
|
+
MIT
|