birdsi 0.0.0-stage → 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/README.md +236 -2
- package/dist/birdsi.js +50699 -0
- package/package.json +47 -4
package/README.md
CHANGED
|
@@ -1,3 +1,237 @@
|
|
|
1
|
-
#
|
|
1
|
+
# birdsi
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
birdsI is the cockpit for your apps. It maps an app from its code (the services it runs on, its deployments, crons, webhooks, store apps, migrations and env names), reads the vendor accounts you connect with keys that only read, and tells you what needs you. Nothing a model says reaches you unverified: the map is read by rules that cite the file and line, and the one model call today, the optional docs check, must cite the package's own documentation. Rule-based checks run with every map: committed keys, unsafe settings, published vulnerabilities, packages far behind. Every finding carries a confidence class: Proven (a rule or a database found it) or Doc-verified (checked against the package's own current documentation, cited). Judgment marks a model's reading from before birdsI stopped reading code with a model. birdsI writes no code: your coding agent makes the change, and the next map confirms it. This package is the `birdsi` command-line tool and the birdsI MCP server for coding assistants.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
Run it without installing, in your project folder:
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npx birdsi
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
That maps the app in the current folder (about a minute), opens its page, streams progress, and ends with what needs you: alerts, questions, approvals.
|
|
14
|
+
|
|
15
|
+
Until the package is on npm, run it from a clone: `npm install`, then `npx tsx packages/cli/src/birdsi.ts`.
|
|
16
|
+
|
|
17
|
+
Once it is on npm, you can also install it globally:
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
npm i -g birdsi
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Requires Node.js 20.9 or later.
|
|
24
|
+
|
|
25
|
+
## Sign in
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
birdsi login
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Opens your browser and shows a short code to approve. `--no-browser` prints the link instead of opening a browser. The token is saved in `~/.config/birdsi/config.json` (or `$XDG_CONFIG_HOME/birdsi/config.json`), readable only by you. In CI, set `BIRDSI_TOKEN` instead. It takes priority over the saved file.
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
birdsi whoami # who you are signed in as
|
|
35
|
+
birdsi logout # remove the saved token from this computer
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Commands
|
|
39
|
+
|
|
40
|
+
Read commands take `--json`. Commands about one repository take `--repo owner/name` to pick one other than the one you mapped last.
|
|
41
|
+
|
|
42
|
+
### `birdsi` with no command
|
|
43
|
+
|
|
44
|
+
Maps the app in the current folder, or in the folder you name, the same as `birdsi map`. `--no-open` keeps its page closed. `--json` and `--ascii` work as they do for `birdsi map`.
|
|
45
|
+
|
|
46
|
+
### `birdsi cockpit`
|
|
47
|
+
|
|
48
|
+
The app as it stands now, the same view as its page: the open alerts with what to do, each Vercel project (production deployment, the env names its deployment's code needs against the ones set, crons registered, domains, errors), each Supabase project (paused or not, size, advisors, migrations owed), each OneSignal app (subscriptions, recent messages), then what the map read from the code. A part a vendor could not answer says why.
|
|
49
|
+
|
|
50
|
+
### `birdsi setup`
|
|
51
|
+
|
|
52
|
+
What birdsI still needs from you for this app, from the map: the project to declare and the read key to connect for each service birdsI can read, with the exact clicks to make the key, what birdsI will read once it is connected and what it alerts on, the services it cannot read yet, email alerts, the dates no API reports. Each step says done, to do, not working, waiting or optional. Keys are pasted in the browser, never typed into the terminal.
|
|
53
|
+
|
|
54
|
+
### `birdsi alerts`
|
|
55
|
+
|
|
56
|
+
The alert stream: the open alerts, newest first, each one sentence with what to do, the alerts closed in the last two weeks, the dates you watch, and whether alerts are emailed.
|
|
57
|
+
|
|
58
|
+
### `birdsi inventory`
|
|
59
|
+
|
|
60
|
+
Everything birdsI knows about the app in one read: the vision, every vendor with what its account says and its plan's limits, the alerts, the trackers, how fresh the map and the account reads are, what needs you, the latest map. Agents start here.
|
|
61
|
+
|
|
62
|
+
### `birdsi changes [scanId]`
|
|
63
|
+
|
|
64
|
+
New and resolved findings since the previous finished map, by stable key (an id changes per map, a key does not). Pass a map's id to compare from an earlier one. Findings from the model review that ran before v3 are left out of the comparison, so they never show as resolved.
|
|
65
|
+
|
|
66
|
+
### `birdsi record`
|
|
67
|
+
|
|
68
|
+
The record of the app: decisions, facts stated, findings marked fixed or dismissed, answers, approvals and runs, newest first, each with who wrote it and why. `--kind decision` (or any kind) filters, and an unknown kind is a usage error. `--limit` sets how many entries (default 50, up to 200).
|
|
69
|
+
|
|
70
|
+
### `birdsi decide <text...>`
|
|
71
|
+
|
|
72
|
+
Writes a decision to the record in your words, with `--why`, so no agent asks about it again.
|
|
73
|
+
|
|
74
|
+
### `birdsi fixed <finding>`
|
|
75
|
+
|
|
76
|
+
Says a finding is fixed in the code (`--note` what was done). The next map confirms it or reopens it.
|
|
77
|
+
|
|
78
|
+
### `birdsi policy`
|
|
79
|
+
|
|
80
|
+
The repository's agent policy in words: whether agents may ask and propose, whether they may write to the record, and what is approved without asking. `--hint` prints the Claude Code hook below.
|
|
81
|
+
|
|
82
|
+
### `birdsi policy check [command...]`
|
|
83
|
+
|
|
84
|
+
Exit 0 when a command changes nothing. Exit 2, with the reason on stderr, when it changes a vendor account (a plan, an env variable, a deploy, a secret, a pause) and must go through birdsI. With no argument it reads a Claude Code hook payload from stdin. Commands that change nothing never touch the network. When birdsI cannot be reached, account-changing commands stay blocked.
|
|
85
|
+
|
|
86
|
+
Claude Code, in `.claude/settings.json`:
|
|
87
|
+
|
|
88
|
+
```json
|
|
89
|
+
{
|
|
90
|
+
"hooks": {
|
|
91
|
+
"PreToolUse": [
|
|
92
|
+
{ "matcher": "Bash", "hooks": [{ "type": "command", "command": "npx -y birdsi@0.2.0 policy check" }] }
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### `birdsi vendors`
|
|
99
|
+
|
|
100
|
+
The services the app runs on: what each is, what its account says, the plan's checked limits, and alerts. `--sync` reads the connected accounts first. `--repo owner/name` picks a repository other than the one you mapped last.
|
|
101
|
+
|
|
102
|
+
### `birdsi questions`
|
|
103
|
+
|
|
104
|
+
What your coding agent needs you to answer. On a terminal it asks them one by one (type a number to pick an option, or an answer, or Enter to skip). `--no-answer` only lists them.
|
|
105
|
+
|
|
106
|
+
### `birdsi approvals [approve|deny|run] [id]`
|
|
107
|
+
|
|
108
|
+
Actions your agent proposed, with the command, the reason and the cost. Deciding happens in the browser only (`approve` and `deny` open the Agent page), so an agent can never approve its own request. `run` runs every approved command (or only the one whose id you give) in the current folder, or in `--path <dir>`, one at a time, each after a yes (`--yes` skips the question), with a minimal environment, and reports the output back so the agent can read it. Only these programs may be run: stripe, npm, npx, pnpm, yarn, bun, vercel, supabase, railway, fly, flyctl, gh, git, node. Nothing ever runs on birdsI's servers.
|
|
109
|
+
|
|
110
|
+
### `birdsi vision [text...]`
|
|
111
|
+
|
|
112
|
+
Shows, or sets, what the app is for and where it is going. `--file VISION.md` reads it from a file. Agents read it.
|
|
113
|
+
|
|
114
|
+
### `birdsi export`
|
|
115
|
+
|
|
116
|
+
Writes the knowledge base as Markdown under `.birdsi/` (README, vision, vendors, alerts, questions and the record) so agents that read files instead of MCP get the same picture.
|
|
117
|
+
|
|
118
|
+
### `birdsi map [path]`
|
|
119
|
+
|
|
120
|
+
Maps a folder (default: the current one). Also available as `birdsi scan`. birdsI packs the folder, leaving out everything your `.gitignore` files exclude (at every level), plus build output, dependencies, common binary types (images, fonts, archives, media, compiled files), and always your `.env` files, private keys and certificates, whatever `.gitignore` says. Then it uploads the folder and streams progress as the map runs. The upload is deleted on birdsI as soon as the map has run.
|
|
121
|
+
|
|
122
|
+
```sh
|
|
123
|
+
birdsi map # map the current folder
|
|
124
|
+
birdsi map ./my-app --open # and open the app's page
|
|
125
|
+
birdsi map --json > result.json # the final result as JSON, nothing else
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
| Option | What it does |
|
|
129
|
+
| --- | --- |
|
|
130
|
+
| `--open` | Open the app's page in the browser once the map starts. |
|
|
131
|
+
| `--branch <name>` | Branch name to record, when it is not the current one. |
|
|
132
|
+
| `--json` | Print the final response as JSON only. |
|
|
133
|
+
| `--ascii` | Use `[P] [D] [J]` and plain glyphs instead of Unicode. |
|
|
134
|
+
|
|
135
|
+
When the map finishes, birdsI prints a summary and every finding, grouped by severity (critical, high, medium, low), then what needs you outside the code. Press Ctrl+C once to stop the map on the server. Snapshots are limited to 40,000 files and 200 MB. Single files over 2 MB are left out, except lockfiles up to 20 MB.
|
|
136
|
+
|
|
137
|
+
Confidence glyphs: `●` Proven, `◉` Doc-verified, `◌` Judgment. Without Unicode, or with `--ascii`: `[P]`, `[D]`, `[J]`. Colour is used only on a terminal and never when `NO_COLOR` is set. It never carries meaning on its own.
|
|
138
|
+
|
|
139
|
+
### `birdsi findings [scanId]`
|
|
140
|
+
|
|
141
|
+
Lists the findings of a map, numbered. Without an id, uses your newest map from this computer. Also available as `birdsi list`.
|
|
142
|
+
|
|
143
|
+
```sh
|
|
144
|
+
birdsi findings
|
|
145
|
+
birdsi findings scan_8f2c --json
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### `birdsi explain <finding>`
|
|
149
|
+
|
|
150
|
+
Everything about one finding: what is wrong, why it matters, the evidence, the steps or the change that fixes it, and what its confidence class means. Takes a finding id, or the number shown next to it in your newest map.
|
|
151
|
+
|
|
152
|
+
```sh
|
|
153
|
+
birdsi explain 4
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### `birdsi dismiss <finding>`
|
|
157
|
+
|
|
158
|
+
Dismisses a finding so it stops counting in later maps. Asks first, and `--yes` skips the question.
|
|
159
|
+
|
|
160
|
+
### `birdsi repos`
|
|
161
|
+
|
|
162
|
+
Lists your repositories, from GitHub and from terminal uploads, with their ids.
|
|
163
|
+
|
|
164
|
+
Every command that prints data accepts `--json`, which prints the API response exactly as received. `birdsi questions --json` lists open questions only.
|
|
165
|
+
|
|
166
|
+
## MCP server
|
|
167
|
+
|
|
168
|
+
`birdsi mcp` runs the birdsI MCP server over stdio, so coding assistants can read the app's cockpit, ask the owner, propose actions and map the code mid-session. It uses the token from `birdsi login`, or `BIRDSI_TOKEN` in the environment.
|
|
169
|
+
|
|
170
|
+
Tools: `birdsi_inventory` (call this first: vision, vendors, alerts, freshness, what needs the owner), `birdsi_cockpit` (the app as it stands now: alerts, each project's read, the map), `birdsi_setup` (what birdsI still needs from the owner, step by step, with what each one switches on), `birdsi_alerts` (the alert stream and the dates to watch), `birdsi_changes_since` (new and resolved findings by stable key), `birdsi_vendor`, `birdsi_vision`, `birdsi_questions`, `birdsi_ask_owner`, `birdsi_request_action`, `birdsi_action_status`, `birdsi_record` (the record, newest first), `birdsi_record_decision`, `birdsi_record_fact`, `birdsi_mark_fixed` (writes, within the owner's policy, each logged with its author), `birdsi_sync_vendors` (reads the accounts now), `birdsi_scan` (maps a folder, and returns after four minutes if the map is still running), `birdsi_scan_status`, `birdsi_findings`, `birdsi_finding`, `birdsi_repos`. The inventory, cockpit, alerts, vendor, changes and record tools return structured content as well as text. Text read from a repository, a vendor or the web is marked between `«` and `»` in the inventory, cockpit, alerts, vendor, questions, changes, record and finding results.
|
|
171
|
+
|
|
172
|
+
What each tool may do: the reads (`birdsi_inventory`, `birdsi_cockpit`, `birdsi_setup`, `birdsi_alerts`, `birdsi_vendor`, `birdsi_vision`, `birdsi_questions`, `birdsi_record`, `birdsi_action_status`, `birdsi_changes_since`, `birdsi_findings`, `birdsi_finding`, `birdsi_scan_status`, `birdsi_repos`) change nothing. `birdsi_scan` uploads the folder you name, inside the project's own folder, and maps it. `birdsi_sync_vendors` makes birdsI read the connected accounts now, with keys that only read. `birdsi_ask_owner` and `birdsi_request_action` add a question or a proposal the owner answers in the browser. A proposal never runs until the owner approves it, and then only on the owner's computer. `birdsi_record_decision`, `birdsi_record_fact` and `birdsi_mark_fixed` write to the append-only record, only while the owner's policy allows agents to write, each with its author. No tool changes a vendor account.
|
|
173
|
+
|
|
174
|
+
`birdsi mcp --install-hint` prints these snippets with the current version pinned, so a release never changes what your agent runs until you choose it. No token goes in any file: the server reads the one `birdsi login` saved. In CI or a sandbox, set `BIRDSI_TOKEN` in the environment.
|
|
175
|
+
|
|
176
|
+
Claude Code, `.mcp.json` at the project root:
|
|
177
|
+
|
|
178
|
+
```json
|
|
179
|
+
{
|
|
180
|
+
"mcpServers": {
|
|
181
|
+
"birdsi": {
|
|
182
|
+
"type": "stdio",
|
|
183
|
+
"command": "npx",
|
|
184
|
+
"args": ["-y", "birdsi@0.2.0", "mcp"]
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
Cursor, `.cursor/mcp.json`:
|
|
191
|
+
|
|
192
|
+
```json
|
|
193
|
+
{
|
|
194
|
+
"mcpServers": {
|
|
195
|
+
"birdsi": {
|
|
196
|
+
"command": "npx",
|
|
197
|
+
"args": ["-y", "birdsi@0.2.0", "mcp"]
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Codex, `~/.codex/config.toml`:
|
|
204
|
+
|
|
205
|
+
```toml
|
|
206
|
+
[mcp_servers.birdsi]
|
|
207
|
+
command = "npx"
|
|
208
|
+
args = ["-y", "birdsi@0.2.0", "mcp"]
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
A skill that tells an agent when to read birdsI and how to read its facts: `skills/birdsi/SKILL.md` in the repository.
|
|
212
|
+
|
|
213
|
+
## Exit codes
|
|
214
|
+
|
|
215
|
+
| Code | Meaning |
|
|
216
|
+
| --- | --- |
|
|
217
|
+
| 0 | Done, with no open findings at or above High. |
|
|
218
|
+
| 1 | Done, with open findings at or above High (critical or high). |
|
|
219
|
+
| 2 | The map or request could not finish (map failed, network error, refused request). |
|
|
220
|
+
| 3 | Stopped with Ctrl+C. |
|
|
221
|
+
| 4 | Not signed in, or the token was refused. |
|
|
222
|
+
| 5 | Usage error: unknown command, missing argument, or a folder birdsI cannot map. |
|
|
223
|
+
|
|
224
|
+
Dismissed and fixed findings do not count toward exit code 1. `birdsi policy check` exits 2 when a command must go through birdsI.
|
|
225
|
+
|
|
226
|
+
## Environment
|
|
227
|
+
|
|
228
|
+
| Variable | Purpose |
|
|
229
|
+
| --- | --- |
|
|
230
|
+
| `BIRDSI_TOKEN` | Token to use instead of the saved sign-in. Starts with `bsi_`. |
|
|
231
|
+
| `BIRDSI_API_URL` | birdsI address. Default `https://birdsi.vercel.app`. Must be https, except for localhost. |
|
|
232
|
+
| `XDG_CONFIG_HOME` | Where the config folder lives. Default `~/.config`. |
|
|
233
|
+
| `NO_COLOR` | Turns colour off. |
|
|
234
|
+
|
|
235
|
+
## License
|
|
236
|
+
|
|
237
|
+
MPL-2.0
|