@haven_ai/cli 0.1.17-alpha.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/README.md +73 -0
- package/dist/cli.cjs +721 -0
- package/dist/cli.cjs.map +1 -0
- package/dist/cli.d.cts +1 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +719 -0
- package/dist/cli.js.map +1 -0
- package/dist/index.cjs +681 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +90 -0
- package/dist/index.d.ts +90 -0
- package/dist/index.js +673 -0
- package/dist/index.js.map +1 -0
- package/package.json +36 -0
package/README.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# @haven_ai/cli
|
|
2
|
+
|
|
3
|
+
A terminal-native, scriptable companion to the Haven dashboard. Sign in as
|
|
4
|
+
yourself and read or manage your account from the shell — used **alongside** the
|
|
5
|
+
web app, not instead of it.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm i -g @haven_ai/cli # or run ad hoc: npx @haven_ai/cli <command>
|
|
11
|
+
haven --help
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
The CLI talks to the hosted Haven backend by default. Point it elsewhere with
|
|
15
|
+
`--api <url>` or `HAVEN_API_URL` (e.g. a local backend at
|
|
16
|
+
`http://localhost:3001`).
|
|
17
|
+
|
|
18
|
+
> **This version: login, read, and backend-only management.** On-chain,
|
|
19
|
+
> owner-signed actions (deploy, budgets, approvers, send) are signed in the
|
|
20
|
+
> dashboard — this CLI never holds your keys. See
|
|
21
|
+
> [`docs/research/haven-cli.md`](../../docs/research/haven-cli.md) for the full
|
|
22
|
+
> design and roadmap.
|
|
23
|
+
|
|
24
|
+
## Usage
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
# auth
|
|
28
|
+
haven login --email you@example.com # password via prompt or HAVEN_PASSWORD
|
|
29
|
+
haven whoami
|
|
30
|
+
haven logout
|
|
31
|
+
|
|
32
|
+
# read
|
|
33
|
+
haven wallets list
|
|
34
|
+
haven wallets balances --safe <id|address>
|
|
35
|
+
haven agents list
|
|
36
|
+
haven agents show <id>
|
|
37
|
+
haven budget show <agentId>
|
|
38
|
+
haven activity list [--safe <id>] [--agent <id>] [--direction in|out] [--limit <n>]
|
|
39
|
+
haven activity export [same filters] > activity.csv
|
|
40
|
+
haven activity export --format sie [--from <ISO>] [--to <ISO>] [--company <name>] > books.si
|
|
41
|
+
haven catalog list
|
|
42
|
+
haven contacts list
|
|
43
|
+
|
|
44
|
+
# manage (backend-only — no on-chain signing)
|
|
45
|
+
haven agents pause <id> | resume <id>
|
|
46
|
+
haven agents revoke <id> --yes # terminal; needs explicit --yes
|
|
47
|
+
haven agents rotate-key <id> # new API key, shown once
|
|
48
|
+
haven agents rename <id> <name>
|
|
49
|
+
haven wallets rename <id> <name>
|
|
50
|
+
haven contacts add <name> <address> | contacts remove <id>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Add `--json` to any read command for machine-readable output:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
haven agents list --json | jq '.[] | select(.status == "active") | .name'
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Config
|
|
60
|
+
|
|
61
|
+
- `--api <url>` or `HAVEN_API_URL` — backend URL (defaults to the hosted Haven
|
|
62
|
+
backend). The backend is pinned into the saved session at login.
|
|
63
|
+
- `HAVEN_EMAIL` / `HAVEN_PASSWORD` — non-interactive login (CI/scripts).
|
|
64
|
+
- Session is stored owner-only at `~/.haven/session.json`. Treat it like a
|
|
65
|
+
secret; `haven logout` removes it.
|
|
66
|
+
|
|
67
|
+
## Custody
|
|
68
|
+
|
|
69
|
+
The CLI authenticates as the user and talks to the same JWT API as the
|
|
70
|
+
dashboard. It can read everything and perform backend-only management; anything
|
|
71
|
+
that moves funds or changes on-chain authority is signed by your wallet/passkey
|
|
72
|
+
in the dashboard. Haven never holds your Safe owner key or any delegate key
|
|
73
|
+
through this tool.
|