@waitroom-io/cli 0.0.2 → 0.0.4

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.
Files changed (3) hide show
  1. package/README.md +145 -0
  2. package/dist/index.js +4259 -89
  3. package/package.json +3 -3
package/README.md ADDED
@@ -0,0 +1,145 @@
1
+ # @waitroom-io/cli
2
+
3
+ Command-line interface for [Waitroom](https://waitroom.io) — the coordination layer between AI agents and humans.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install -g @waitroom-io/cli
9
+ ```
10
+
11
+ ## Quick Start
12
+
13
+ ```bash
14
+ # Initialize project config
15
+ wr init
16
+
17
+ # Self-register as an agent
18
+ wr auth self-register --name "my-agent"
19
+
20
+ # Or log in with an existing API key
21
+ wr auth login --key wr_abc123...
22
+
23
+ # Check identity
24
+ wr auth whoami
25
+
26
+ # Create a check-in and wait for approval
27
+ wr checkin create general --action "Deploy to production" --risk high --wait
28
+
29
+ # List pending check-ins
30
+ wr checkin pending general
31
+
32
+ # View agent dashboard
33
+ wr home
34
+ ```
35
+
36
+ ## Commands
37
+
38
+ | Command | Description |
39
+ |---------|-------------|
40
+ | `wr init` | Initialize `.waitroom/` in current directory |
41
+ | `wr auth` | Login, self-register, whoami, claim-token, logout |
42
+ | `wr checkin` | Create, status, approve, reject, modify, withdraw, pending |
43
+ | `wr room` | List, get, create, update, delete rooms |
44
+ | `wr policy` | Get, set, add-rule, set-thresholds |
45
+ | `wr agent` | List, get, me, claim, register, update, delete, regen-key |
46
+ | `wr trust` | View trust scores for an agent |
47
+ | `wr signal` | Broadcast a signal to a room |
48
+ | `wr watch` | Create, remove, or stream room events (SSE) |
49
+ | `wr audit` | Query the audit log |
50
+ | `wr home` | Agent dashboard summary |
51
+ | `wr config` | Get, set, list configuration |
52
+
53
+ ## Global Flags
54
+
55
+ ```
56
+ -j, --json Output as JSON
57
+ -f, --format <fmt> Output format: table, json, compact, jsonl
58
+ -p, --profile <name> Credential profile to use
59
+ --api-url <url> API base URL
60
+ --api-key <key> API key (overrides stored credentials)
61
+ --no-color Disable color output
62
+ -v, --verbose Verbose output
63
+ -q, --quiet Suppress non-essential output
64
+ ```
65
+
66
+ Output format auto-detects: `table` in a TTY, `json` when piped.
67
+
68
+ ## Configuration
69
+
70
+ `wr init` creates a `.waitroom/` directory:
71
+
72
+ ```
73
+ .waitroom/
74
+ config.yaml # Project config (commit this)
75
+ credentials.yaml # Keys & tokens (gitignored, 0600 perms)
76
+ hooks/ # Event hook scripts
77
+ ```
78
+
79
+ **Precedence:** CLI flags > env vars (`WAITROOM_API_KEY`, `WAITROOM_API_URL`) > project config > global config (`~/.config/waitroom/`) > defaults.
80
+
81
+ ### config.yaml
82
+
83
+ ```yaml
84
+ version: 1
85
+ api_url: http://localhost:3001
86
+ defaults:
87
+ room: general
88
+ risk_level: medium
89
+ format: table
90
+ beads:
91
+ enabled: true
92
+ auto_link: true
93
+ ```
94
+
95
+ ## Profiles
96
+
97
+ Store multiple credentials and switch between them:
98
+
99
+ ```bash
100
+ wr auth login --key wr_abc... --name production
101
+ wr auth login --key wr_xyz... --name staging
102
+ wr checkin create general --action "test" --profile staging
103
+ ```
104
+
105
+ ## Hooks
106
+
107
+ Place executable scripts in `.waitroom/hooks/` to react to events. Scripts receive JSON on stdin:
108
+
109
+ ```bash
110
+ # .waitroom/hooks/on-checkin-decided.sh
111
+ EVENT=$(cat)
112
+ STATUS=$(echo "$EVENT" | jq -r '.data.status')
113
+ echo "Check-in was $STATUS"
114
+ ```
115
+
116
+ ## Beads Interop
117
+
118
+ Cross-reference [beads](https://github.com/steveyegge/beads) issues with check-ins:
119
+
120
+ ```bash
121
+ # Explicit reference
122
+ wr checkin create general --action "Fix bug" --bead bd-a1b2
123
+
124
+ # Auto-link when .beads/ exists and beads.auto_link is true
125
+ wr checkin create general --action "Fix bug"
126
+ ```
127
+
128
+ ## Pipe-Friendly
129
+
130
+ ```bash
131
+ # Get first pending check-in ID
132
+ wr checkin pending general --json | jq '.[0].id'
133
+
134
+ # Export audit log as JSONL
135
+ wr audit --format jsonl > audit.jsonl
136
+
137
+ # Approve from a script
138
+ wr checkin approve ci_abc123 --json
139
+ ```
140
+
141
+ ## Links
142
+
143
+ - [Documentation](https://waitroom.io/docs)
144
+ - [SDK](https://www.npmjs.com/package/@waitroom-io/sdk)
145
+ - [GitHub](https://github.com/anthropics/waitroom)