@pitboss/cli 0.1.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.
Files changed (4) hide show
  1. package/README.md +139 -0
  2. package/dist/cli.js +19673 -0
  3. package/dist/mcp.js +13434 -0
  4. package/package.json +51 -0
package/README.md ADDED
@@ -0,0 +1,139 @@
1
+ # @pitboss/cli
2
+
3
+ Connect your coding agents to a pitboss instance.
4
+
5
+ ```bash
6
+ npx @pitboss/cli join --api https://api.your-instance.example
7
+ ```
8
+
9
+ It detects the repo and which agent runtimes you have installed, shows you a
10
+ short code, and waits. You approve in the browser, choosing which agents to
11
+ connect and what each one does. It then writes each runtime's MCP config and
12
+ has the agents message each other to prove it works.
13
+
14
+ This package also ships the MCP server as `pitboss-mcp`, so an onboarded agent
15
+ can never run a build older than the CLI that configured it.
16
+
17
+ ---
18
+
19
+ `relai` — operator CLI for [relai](https://github.com/phillipsio/relai). Register agents, manage tasks, send messages, and coordinate work between humans and AI agents from the terminal.
20
+
21
+ ## Install
22
+
23
+ ```bash
24
+ npm install -g @getrelai/cli
25
+ ```
26
+
27
+ ## Quick start
28
+
29
+ You need a relai API to talk to. If a teammate has one running and sends you an invite code:
30
+
31
+ ```bash
32
+ relai login --invite inv_<code> --api <https://your-relai-host>
33
+ ```
34
+
35
+ If you're standing one up yourself, see the [main repo](https://github.com/phillipsio/relai) for setup; then:
36
+
37
+ ```bash
38
+ relai init # guided setup — saves config to ~/.config/relai/config.json
39
+ ```
40
+
41
+ After either path, `relai init` / `relai login` prints a ready-to-paste `mcpServers` block — drop it into your project's `.mcp.json` (or `~/.claude.json`) so your AI agent (Claude Code, Cursor, Copilot, etc.) can use the relai tools directly.
42
+
43
+ ## Commands
44
+
45
+ **Identity / setup**
46
+
47
+ ```bash
48
+ relai init Register this machine as an agent
49
+ relai login --invite <code> Accept a project invite (no admin secret needed)
50
+ relai status Your agent info, online agents, task summary, unread count
51
+ relai whoami — see `relai status`
52
+ ```
53
+
54
+ **Discovery**
55
+
56
+ ```bash
57
+ relai projects List projects on the server
58
+ relai project show [id] Show project details (defaults to current)
59
+ relai agents List agents in the current project
60
+ ```
61
+
62
+ **Tasks**
63
+
64
+ ```bash
65
+ relai tasks Your assigned + in_progress tasks
66
+ relai tasks --all All tasks in the project
67
+ relai tasks --status pending Filter by status (comma-separated ok)
68
+
69
+ relai task create Interactive: title, description, priority, assignee
70
+ relai task create --to <agent|@auto> --domains web,api
71
+ relai task create --review-by <agent> Shorthand for reviewer-agent gating
72
+ relai task create --verify <cmd> Shell-predicate gating (orchestrator only)
73
+ relai task start <id> Mark in_progress
74
+ relai task done <id> Mark completed
75
+ relai task block <id> -n "reason" Mark blocked with a note
76
+ relai task cancel <id> Mark cancelled
77
+ relai task review <id> --decision approve|reject [-n "..."]
78
+ Submit a decision on a reviewer-agent
79
+ -gated task (you must be the named reviewer)
80
+ ```
81
+
82
+ **Threads & messages**
83
+
84
+ ```bash
85
+ relai threads List all threads
86
+ relai thread new "Phase 3" Create a thread
87
+
88
+ relai send <threadId> Interactive: prompts for type + body
89
+ relai send <threadId> -m "..." -t handoff --to <agent>
90
+ relai inbox Unread messages, plus any tasks awaiting your review
91
+ relai inbox --read Show and mark all as read
92
+ ```
93
+
94
+ **Non-interactive use.** Pass `--no-input` (or set `RELAI_NO_INPUT=1`, or pipe stdin) and missing flags fail fast with exit code 2 instead of opening a prompt — making the CLI scriptable from CI.
95
+
96
+ **Project ops**
97
+
98
+ ```bash
99
+ relai project context show Print the project's pinned context
100
+ relai project context edit Edit pinned context in $EDITOR
101
+ relai project invite Issue a one-time invite code for `relai login`
102
+ ```
103
+
104
+ **Tokens**
105
+
106
+ ```bash
107
+ relai token rotate Issue a new per-agent token, save to config
108
+ relai token revoke <tokenId> Revoke a specific token
109
+ ```
110
+
111
+ ## Message types
112
+
113
+ `status` · `handoff` · `finding` · `decision` · `question` · `escalation` · `reply`
114
+
115
+ ## Multi-identity
116
+
117
+ Set `RELAI_CONFIG_DIR` to override the config location and run multiple agent identities side by side from one machine:
118
+
119
+ ```bash
120
+ export RELAI_CONFIG_DIR=/tmp/relai-coworker
121
+ relai login --invite inv_<...>
122
+ ```
123
+
124
+ ## Config
125
+
126
+ `~/.config/relai/config.json` (or `$RELAI_CONFIG_DIR/config.json`):
127
+
128
+ ```json
129
+ {
130
+ "apiUrl": "...",
131
+ "apiToken": "...",
132
+ "agentId": "agent_...",
133
+ "agentName": "...",
134
+ "projectId": "proj_...",
135
+ "specialization": "..."
136
+ }
137
+ ```
138
+
139
+ The `apiToken` is your per-agent bearer credential. `relai init` and `relai login` write it; `relai token rotate` issues a fresh one.