crewboss 0.0.0-stage → 0.3.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/LICENSE +21 -0
- package/README.md +633 -2
- package/bin/crewboss.js +14 -0
- package/package.json +43 -4
- package/src/agent.js +179 -0
- package/src/candidates.js +66 -0
- package/src/cli.js +531 -0
- package/src/collect.js +26 -0
- package/src/config.js +384 -0
- package/src/due.js +10 -0
- package/src/errors.js +47 -0
- package/src/events.js +243 -0
- package/src/fsutil.js +37 -0
- package/src/init.js +174 -0
- package/src/label.js +4 -0
- package/src/launchd.js +243 -0
- package/src/lock.js +62 -0
- package/src/mcp.js +293 -0
- package/src/memory.js +81 -0
- package/src/mods.js +354 -0
- package/src/node-command.js +34 -0
- package/src/personas.js +154 -0
- package/src/plugin.js +43 -0
- package/src/presence.js +160 -0
- package/src/process.js +37 -0
- package/src/quota.js +34 -0
- package/src/routines.js +401 -0
- package/src/rundir.js +43 -0
- package/src/runners/agy.js +26 -0
- package/src/runners/claude.js +39 -0
- package/src/runners/codex.js +26 -0
- package/src/runners/index.js +186 -0
- package/src/runners/opencode.js +28 -0
- package/src/schedule.js +21 -0
- package/src/server.js +773 -0
- package/src/session.js +40 -0
- package/src/store.js +615 -0
- package/src/task-schedule.js +6 -0
- package/src/task-time.js +30 -0
- package/src/tasks.js +129 -0
- package/src/trackers/command.js +126 -0
- package/src/trackers/file.js +160 -0
- package/src/trackers/index.js +16 -0
- package/src/trackers/local.js +57 -0
- package/src/units.js +117 -0
- package/src/warnings.js +19 -0
package/README.md
CHANGED
|
@@ -1,3 +1,634 @@
|
|
|
1
|
-
#
|
|
1
|
+
# crewboss
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Run a crew of AI coding agents — Claude Code, Codex, opencode, agy — on the cheapest model that still has quota.
|
|
4
|
+
|
|
5
|
+
[](https://github.com/PabloTheBlink/crewboss/actions/workflows/ci.yml) [](https://www.npmjs.com/package/crewboss) [](#license)
|
|
6
|
+
|
|
7
|
+

|
|
8
|
+
|
|
9
|
+
- **Spend less:** Personas choose a model tier. crewboss tries candidates cheapest first, skips paid models unless you pass `--allow-paid`, skips models your quota plugin marks exhausted, and tries the next candidate if one fails at startup. Use the subscriptions you already pay for and mix in free models for small tasks.
|
|
10
|
+
- **Talk while agents work:** Agents send questions with `notify`; follow them with `events --follow` and reply with `say`, from the terminal or an MCP client.
|
|
11
|
+
- **Schedule routines:** Collect findings on a schedule and turn them into tasks in your own tracker.
|
|
12
|
+
- **Keep it local:** Run history, tasks, reports and memory live in one SQLite file. No account or server is required.
|
|
13
|
+
- **Plug in your tools:** Use different agent CLIs, trackers, quota checks, offices (UIs), and mods.
|
|
14
|
+
|
|
15
|
+
## Quick start
|
|
16
|
+
|
|
17
|
+
Requires [Node.js 22.13+ and an installed agent CLI](#requirements). In your project folder:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npx crewboss init
|
|
21
|
+
npx crewboss agent dev "Add a test for the login flow" --dry-run
|
|
22
|
+
npx crewboss agent dev "Add a test for the login flow"
|
|
23
|
+
npx crewboss events
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Contents
|
|
27
|
+
|
|
28
|
+
- [Plug anything](#plug-anything) · [Offices](#offices)
|
|
29
|
+
- [Requirements](#requirements) · [Install](#install) · [Manual setup](#manual-setup)
|
|
30
|
+
- [Agents](#agents) · [Talking to your agents](#talking-to-your-agents) · [MCP clients](#use-crewboss-from-claude-code-cursor-or-codex-mcp) · [Main sessions](#main-sessions-presence)
|
|
31
|
+
- [Routines](#routines) · [Tasks](#tasks) · [Memory](#memory)
|
|
32
|
+
- [Mods](#mods) · [API](#api-and-offices) · [Configuration](#configuration-reference) · [Plugins](#plugins)
|
|
33
|
+
- [Files crewboss writes](#files-crewboss-writes) · [Troubleshooting](#troubleshooting) · [Development](#development) · [Releasing](#releasing) · [License](#license)
|
|
34
|
+
|
|
35
|
+
## Plug anything
|
|
36
|
+
|
|
37
|
+
<picture>
|
|
38
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/plug-dark.svg">
|
|
39
|
+
<img src="docs/plug-light.svg" alt="crewboss connects to agent CLIs, task trackers, quota checks, clients, and offices and mods">
|
|
40
|
+
</picture>
|
|
41
|
+
|
|
42
|
+
| Plug point | Built-in options | Use it |
|
|
43
|
+
|---|---|---|
|
|
44
|
+
| [Agent CLIs](#agents) | Claude Code, Codex, opencode, agy | Set `"tiers": {"small": [{"tool": "claude", "model": "haiku"}], "medium": [], "large": []}` in `crewboss.json`. |
|
|
45
|
+
| [Task trackers](#tasks) | Local SQLite, files, any tracker through a command (Jira, Linear or your own) | Set `"tracker": {"type": "file", "dir": "reports"}`; see [command trackers](#tracker). |
|
|
46
|
+
| [Quota](#quota) | Any command that tells crewboss to skip a candidate | Set `"quota": {"command": ["tools/check_quota.sh"]}`. |
|
|
47
|
+
| [Clients](#talking-to-your-agents) | CLI, [MCP](#use-crewboss-from-claude-code-cursor-or-codex-mcp), [HTTP API](#api-and-offices) | Run `crewboss mcp` for an MCP client. |
|
|
48
|
+
| [Offices and mods](#mods) | [office-3d](#offices), your own UI, personas and routines from Git | Run `crewboss mod add github:PabloTheBlink/crewboss-office-3d`. |
|
|
49
|
+
|
|
50
|
+
## Offices
|
|
51
|
+
|
|
52
|
+
Offices are mods with a UI served by `crewboss serve`. The official office is [office-3d](https://github.com/PabloTheBlink/crewboss-office-3d):
|
|
53
|
+
|
|
54
|
+
<a href="https://github.com/PabloTheBlink/crewboss-office-3d"><img src="docs/offices/office-3d.png" alt="office-3d preview" width="480"></a>
|
|
55
|
+
|
|
56
|
+
Install it with `crewboss mod add github:PabloTheBlink/crewboss-office-3d`, set `"ui": "mod:office-3d"` in `crewboss.json`, then run `crewboss serve`. To build your own, serve a static UI that uses the [API](#api-and-offices) and package it as a [mod](#mods).
|
|
57
|
+
|
|
58
|
+
## Requirements
|
|
59
|
+
|
|
60
|
+
- **Node.js 22.13 or later.** Check with `node --version`.
|
|
61
|
+
- **At least one agent CLI**, installed and signed in: [Claude Code](https://docs.anthropic.com/en/docs/claude-code) (`claude`), [Codex](https://github.com/openai/codex) (`codex`), [agy](https://www.npmjs.com/package/agy) (`agy`) or [opencode](https://opencode.ai/docs/) (`opencode`). crewboss runs them for you; it does not replace them.
|
|
62
|
+
- **Linux (systemd) or macOS (launchd)**, only if you want crewboss to schedule routines for you (`crewboss routines install`). Anywhere else you can run routines by hand or from your own scheduler.
|
|
63
|
+
|
|
64
|
+
## Install
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
npm install -g crewboss
|
|
68
|
+
npx crewboss --help
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Manual setup
|
|
72
|
+
|
|
73
|
+
`crewboss init` detects installed agent CLIs, creates `crewboss.json` and `agents/dev.md`, and adds `.crewboss/` and `logs/crewboss/` to `.gitignore`. It reads the top-level `model` from `~/.codex/config.toml` for Codex and runs `opencode models` or `agy models` to find their listed models. It prefers an opencode model whose ID ends in `-free`; any other opencode model is marked `paid: true`. Subscription CLIs (Claude and Codex) precede agy and paid opencode candidates within each tier; a free opencode model may lead `small`. If a detected CLI has no discoverable model, it tells you to add one to `crewboss.json` by hand. Review the generated tiers for your pricing and plan. Use `--dir DIR` for another workspace, `--json` for structured output, or `--force` to replace an existing config and persona.
|
|
74
|
+
|
|
75
|
+
These steps use Claude Code. Replace the models with the ones your CLI offers.
|
|
76
|
+
|
|
77
|
+
### 1. Create a workspace
|
|
78
|
+
|
|
79
|
+
A workspace is a folder with a `crewboss.json` file. crewboss reads it from the current folder (or from `--config PATH`, or from `$CREWBOSS_CONFIG`), and every relative path in it is relative to that folder. Use the root of the repository you want agents to work on, or keep `crewboss.json` elsewhere and point `root` at that folder.
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
cd ~/my-project
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Create `crewboss.json` with the models crewboss may use, from cheapest to most expensive, in three sizes:
|
|
86
|
+
|
|
87
|
+
```json
|
|
88
|
+
{
|
|
89
|
+
"tiers": {
|
|
90
|
+
"small": [{"tool": "claude", "model": "haiku"}],
|
|
91
|
+
"medium": [{"tool": "claude", "model": "sonnet"}],
|
|
92
|
+
"large": [{"tool": "claude", "model": "opus", "paid": true}]
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Candidates marked `"paid": true` are only used when you pass `--allow-paid`.
|
|
98
|
+
|
|
99
|
+
### 2. Create a persona
|
|
100
|
+
|
|
101
|
+
A persona is who the agent is and how it works. Create `agents/dev.md`:
|
|
102
|
+
|
|
103
|
+
```markdown
|
|
104
|
+
---
|
|
105
|
+
name: dev
|
|
106
|
+
size: medium
|
|
107
|
+
dir: .
|
|
108
|
+
---
|
|
109
|
+
You are a careful developer. Make small, focused changes, run the existing tests,
|
|
110
|
+
and list the tests you ran in your final answer. Do not commit.
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
`size` picks the tier and `dir` is the folder the agent works in, relative to the workspace.
|
|
114
|
+
|
|
115
|
+
### 3. Run an agent
|
|
116
|
+
|
|
117
|
+
First see what crewboss would do, without launching anything:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
crewboss agent dev "Add a section about running the tests to the README" --dry-run
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
It prints the chosen model, the mode, the path of the full prompt and the command it would run. Then run it for real:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
crewboss agent dev "Add a section about running the tests to the README"
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
The agent works in **write mode** (unless the persona says `mode: read`): it can edit files in its `dir`. When it finishes, crewboss prints the path of its answer. Everything about the run is in `logs/crewboss/agents/dev/<date>/`: `prompt.txt`, `agent.log`, `answer.md` and `choice.json`.
|
|
130
|
+
|
|
131
|
+
### 4. Look at the results
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
crewboss serve
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Open the link it prints (it contains an access token) to see the run history, tasks, reports and memory in your browser. Stop it with Ctrl+C.
|
|
138
|
+
|
|
139
|
+
### 5. Keep crewboss's files out of git
|
|
140
|
+
|
|
141
|
+
crewboss writes its database, logs and (with the file tracker) reports inside the workspace. Add them to `.gitignore`:
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
.crewboss/
|
|
145
|
+
logs/
|
|
146
|
+
reports/
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## Agents
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
crewboss agent <persona> "<task>" [--size small|medium|large] [--mode read|write]
|
|
153
|
+
[--model tool:model[@effort]] [--dir DIR] [--allow-paid] [--dry-run] [--attachment FILE]
|
|
154
|
+
[--notify SESSION]
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
- `--size` overrides the persona's tier; `--mode` its mode; `--dir` its working folder.
|
|
158
|
+
- `--model claude:opus` (or `codex:gpt-5@high`) forces one candidate: no tier, no fallback.
|
|
159
|
+
- `--attachment FILE` gives the agent a file to read (its path is added to the prompt).
|
|
160
|
+
|
|
161
|
+
How the model is chosen: crewboss walks the tier in order, skips paid candidates (unless `--allow-paid`) and those your quota plugin rejects, and launches the first one left. Skips are shown before the choice; real runs write these lines to stderr:
|
|
162
|
+
|
|
163
|
+
```text
|
|
164
|
+
Skipped: codex:gpt-6-luna (quota limit exceeded: codex 5h window at 97%)
|
|
165
|
+
Skipped: claude:opus (paid; use --allow-paid)
|
|
166
|
+
Choice: agy:gemini-4-neon-high (tier: medium)
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
If the choice fails at startup (it exits with an error within 60 seconds, or its log mentions 429, quota, `model_not_found` or "Free usage limit"), the next candidate of the same tier is tried and reported as `Failed at startup: tool:model (reason) -> trying tool:model`. It never moves to another tier.
|
|
170
|
+
|
|
171
|
+
The prompt is: your `preamble` (if any), the persona, its skill files, the relevant memory notes, the [communication](#talking-to-your-agents) section, and the task.
|
|
172
|
+
|
|
173
|
+
Workspace personas take precedence over mod personas for unqualified names. Use `crewboss agent <mod>/<persona> "task"` to select a mod persona explicitly. If two mods provide the same persona name, use a qualified name. A mod persona's skills are relative to its mod folder; its `dir` remains relative to the workspace root.
|
|
174
|
+
|
|
175
|
+
**Persona files** (`<personas_dir>/<name>.md`, `agents/` by default) start with front matter:
|
|
176
|
+
|
|
177
|
+
| Key | Meaning |
|
|
178
|
+
|---|---|
|
|
179
|
+
| `name` | Lowercase name (letters, digits, `-` and `_`); use the file name. |
|
|
180
|
+
| `size` | `small`, `medium` or `large`. |
|
|
181
|
+
| `dir` | Working folder, relative to the workspace (default `.`). |
|
|
182
|
+
| `skills` | Optional list of Markdown files (relative to the workspace) added to the prompt. |
|
|
183
|
+
| `mode` | `write` (default: the agent may edit files) or `read` (Claude Code runs in plan mode and does not edit). |
|
|
184
|
+
| `allowed_tools` | Optional list of Claude Code tools to allow without asking, e.g. `[Read, Edit, "Bash(npm test:*)"]`. Passed as `--allowedTools` in both modes. |
|
|
185
|
+
| `disallowed_tools` | Optional list of Claude Code tools the agent may never use, e.g. `[Edit, Write, NotebookEdit]`. Passed as `--disallowedTools` in both modes. |
|
|
186
|
+
|
|
187
|
+
`allowed_tools` and `disallowed_tools` only apply to `claude`; the other CLIs ignore them and note it in `agent.log`.
|
|
188
|
+
|
|
189
|
+
A read-only reviewer (`agents/reviewer.md`): it reads and answers, never edits.
|
|
190
|
+
|
|
191
|
+
```markdown
|
|
192
|
+
---
|
|
193
|
+
name: reviewer
|
|
194
|
+
size: medium
|
|
195
|
+
mode: read
|
|
196
|
+
allowed_tools: [Read, Grep, Glob]
|
|
197
|
+
---
|
|
198
|
+
You review code. Report problems with file and line; do not change anything.
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
An agent that runs commands but does not edit files (`agents/tester.md`): write mode, so it can run the allowed commands without asking, with the editing tools taken away.
|
|
202
|
+
|
|
203
|
+
```markdown
|
|
204
|
+
---
|
|
205
|
+
name: tester
|
|
206
|
+
size: small
|
|
207
|
+
mode: write
|
|
208
|
+
allowed_tools: ["Bash(npm test:*)", "Bash(git status:*)", Read, Grep]
|
|
209
|
+
disallowed_tools: [Edit, Write, NotebookEdit]
|
|
210
|
+
---
|
|
211
|
+
You run the test suite and explain each failure. Never modify files.
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
## Talking to your agents
|
|
215
|
+
|
|
216
|
+
Agents are not black boxes: they can tell whoever launched them that they are stuck or have a question, and you can answer while they work. It is the same with every tool (`claude`, `codex`, `opencode`, `agy`) because it is plain terminal commands plus two environment variables crewboss sets for the agent's process, `CREWBOSS_RUN_ID` and `CREWBOSS_CONFIG` (so the commands find their run and the config from inside any repository).
|
|
217
|
+
|
|
218
|
+
| Command | Who | What |
|
|
219
|
+
|---|---|---|
|
|
220
|
+
| `crewboss notify [--kind blocked\|question\|note] "<message>"` | the agent | Tells you something. Fails with a clear message (exit 1) if there is no `CREWBOSS_RUN_ID` and no `--run <id>`. |
|
|
221
|
+
| `crewboss inbox [--json]` | the agent | Prints the messages you sent that it has not read yet and marks them read; prints nothing if there are none. |
|
|
222
|
+
| `crewboss events [--follow] [--since ID] [--run ID] [--all] [--limit N] [--json]` | you | Lists what the agents sent, one line per event: `#<id> <hh:mm:ss> run <id> <persona>@<repo> <kind>: <message>`. With `--follow` it keeps listening (polling every second, starting from now unless you pass `--since`) and stops cleanly on Ctrl+C, SIGTERM or a closed pipe. `--all` also shows your own messages; `--json` prints one JSON object per line. |
|
|
223
|
+
| `crewboss say <run id> "<message>"` | you | Sends a message to a running run (an error if it does not exist or has finished). |
|
|
224
|
+
|
|
225
|
+
crewboss also records `started` (persona, repository and task) when a run begins and `finished` (status, exit code, duration, path of `answer.md`) when it ends, for agents and routines alike, so you hear about every run even if the agent never calls `notify`. A dry run of an agent launches nothing and records nothing.
|
|
226
|
+
|
|
227
|
+
Every prompt gets a `# Communication` section (in the language of your `preamble`) that tells the agent to use `crewboss notify --kind blocked|question` when it is blocked or has a doubt that changes the result, to run `crewboss inbox` between important steps and always before finishing (and treat what arrives as your instructions), and not to report routine progress. With `--notify <session>` (or `$CREWBOSS_NOTIFY`, or, from a Claude Code session, its `uds:<socket>` address; see "Main sessions (presence)") and `claude`, the section also says the agent may write live to that Claude Code session with `SendMessage`, and `SendMessage` and `ListAgents` are added to `--allowedTools`.
|
|
228
|
+
|
|
229
|
+
Permissions: for `claude`, crewboss always adds `Bash(crewboss notify:*)` and `Bash(crewboss inbox:*)` to `--allowedTools`; a persona or routine that lists either in `disallowed_tools` is a configuration error (a bare `Bash` there only produces a note in `agent.log`). The other tools have no such list: `codex` in its sandbox, and the read-only modes of `agy` and `opencode`, may refuse to run the commands (they write the crewboss store), and crewboss notes it in `agent.log`; the prompt asks the agent to say so in its answer if they fail. `crewboss` must be on the agent's `PATH`.
|
|
230
|
+
|
|
231
|
+
**Recipe for a Claude Code session that launches agents.** Start the watcher once with the Monitor tool, so every new line is a notification:
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
crewboss --config <your crewboss.json> events --follow
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
Launch agents as usual (add `--notify <this session's name>` if you want them to be able to message you directly). When a line says an agent is blocked or has a question, answer it, and the agent picks the answer up at its next `crewboss inbox`:
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
crewboss --config <your crewboss.json> say <run id> "use the staging database"
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
The API exposes both event directions in run details and accepts messages while an agent is running.
|
|
244
|
+
|
|
245
|
+
## Use crewboss from Claude Code, Cursor or Codex (MCP)
|
|
246
|
+
|
|
247
|
+
Crewboss serves MCP over stdio, so an MCP client can start agents, inspect runs, exchange messages, and manage tasks and memory. Add it to Claude Code with an absolute config path:
|
|
248
|
+
|
|
249
|
+
```bash
|
|
250
|
+
claude mcp add crewboss -- crewboss --config /path/crewboss.json mcp
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
For clients that use an `mcpServers` configuration:
|
|
254
|
+
|
|
255
|
+
```json
|
|
256
|
+
{
|
|
257
|
+
"mcpServers": {
|
|
258
|
+
"crewboss": {
|
|
259
|
+
"command": "crewboss",
|
|
260
|
+
"args": ["--config", "/path/crewboss.json", "mcp"]
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
Tools: `agent_start`, `run_show`, `runs_list`, `events`, `say`, `projects_list`, `task_list`, `task_show`, `task_add`, `task_update`, `task_done`, `task_comment`, `memory_add`, `memory_list`, `memory_search`, `memory_remove`, `routines_list`, `routine_run`, and `personas_list`. List results use an `items` array in both the text and structured result. `agent_start` reserves a run ID before starting a detached agent process; use that ID with `run_show` and `events` to follow its progress. `routine_run` also starts a detached process and returns its PID. MCP sends only JSON-RPC messages to stdout; diagnostics go to stderr. The config is reloaded when its file changes, except that a changed workspace root requires a restart.
|
|
267
|
+
|
|
268
|
+
## Main sessions (presence)
|
|
269
|
+
|
|
270
|
+
A main session is a session that launches agents. Claude Code hooks can tell crewboss when one is active:
|
|
271
|
+
|
|
272
|
+
```bash
|
|
273
|
+
crewboss presence busy|idle|gone [--session <name>] [--label <text>] [--cwd <dir>]
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
- `busy` means a prompt was submitted, `idle` means the session stopped, and `gone` means it ended. A session expires after 15 minutes idle or 60 minutes busy without an update.
|
|
277
|
+
- The command is fast, silent and always exits 0 so hooks do not break the session. Errors go to `<logs_dir>/presence.log` (or a temp log when the config cannot be read). Inside a crewboss agent (`CREWBOSS_RUN_ID` set), it does nothing.
|
|
278
|
+
- Identity is `--session`, then `uds:<$CLAUDE_CODE_MESSAGING_SOCKET>`, then `claude-<first 8 characters of session_id>` from hook JSON on stdin. `crewboss agent` links its runs using `--notify`, `$CREWBOSS_NOTIFY`, or that same socket identity by default. A Claude Code agent can use `SendMessage` to the socket address; crewboss strips the launcher socket credentials from child environments.
|
|
279
|
+
- `--label` controls the display label. Otherwise derived identities use `<cwd folder>·<short id>`, and a named `--session` uses its name. `GET /api/presence` returns live sessions with their running agents and latest events.
|
|
280
|
+
|
|
281
|
+
Add hooks to your workspace's `.claude/settings.json` (crewboss does not edit it):
|
|
282
|
+
|
|
283
|
+
```json
|
|
284
|
+
{
|
|
285
|
+
"hooks": {
|
|
286
|
+
"UserPromptSubmit": [
|
|
287
|
+
{ "hooks": [{ "type": "command", "command": "crewboss --config /path/to/crewboss.json presence busy" }] }
|
|
288
|
+
],
|
|
289
|
+
"Stop": [
|
|
290
|
+
{ "hooks": [{ "type": "command", "command": "crewboss --config /path/to/crewboss.json presence idle" }] }
|
|
291
|
+
],
|
|
292
|
+
"SessionEnd": [
|
|
293
|
+
{ "hooks": [{ "type": "command", "command": "crewboss --config /path/to/crewboss.json presence gone" }] }
|
|
294
|
+
]
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
## Routines
|
|
300
|
+
|
|
301
|
+
A routine asks an agent to review something on a schedule and report back. Add it to `crewboss.json`:
|
|
302
|
+
|
|
303
|
+
```json
|
|
304
|
+
{
|
|
305
|
+
"tiers": { "small": [{"tool": "claude", "model": "haiku"}], "medium": [], "large": [] },
|
|
306
|
+
"routines": [
|
|
307
|
+
{
|
|
308
|
+
"name": "deps-audit",
|
|
309
|
+
"enabled": true,
|
|
310
|
+
"schedule": "Mon *-*-* 09:00:00",
|
|
311
|
+
"size": "small",
|
|
312
|
+
"prompt": "agents/routines/deps-audit.md",
|
|
313
|
+
"collect": "npm outdated --json || true",
|
|
314
|
+
"timeout_minutes": 20,
|
|
315
|
+
"project": "my-project",
|
|
316
|
+
"assignee": "me"
|
|
317
|
+
}
|
|
318
|
+
]
|
|
319
|
+
}
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
Then write the prompt, `agents/routines/deps-audit.md`. The agent's answer must end with a JSON block in this exact shape:
|
|
323
|
+
|
|
324
|
+
````markdown
|
|
325
|
+
Review the outdated dependencies in the collected data. Write a short Markdown summary,
|
|
326
|
+
then end with:
|
|
327
|
+
|
|
328
|
+
```json
|
|
329
|
+
{"status": "ok or issues",
|
|
330
|
+
"summary": "one line",
|
|
331
|
+
"findings": [{"severity": "high, medium or low", "title": "...", "evidence": "...", "proposal": "..."}],
|
|
332
|
+
"memory": [{"scope": "routine:deps-audit", "text": "something worth remembering next time"}]}
|
|
333
|
+
```
|
|
334
|
+
````
|
|
335
|
+
|
|
336
|
+
`memory` is optional, and may only use `routine:<name>` or `project:<project>` scopes.
|
|
337
|
+
|
|
338
|
+
```bash
|
|
339
|
+
crewboss routines list # every routine with its last run
|
|
340
|
+
crewboss routines run deps-audit --dry-run # runs collector and agent (read mode), prints the report, publishes nothing
|
|
341
|
+
crewboss routines run deps-audit # runs it and publishes the report
|
|
342
|
+
crewboss routines install # schedules every enabled routine (systemd or launchd)
|
|
343
|
+
crewboss routines uninstall # removes the schedules
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
What a run does:
|
|
347
|
+
|
|
348
|
+
1. Takes a lock, so the same routine never runs twice at once.
|
|
349
|
+
2. Picks a model like `crewboss agent` does, but never a paid one. A routine may set `tool` and `model` instead of `size`.
|
|
350
|
+
3. Runs `collect` (if set) in the workspace and gives its output to the agent; output above about 60 KB is passed as a file.
|
|
351
|
+
4. Builds the prompt: preamble, routine prompt, the project's open tasks (so the agent does not report them again), memory notes, collected data, and an instruction: read-only, or, with `"mode": "write"`, allowed to fix things (`write_instructions` is added). `--dry-run` always uses read mode.
|
|
352
|
+
5. Turns `high` and `medium` findings into tasks for the routine's `project` and `assignee`, unless an open task with the same title and assignee already exists.
|
|
353
|
+
6. Publishes **exactly one report** per run, also when something fails (`error`, with the end of the logs) or nothing could run (`skipped`).
|
|
354
|
+
|
|
355
|
+
Logs of each run are in `logs/crewboss/routines/<name>/<date>/`.
|
|
356
|
+
|
|
357
|
+
`routines install` schedules the enabled routines and removes the schedules of disabled or deleted ones. Run it again after changing `routines`:
|
|
358
|
+
|
|
359
|
+
- **Linux:** a systemd user timer per routine (`~/.config/systemd/user/crewboss-<name>.service` and `.timer`), with `schedule` as `OnCalendar`.
|
|
360
|
+
- **macOS:** a launchd agent per routine (`~/Library/LaunchAgents/crewboss-<name>.plist`). `schedule` is translated to launchd's calendar: shorthands (`hourly`, `daily`, `weekly`, `monthly`, `yearly`) and forms like `Mon *-*-* 09:00:00`, `Mon..Fri 08:30`, `Sat,Sun 10:00`, `*-*-* 00/4:00:00` or `*-*-01 06:00` work; a specific year, seconds other than `00`, every minute, or weekdays combined with specific days do not, and `install` says so before changing anything. A run missed while the Mac was asleep starts when it wakes up.
|
|
361
|
+
|
|
362
|
+
The scheduled job runs with the `PATH` you had when you ran `install`, so the agent CLIs must be found there.
|
|
363
|
+
|
|
364
|
+
## Tasks
|
|
365
|
+
|
|
366
|
+
Tasks are kept by the configured tracker: the local database by default.
|
|
367
|
+
|
|
368
|
+
Use `crewboss task projects [--json]` to list project IDs and display names. Local and file trackers use each distinct project value as both ID and name. A command tracker can provide names with its optional `list_projects` operation; older plugins fall back to project IDs.
|
|
369
|
+
|
|
370
|
+
```bash
|
|
371
|
+
crewboss task projects [--json]
|
|
372
|
+
crewboss task list [--project P] [--status open|in_progress|done|all] [--assignee A] [--due-before YYYY-MM-DD] [--done-since DATE] # default: not done
|
|
373
|
+
crewboss task show <id>
|
|
374
|
+
crewboss task add <project> "<title>" [--notes N] [--priority high|medium|low] [--assignee A] [--due YYYY-MM-DD]
|
|
375
|
+
crewboss task update <id> [--title T] [--notes N] [--status open|in_progress|done] [--priority P] [--assignee A] [--due YYYY-MM-DD|none]
|
|
376
|
+
crewboss task done <id>
|
|
377
|
+
crewboss task comment <id> "<text>" [--author A] # author defaults to $USER
|
|
378
|
+
crewboss task tidy [--stale-days N] [--dry-run] [--json]
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
Agents can use these commands too: add `--json` for machine-readable output. Tasks have a `due` date (`YYYY-MM-DD`) or `null`; `--due none` clears it. `--due-before` includes tasks with a due date on or before that day.
|
|
382
|
+
|
|
383
|
+
Tasks also have `updated_at` (ISO 8601 with an offset) and `done_at` (`null` until done). Changes and comments refresh `updated_at`; marking a task done sets `done_at`, and reopening clears it. `--done-since 2026-11-01` includes open and in-progress tasks plus done tasks completed since local midnight on that date. An ISO datetime also works; one without an offset uses local time. Status filters still apply. Done tasks from a command plugin without `done_at` are excluded under this filter.
|
|
384
|
+
|
|
385
|
+
`crewboss task tidy --stale-days 14 --dry-run` previews in-progress tasks older than 14 days. Without `--dry-run`, tidy moves them back to open and comments with the last update date. Tasks without `updated_at` are skipped and reported. Set `tasks.stale_after_days` in the config to omit the flag and install a daily 07:00 local tidy schedule with `crewboss routines install`.
|
|
386
|
+
|
|
387
|
+
## Memory
|
|
388
|
+
|
|
389
|
+
Short notes that crewboss adds to prompts, so agents remember things between runs. Each note has a scope:
|
|
390
|
+
|
|
391
|
+
| Scope | Added to |
|
|
392
|
+
|---|---|
|
|
393
|
+
| `global` | every prompt |
|
|
394
|
+
| `persona:<name>` | that persona's agent runs |
|
|
395
|
+
| `routine:<name>` | that routine's runs |
|
|
396
|
+
| `project:<id>` | routines of that project |
|
|
397
|
+
|
|
398
|
+
```bash
|
|
399
|
+
crewboss memory add "Integration tests need the VPN" --scope persona:dev # scope defaults to global
|
|
400
|
+
crewboss memory list [--scope S] [--limit N]
|
|
401
|
+
crewboss memory search "vpn tests" [--scope S]
|
|
402
|
+
crewboss memory rm <id>
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
The newest notes go first, up to `memory_max_bytes` per prompt (8 KB by default; 0 turns memory off). Search is full-text when your Node.js includes SQLite FTS5 (Node 22.23 and 24 do, 22.13 does not); otherwise it matches every word.
|
|
406
|
+
|
|
407
|
+
## Mods
|
|
408
|
+
|
|
409
|
+
A mod is an installed folder at `<root>/.crewboss/mods/<name>/` containing `crewboss-mod.json`. It can provide persona Markdown files, routine definitions and prompts, a static UI, or any combination of them. The manifest name must match the folder name. Mod names and routine names use lowercase letters, digits, `-` and `_`, starting with a letter.
|
|
410
|
+
|
|
411
|
+
### Finding mods
|
|
412
|
+
|
|
413
|
+
Use `crewboss mod search [query] [--limit N] [--json]` to find GitHub repositories with the `crewboss-mod` topic. Results are community content. Search lists stars, last update, descriptions, an install command, and whether a source is already installed. For example, `crewboss mod search office` finds office mods. Installing a result with `crewboss mod add github:owner/repo` shows a review before anything is written to the workspace config or installed mod folder.
|
|
414
|
+
|
|
415
|
+
### Publishing a mod
|
|
416
|
+
|
|
417
|
+
Put `crewboss-mod.json` at the repository root, add the GitHub topic `crewboss-mod`, and tag releases. Users pin the full commit when they install, so later tags and changes do not silently change their workspaces.
|
|
418
|
+
|
|
419
|
+
For example, `.crewboss/mods/office-3d/crewboss-mod.json` can contain:
|
|
420
|
+
|
|
421
|
+
```json
|
|
422
|
+
{
|
|
423
|
+
"name": "office-3d",
|
|
424
|
+
"description": "An office UI with review helpers",
|
|
425
|
+
"personas": "agents",
|
|
426
|
+
"routines": [
|
|
427
|
+
{
|
|
428
|
+
"name": "review",
|
|
429
|
+
"enabled": true,
|
|
430
|
+
"schedule": "Mon *-*-* 09:00:00",
|
|
431
|
+
"size": "small",
|
|
432
|
+
"prompt": "prompts/review.md",
|
|
433
|
+
"collect": "node \"$CREWBOSS_MOD_DIR/scripts/collect.mjs\"",
|
|
434
|
+
"timeout_minutes": 20,
|
|
435
|
+
"project": "my-project",
|
|
436
|
+
"assignee": "me"
|
|
437
|
+
}
|
|
438
|
+
],
|
|
439
|
+
"ui": "web"
|
|
440
|
+
}
|
|
441
|
+
```
|
|
442
|
+
|
|
443
|
+
`personas` and `ui` are optional folders inside the mod; `ui` must contain `index.html`. Routine prompts and persona skills stay inside the mod folder. A mod persona's working `dir` is relative to the workspace root. Only the routines selected in the workspace config become active. Add this to `crewboss.json`:
|
|
444
|
+
|
|
445
|
+
```json
|
|
446
|
+
{
|
|
447
|
+
"mods": {
|
|
448
|
+
"office-3d": {
|
|
449
|
+
"source": "https://example.com/office-3d.git",
|
|
450
|
+
"commit": "0123456789abcdef",
|
|
451
|
+
"routines": ["review"]
|
|
452
|
+
}
|
|
453
|
+
},
|
|
454
|
+
"ui": "mod:office-3d"
|
|
455
|
+
}
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
Merge these keys into your existing config, including its required `tiers`. The selected routine is named `office-3d-review` for `routines list`, `routines run`, scheduling, and the API. A collector runs from the workspace root and receives `CREWBOSS_MOD_DIR` pointing to the mod folder. The `ui: "mod:office-3d"` selector serves the mod's `web/` folder; a plain UI path still works.
|
|
459
|
+
|
|
460
|
+
### Installing and updating mods
|
|
461
|
+
|
|
462
|
+
```bash
|
|
463
|
+
crewboss mod add github:owner/repo
|
|
464
|
+
crewboss mod add https://example.com/owner/repo.git --ref v1.2.0
|
|
465
|
+
crewboss mod list
|
|
466
|
+
crewboss mod update office-3d
|
|
467
|
+
crewboss mod remove office-3d
|
|
468
|
+
crewboss mod install # after cloning a workspace
|
|
469
|
+
```
|
|
470
|
+
|
|
471
|
+
`mod add` accepts `github:owner/repo`, an HTTPS or SSH Git URL, or a path to a local Git repository. It checks out the selected ref (the remote default branch by default), validates the manifest, and shows the description, personas, routines, exact collector commands, and UI before asking `Install? [y/N]`. `mod update` fetches and shows commits and manifest changes before confirmation. Use `--yes` for non-interactive add, update, and remove; otherwise a TTY is required. Add and update support `--ref REF`; add, list, update, and install support `--json`.
|
|
472
|
+
|
|
473
|
+
The config records the source as typed and the full commit SHA. `mod install` recreates missing folders and checks out those pinned commits after a workspace clone. A dirty mod folder is left alone. Routines stay disabled on add: list the desired names in `mods.<name>.routines`, then run `crewboss routines install`. Before removing a mod, remove its enabled routines and change any `ui: "mod:<name>"` selection. Config writes preserve other keys and their order, but normalize formatting to two-space indentation with a final newline. `crewboss.json` must be strict JSON; comments are not supported.
|
|
474
|
+
|
|
475
|
+
Review the displayed commands and code before confirming. Pinning protects a workspace from silently taking newer upstream changes; updating requires another review because mod prompts can affect agents and collectors run commands.
|
|
476
|
+
|
|
477
|
+
Only enable mods you trust: their persona and routine prompts are injected into agents, and their routine collectors run commands. Keep `.crewboss/` gitignored; commit the `mods` entry in `crewboss.json` to share which mods and routines the workspace uses.
|
|
478
|
+
|
|
479
|
+
## API and offices
|
|
480
|
+
|
|
481
|
+
```bash
|
|
482
|
+
crewboss serve [--port 4317] [--host 127.0.0.1] [--public-url URL] [--ui DIR] [--no-token]
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+
`serve` prints its URL and whether a UI is served. On loopback (`127.0.0.1`, `::1` or `localhost`) without `--public-url`, the URL has no token and API requests do not require one. `$CREWBOSS_TOKEN`, when set, is still accepted as a Bearer token or cookie. With `--public-url` or a non-loopback host, every `/api/` request requires a token from `$CREWBOSS_TOKEN` or one generated on startup. Open the printed token URL once to set a 30-day `HttpOnly; SameSite=Strict` cookie and redirect to `/`; API clients can instead send `Authorization: Bearer <token>`. `--no-token` or `CREWBOSS_NO_TOKEN=1` disables token authentication even when exposed; anyone who can reach that URL can control agents, tasks and routines. Browser writes require `Content-Type: application/json` with an object body (up to 1 MB). Errors are JSON objects such as `{"error":"not found"}` with an appropriate HTTP status.
|
|
486
|
+
|
|
487
|
+
Set `"ui": "path/to/office"` in `crewboss.json`, relative to `root` (absolute paths work), or `"ui": "mod:<name>"` for an installed mod's UI. Use `--ui DIR` relative to the current directory to override it. The folder must exist and contain `index.html`. Static files are public and served with GET/HEAD only; unknown extensions, dotfiles, directories, traversal and symlinks outside the folder return 404. Without a UI, `GET /` returns `{"name":"crewboss","api":"/api/","ui":null}`. An office is any static HTML/CSS/JS application that calls these endpoints.
|
|
488
|
+
|
|
489
|
+
By default the server listens on 127.0.0.1. It checks `Host` and `Origin`; on loopback it accepts the listening address and `localhost:<port>`. To reach it from other devices, use `--host 0.0.0.0 --public-url http://192.168.1.10:4317`. A public URL is required for wildcard hosts and becomes the only accepted origin. Use an HTTPS public URL when behind an HTTPS reverse proxy. Host checks, foreign-Origin refusal, JSON-only writes and security headers apply with or without token authentication. Anyone with access to an exposed no-token URL can control agents, tasks and routines.
|
|
490
|
+
|
|
491
|
+
All endpoint paths below start at `/api`. List responses are JSON arrays; individual responses are JSON objects. `limit` is a positive integer capped at 500. Dates and timestamps are ISO strings unless noted. A task has `id`, `project`, `project_name`, `title`, `notes`, `status`, `priority`, `assignee`, `due` and comments; a run includes stored run fields plus `repo` and `task`.
|
|
492
|
+
|
|
493
|
+
| Method | Path | Query or JSON body | Response |
|
|
494
|
+
|---|---|---|---|
|
|
495
|
+
| GET | `/status` | — | `{tracker, routines, fullTextSearch}` |
|
|
496
|
+
| GET | `/projects` | — | Project array: `[{id, name}]`. |
|
|
497
|
+
| GET | `/tasks` | `project?`, `status?` (`open`, `in_progress`, `done`, `all`), `assignee?` | Task array with `project_name`; default excludes done tasks. Requires a task-capable tracker. |
|
|
498
|
+
| POST | `/tasks` | `{project, title, notes?, priority?, assignee?, due?}`; priority defaults to `medium`, due is `YYYY-MM-DD` or null | 201 `{id}`. |
|
|
499
|
+
| GET | `/tasks/:id` | — | Task object with `project_name`, or 404. |
|
|
500
|
+
| PATCH | `/tasks/:id` | One or more of `{title?, notes?, status?, priority?, assignee?, due?}` | Updated task with `project_name`. Status: `open`, `in_progress`, `done`; priority: `high`, `medium`, `low`. |
|
|
501
|
+
| POST | `/tasks/:id/comments` | `{body, author?}`; author defaults to `web` | 201 comment object. |
|
|
502
|
+
| GET | `/routines` | — | Array of `{name, mod, enabled, schedule, mode, project, project_name, choice, running, last, next_run}` (`mod` is null for workspace routines). |
|
|
503
|
+
| POST | `/routines/:name/run` | `{}` | 202 `{started:true, routine, pid}`; 409 if locked. |
|
|
504
|
+
| GET | `/runs` | `kind?` (`agent` or `routine`), `name?`, `limit?` (default 50) | Run array, newest first; `task` is shortened to 300 characters. |
|
|
505
|
+
| GET | `/runs/:id` | — | Run with full `task`, `answer_path`, `answer`, `answer_truncated`, `prompt`, `log_tail`, `events`. Missing files return null. |
|
|
506
|
+
| POST | `/runs/:id/messages` | `{message}` (nonempty, at most 10,000 characters) | 201 reply event with `run_name` and `repo`; 409 if run finished. |
|
|
507
|
+
| GET | `/events` | `since?` (event ID, default 0), `run?` (run ID), `direction?` (`in` or `out`), `limit?` (default 100) | Event array with `run_name` and `repo`. |
|
|
508
|
+
| GET | `/presence` | — | Array of live `{session, label, state, cwd, started_at, updated_at, agent_count, agents, events}`. |
|
|
509
|
+
| GET | `/reports` | `source?`, `limit?` (default 50) | Report summaries with `tasks_total` and `tasks_done`, without findings. |
|
|
510
|
+
| GET | `/reports/:id` | — | Report with findings; each finding has `task_status`, plus report `tasks_total` and `tasks_done`. |
|
|
511
|
+
| GET | `/memory` | `scope?`, `q?` (search), `limit?` (default 50) | Memory note array. Scopes: `global`, `persona:<name>`, `project:<name>`, `routine:<name>`. |
|
|
512
|
+
| POST | `/memory` | `{text, scope?, author?}`; defaults `global` and `web` | 201 memory note. |
|
|
513
|
+
| DELETE | `/memory/:id` | `{}` | `{id, removed:true}`; 404 if missing. |
|
|
514
|
+
|
|
515
|
+
`POST /routines/:name/run` starts `crewboss routines run <name>` in the background.
|
|
516
|
+
|
|
517
|
+
## Configuration reference
|
|
518
|
+
|
|
519
|
+
`crewboss.json`:
|
|
520
|
+
|
|
521
|
+
| Key | Default | Meaning |
|
|
522
|
+
|---|---|---|
|
|
523
|
+
| `tiers` | required | `small`, `medium` and `large`: lists of candidates `{tool, model, effort?, paid?}` from cheapest to most expensive. `tool` is `claude`, `codex`, `agy` or `opencode`. |
|
|
524
|
+
| `root` | the config file's folder | Workspace root, relative to the config file's folder or absolute; it must be an existing folder. Every other relative path (personas, logs, prompts, skills, `.crewboss/`, `reports/`) and the working directory of collectors, plugins and scheduled routines resolve against it. `crewboss serve` needs a restart to pick up a new `root`. |
|
|
525
|
+
| `personas_dir` | `agents` | Folder of persona files. |
|
|
526
|
+
| `logs_dir` | `logs/crewboss` | Folder of run logs. |
|
|
527
|
+
| `ui` | unset | Optional static office folder with `index.html`, relative to `root` or absolute; `serve --ui DIR` overrides it relative to the current directory. |
|
|
528
|
+
| `preamble` | `""` | Text added at the start of every prompt (rules of your workspace). |
|
|
529
|
+
| `write_instructions` | `""` | Added to routines that run in write mode. |
|
|
530
|
+
| `tracker` | `{"type": "local"}` | Where tasks go: `local` (the database), `{"type": "file", "dir": "reports"}` (JSON and Markdown files) or a `command` plugin (see below). |
|
|
531
|
+
| `tasks` | unset | Optional `{"stale_after_days": 14}`; integer 1–365. Enables `task tidy` without a flag and a daily 07:00 local tidy schedule when routines are installed. |
|
|
532
|
+
| `quota` | `null` | `{"command": [...]}`: a plugin that can skip candidates. |
|
|
533
|
+
| `memory_max_bytes` | `8192` | Size limit of the memory section of each prompt; 0 turns it off. |
|
|
534
|
+
| `unit_prefix` | `crewboss-` | Prefix of the systemd unit and launchd agent names. |
|
|
535
|
+
| `routines` | `[]` | List of routines. |
|
|
536
|
+
|
|
537
|
+
Routine keys:
|
|
538
|
+
|
|
539
|
+
| Key | Meaning |
|
|
540
|
+
|---|---|
|
|
541
|
+
| `name` | Lowercase name. |
|
|
542
|
+
| `enabled` | `true` or `false`. |
|
|
543
|
+
| `schedule` | systemd `OnCalendar` expression, e.g. `Mon *-*-* 09:00:00` or `hourly` (on macOS, the subset described in [Routines](#routines)). |
|
|
544
|
+
| `size`, or `tool` + `model` (+ `effort`) | Which models may run it. |
|
|
545
|
+
| `prompt` | Markdown file inside the workspace. |
|
|
546
|
+
| `timeout_minutes` | 1 to 1440. |
|
|
547
|
+
| `project`, `assignee` | Where new tasks go and who gets them (any text your tracker understands). |
|
|
548
|
+
| `mode` | `read` (default) or `write`. |
|
|
549
|
+
| `collect`, `collect_timeout_minutes` | Shell command whose output the agent receives, and its time limit (default 10, less than `timeout_minutes`). |
|
|
550
|
+
| `allowed_tools` | Claude Code tools allowed without asking (`--allowedTools`, both modes). |
|
|
551
|
+
| `disallowed_tools` | Claude Code tools the agent may never use (`--disallowedTools`, both modes). |
|
|
552
|
+
| `options` | Free-form object for your own collectors; crewboss ignores it. |
|
|
553
|
+
|
|
554
|
+
## Plugins
|
|
555
|
+
|
|
556
|
+
Plugins let crewboss talk to your own systems. A plugin is any executable: crewboss runs it (without a shell, in the workspace), writes one JSON object to its stdin and reads one JSON object from its stdout. A non-zero exit, a timeout (`timeout_seconds`, 60 by default) or invalid JSON counts as an error, reported with the end of its stderr.
|
|
557
|
+
|
|
558
|
+
### Tracker
|
|
559
|
+
|
|
560
|
+
```json
|
|
561
|
+
"tracker": {"type": "command", "command": ["python3", "tools/my_tracker.py"], "options": {"url": "https://tasks.example.com"}}
|
|
562
|
+
```
|
|
563
|
+
|
|
564
|
+
crewboss runs the command once per operation:
|
|
565
|
+
|
|
566
|
+
```
|
|
567
|
+
stdin: {"op": "<operation>", "options": {...your options...}, "args": {...}}
|
|
568
|
+
stdout: {"result": ...} or {"error": "message"}
|
|
569
|
+
```
|
|
570
|
+
|
|
571
|
+
| `op` | `args` | `result` |
|
|
572
|
+
|---|---|---|
|
|
573
|
+
| `open_tasks` | `{project}` | open tasks: `[{"id", "title", "assignee"}]` |
|
|
574
|
+
| `create_task` | `{project, title, notes, priority, assignee, due?}`; `due` is `YYYY-MM-DD` or `null` | the new task's id |
|
|
575
|
+
| `publish_report` | `{project, source, title, status, summary, body, findings}` | `null` |
|
|
576
|
+
| `list_projects` (optional) | `{}` | `[ {"id": "...", "name": "..."} ]`; older plugins may omit it and crewboss falls back to distinct task project IDs |
|
|
577
|
+
| `list_tasks` (optional) | `{project?, status?, assignee?, ids?}`; no `status` means not done, `"all"` means all | `[{"id", "title", "project", "notes", "status", "priority", "assignee", "due"?, "updated_at"?, "done_at"?, "comments"?}]`; timestamps are ISO 8601 with offset, `done_at` is null until done |
|
|
578
|
+
| `update_task` (optional) | `{id, changes: {title?, notes?, status?, priority?, assignee?, due?}}`; `due` is `YYYY-MM-DD` or `null` | the updated task, optionally with `updated_at` and `done_at` |
|
|
579
|
+
| `comment_task` (optional) | `{id, author, body}` | the comment, or `null` |
|
|
580
|
+
|
|
581
|
+
Routines need the first three. The optional ones are used by `crewboss task` and API clients; answer `{"error": "unsupported"}` for any you do not implement. Trackers without due date support may ignore `due`. Statuses are `open`, `in_progress` and `done`; priorities `high`, `medium` and `low`.
|
|
582
|
+
For `done_since`, crewboss requests all statuses and filters the results itself; a done task without `done_at` is excluded. `task tidy` needs `list_tasks`, `update_task`, and `comment_task`; tasks without `updated_at` are skipped.
|
|
583
|
+
|
|
584
|
+
Reports and run history are always kept in the local database too, whatever the tracker.
|
|
585
|
+
|
|
586
|
+
### Quota
|
|
587
|
+
|
|
588
|
+
```json
|
|
589
|
+
"quota": {"command": ["tools/check_quota.sh"]}
|
|
590
|
+
```
|
|
591
|
+
|
|
592
|
+
stdin `{"candidate": {"tool", "model", "effort"?, "paid"}}`, stdout `{"skip": null}` to allow it or `{"skip": "reason"}` to skip it. If the plugin fails, the candidate is skipped.
|
|
593
|
+
|
|
594
|
+
## Files crewboss writes
|
|
595
|
+
|
|
596
|
+
| Path | What |
|
|
597
|
+
|---|---|
|
|
598
|
+
| `.crewboss/crewboss.db` | SQLite database: tasks (local tracker), run history, run events, reports, memory. |
|
|
599
|
+
| `logs/crewboss/agents/<persona>/<date>/` | `prompt.txt`, `agent.log`, `answer.md`, `choice.json` of each agent run. |
|
|
600
|
+
| `logs/crewboss/routines/<routine>/<date>/` | `prompt.txt`, `agent.log`, `answer.md`, `collect.txt`, `status.json` of each routine run. |
|
|
601
|
+
| `reports/` | Tasks and reports, only with the `file` tracker. |
|
|
602
|
+
|
|
603
|
+
## Troubleshooting
|
|
604
|
+
|
|
605
|
+
- **Exit codes:** 0 success, 1 error, 2 wrong usage (or a tracker operation the plugin does not support). `crewboss --help` lists every command.
|
|
606
|
+
- **"Required binary 'claude' not found in PATH":** install the agent CLI, or make sure it is in the `PATH` of the shell (scheduled routines use the `PATH` you had when you ran `routines install`; run it again after fixing it).
|
|
607
|
+
- **The API says "missing or invalid token":** on an exposed server, open the full link printed by `crewboss serve` or send a Bearer token; the token changes on every start unless you set `CREWBOSS_TOKEN`.
|
|
608
|
+
- **"database schema version N is newer than this crewboss supports":** the workspace was used by a newer crewboss. Upgrade with `npm install -g crewboss`.
|
|
609
|
+
|
|
610
|
+
## Development
|
|
611
|
+
|
|
612
|
+
```bash
|
|
613
|
+
git clone https://github.com/PabloTheBlink/crewboss.git
|
|
614
|
+
cd crewboss
|
|
615
|
+
npm test
|
|
616
|
+
```
|
|
617
|
+
|
|
618
|
+
No dependencies to install. GitHub Actions runs the suite on Ubuntu and macOS with Node 22 and 24. Linux runs `timeout 300 node --test`; macOS runs the suite under Perl's 120-second alarm. CI also checks that `npm pack` contains only the intended package files.
|
|
619
|
+
|
|
620
|
+
crewboss was previously called foreman.
|
|
621
|
+
|
|
622
|
+
## Releasing
|
|
623
|
+
|
|
624
|
+
Bump the version in `package.json` and update `CHANGELOG.md`, then commit the changes. Push a version tag to publish:
|
|
625
|
+
|
|
626
|
+
```bash
|
|
627
|
+
git tag vX.Y.Z && git push --tags
|
|
628
|
+
```
|
|
629
|
+
|
|
630
|
+
The release workflow checks that the tag matches the package version, runs the test suite and publishes with provenance. For the first publish, add an `NPM_TOKEN` repository secret so publishing can proceed before npm trusted publishing is configured. Configure the trusted publisher for this GitHub repository and workflow on npmjs.com; after that, the `NPM_TOKEN` secret can be removed.
|
|
631
|
+
|
|
632
|
+
## License
|
|
633
|
+
|
|
634
|
+
MIT
|