vit 0.1.3 → 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/README.md +3 -4
- package/package.json +6 -3
- package/skills/vit/COMMANDS.md +270 -0
- package/skills/vit/SKILL.md +203 -0
- package/src/cli.js +2 -2
- package/src/cmd/beacon.js +2 -1
- package/src/cmd/config.js +6 -1
- package/src/cmd/doctor.js +6 -17
- package/src/cmd/explore.js +6 -0
- package/src/cmd/follow.js +5 -2
- package/src/cmd/inbox.js +131 -0
- package/src/cmd/learn.js +58 -40
- package/src/cmd/remix.js +6 -2
- package/src/cmd/scan.js +2 -0
- package/src/cmd/ship.js +125 -24
- package/src/cmd/skim.js +40 -8
- package/src/cmd/vet.js +40 -8
- package/src/cmd/vouch.js +71 -34
- package/src/postinstall.js +26 -0
- package/src/cmd/setup.js +0 -76
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<p align="center">
|
|
2
2
|
<a href="https://v-it.org">
|
|
3
|
-
<img src="docs/brand/vit-wordmark.svg" alt="vit" height="
|
|
3
|
+
<img src="docs/brand/vit-wordmark.svg" alt="vit" height="40">
|
|
4
4
|
</a>
|
|
5
5
|
</p>
|
|
6
6
|
|
|
@@ -25,11 +25,10 @@ vit is a CLI where you and your coding agent discover, evaluate, and share softw
|
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
27
|
npm install -g vit
|
|
28
|
-
vit setup
|
|
29
28
|
vit login your-handle.bsky.social
|
|
30
29
|
```
|
|
31
30
|
|
|
32
|
-
then open your coding agent (Claude Code, Codex CLI, or Gemini CLI) — it already knows how to use vit because
|
|
31
|
+
then open your coding agent (Claude Code, Codex CLI, or Gemini CLI) — it already knows how to use vit because installing vit auto-installs the agent skill. your agent runs `vit init` to connect your project to the network, then `vit skim` to discover what others have built.
|
|
33
32
|
|
|
34
33
|
**[full getting started guide →](https://v-it.org/start/)**
|
|
35
34
|
|
|
@@ -66,7 +65,7 @@ make install
|
|
|
66
65
|
|
|
67
66
|
## works with
|
|
68
67
|
|
|
69
|
-
vit is a human+agent collaboration tool. it works with [Claude Code](https://claude.ai/code), [Codex CLI](https://github.com/openai/codex), and [Gemini CLI](https://github.com/google-gemini/gemini-cli). some commands are for you (
|
|
68
|
+
vit is a human+agent collaboration tool. it works with [Claude Code](https://claude.ai/code), [Codex CLI](https://github.com/openai/codex), and [Gemini CLI](https://github.com/google-gemini/gemini-cli). some commands are for you (login, vet), others are for your agent (skim, remix, ship).
|
|
70
69
|
|
|
71
70
|
## reference
|
|
72
71
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Social toolkit for personalized software",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -8,10 +8,13 @@
|
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
10
|
"bin/",
|
|
11
|
-
"src/"
|
|
11
|
+
"src/",
|
|
12
|
+
"skills/vit/"
|
|
12
13
|
],
|
|
13
14
|
"type": "module",
|
|
14
|
-
"scripts": {
|
|
15
|
+
"scripts": {
|
|
16
|
+
"postinstall": "node src/postinstall.js"
|
|
17
|
+
},
|
|
15
18
|
"engines": {
|
|
16
19
|
"node": ">=20.0.0"
|
|
17
20
|
},
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
# vit Command Reference
|
|
2
|
+
|
|
3
|
+
## Agent-Only Commands
|
|
4
|
+
|
|
5
|
+
### `vit init`
|
|
6
|
+
Usage: `vit init`
|
|
7
|
+
|
|
8
|
+
Options:
|
|
9
|
+
- `--beacon <url>` - Git URL or vit beacon URI to use instead of auto-detection
|
|
10
|
+
- `-v, --verbose` - Show step-by-step details
|
|
11
|
+
|
|
12
|
+
Output format:
|
|
13
|
+
- Text output.
|
|
14
|
+
- On success prints `beacon: vit:...`.
|
|
15
|
+
- Without `--beacon`, prints status and hints when beacon is missing.
|
|
16
|
+
|
|
17
|
+
Error conditions:
|
|
18
|
+
- Not running in an agent context (`requireAgent()` gate).
|
|
19
|
+
- No git remote found when using `--beacon .`.
|
|
20
|
+
- Invalid beacon/git URL input.
|
|
21
|
+
|
|
22
|
+
Examples:
|
|
23
|
+
- `vit init`
|
|
24
|
+
- `vit init --beacon .`
|
|
25
|
+
- `vit init --beacon https://github.com/org/repo.git`
|
|
26
|
+
|
|
27
|
+
### `vit skim`
|
|
28
|
+
Usage: `vit skim`
|
|
29
|
+
|
|
30
|
+
Options:
|
|
31
|
+
- `--did <did>` - Override DID
|
|
32
|
+
- `--handle <handle>` - Filter to single handle
|
|
33
|
+
- `--limit <n>` - Max results (default: 25)
|
|
34
|
+
- `--json` - Output as JSON array
|
|
35
|
+
- `-v, --verbose` - Show step-by-step details
|
|
36
|
+
|
|
37
|
+
Output format:
|
|
38
|
+
- `--json`: JSON array of ATProto records.
|
|
39
|
+
- Default text mode: per-cap blocks with `ref`, optional `title`, optional `description`, plus trailing hint.
|
|
40
|
+
|
|
41
|
+
Error conditions:
|
|
42
|
+
- Not running in an agent context (`requireAgent()` gate).
|
|
43
|
+
- No DID configured.
|
|
44
|
+
- No beacon set.
|
|
45
|
+
- Session restore/auth failure.
|
|
46
|
+
|
|
47
|
+
Examples:
|
|
48
|
+
- `vit skim --json`
|
|
49
|
+
- `vit skim --handle alice.bsky.social --limit 10`
|
|
50
|
+
|
|
51
|
+
## Agent-Usable Commands
|
|
52
|
+
|
|
53
|
+
### `vit doctor`
|
|
54
|
+
Usage: `vit doctor`
|
|
55
|
+
|
|
56
|
+
Options:
|
|
57
|
+
- None.
|
|
58
|
+
|
|
59
|
+
Output format:
|
|
60
|
+
- Text diagnostics for install and beacon status.
|
|
61
|
+
|
|
62
|
+
Error conditions:
|
|
63
|
+
- Config read/parse failures.
|
|
64
|
+
|
|
65
|
+
### `vit config [action] [key] [value]`
|
|
66
|
+
Usage: `vit config [action] [key] [value]`
|
|
67
|
+
|
|
68
|
+
Options:
|
|
69
|
+
- None.
|
|
70
|
+
|
|
71
|
+
Arguments:
|
|
72
|
+
- `[action]` - `list` (default), `set`, `delete`
|
|
73
|
+
- `[key]`
|
|
74
|
+
- `[value]`
|
|
75
|
+
|
|
76
|
+
Output format:
|
|
77
|
+
- `list`: `key=value` lines.
|
|
78
|
+
- `set`/`delete`: silent on success.
|
|
79
|
+
|
|
80
|
+
Error conditions:
|
|
81
|
+
- Unknown action.
|
|
82
|
+
- Missing required key/value for `set`.
|
|
83
|
+
- Missing required key for `delete`.
|
|
84
|
+
|
|
85
|
+
Examples:
|
|
86
|
+
- `vit config`
|
|
87
|
+
- `vit config set did did:plc:example`
|
|
88
|
+
- `vit config delete did`
|
|
89
|
+
|
|
90
|
+
### `vit follow <handle>`
|
|
91
|
+
Usage: `vit follow <handle>`
|
|
92
|
+
|
|
93
|
+
Options:
|
|
94
|
+
- `-v, --verbose` - Show step-by-step details
|
|
95
|
+
- `--did <did>` - Override DID
|
|
96
|
+
|
|
97
|
+
Output format:
|
|
98
|
+
- Text: `following <handle> (<did>)`.
|
|
99
|
+
|
|
100
|
+
Error conditions:
|
|
101
|
+
- No DID configured.
|
|
102
|
+
- Handle already followed.
|
|
103
|
+
- Handle resolution/session failure.
|
|
104
|
+
|
|
105
|
+
Example:
|
|
106
|
+
- `vit follow alice.bsky.social`
|
|
107
|
+
|
|
108
|
+
### `vit unfollow <handle>`
|
|
109
|
+
Usage: `vit unfollow <handle>`
|
|
110
|
+
|
|
111
|
+
Options:
|
|
112
|
+
- `-v, --verbose` - Show step-by-step details
|
|
113
|
+
|
|
114
|
+
Output format:
|
|
115
|
+
- Text: `unfollowed <handle>`.
|
|
116
|
+
|
|
117
|
+
Error conditions:
|
|
118
|
+
- Handle not in following list.
|
|
119
|
+
|
|
120
|
+
Example:
|
|
121
|
+
- `vit unfollow alice.bsky.social`
|
|
122
|
+
|
|
123
|
+
### `vit following`
|
|
124
|
+
Usage: `vit following`
|
|
125
|
+
|
|
126
|
+
Options:
|
|
127
|
+
- `-v, --verbose` - Show step-by-step details
|
|
128
|
+
|
|
129
|
+
Output format:
|
|
130
|
+
- Text lines: `handle (did)`.
|
|
131
|
+
- If empty: `no followings`.
|
|
132
|
+
|
|
133
|
+
Error conditions:
|
|
134
|
+
- Following file read/parse failures.
|
|
135
|
+
|
|
136
|
+
Example:
|
|
137
|
+
- `vit following`
|
|
138
|
+
|
|
139
|
+
### `vit ship`
|
|
140
|
+
Usage: `vit ship --title <title> --description <description> --ref <ref> [--recap <ref>]`
|
|
141
|
+
|
|
142
|
+
Input:
|
|
143
|
+
- Body is required on stdin (pipe or heredoc).
|
|
144
|
+
|
|
145
|
+
Options:
|
|
146
|
+
- `-v, --verbose` - Show step-by-step details
|
|
147
|
+
- `--did <did>` - Override DID
|
|
148
|
+
- `--title <title>` (required)
|
|
149
|
+
- `--description <description>` (required)
|
|
150
|
+
- `--ref <ref>` (required) - must match `^[a-z]+-[a-z]+-[a-z]+$`
|
|
151
|
+
- `--recap <ref>` (optional) - ref to derive from; must match `^[a-z]+-[a-z]+-[a-z]+$`
|
|
152
|
+
|
|
153
|
+
Gate:
|
|
154
|
+
- Agent-only (`requireAgent()`).
|
|
155
|
+
|
|
156
|
+
Output format:
|
|
157
|
+
- JSON object on success with request/response metadata.
|
|
158
|
+
|
|
159
|
+
Error conditions:
|
|
160
|
+
- Not running in an agent context (`requireAgent()` gate).
|
|
161
|
+
- No DID configured.
|
|
162
|
+
- Missing required options.
|
|
163
|
+
- Missing stdin body.
|
|
164
|
+
- Invalid `--ref` or `--recap` format.
|
|
165
|
+
- `--recap` target not found.
|
|
166
|
+
- Session restore/auth failure.
|
|
167
|
+
|
|
168
|
+
Examples:
|
|
169
|
+
- `vit ship --title "Retry helper" --description "Adds bounded retry utility" --ref retry-helper-utility <<'EOF'`
|
|
170
|
+
- `Add bounded retry utility for transient request failures.`
|
|
171
|
+
- `EOF`
|
|
172
|
+
- `vit ship --title "Patch" --description "Details" --ref fast-cache-invalidation --recap original-cache-ref --did did:plc:example <<'EOF'`
|
|
173
|
+
- `Patch details...`
|
|
174
|
+
- `EOF`
|
|
175
|
+
|
|
176
|
+
### `vit beacon <target>`
|
|
177
|
+
Usage: `vit beacon <target>`
|
|
178
|
+
|
|
179
|
+
Arguments:
|
|
180
|
+
- `<target>` - Git URL or vit beacon URI
|
|
181
|
+
|
|
182
|
+
Options:
|
|
183
|
+
- `-v, --verbose` - Show step-by-step details
|
|
184
|
+
|
|
185
|
+
Output format:
|
|
186
|
+
- Text: `beacon: lit <uri>` or `beacon: unlit`.
|
|
187
|
+
|
|
188
|
+
Error conditions:
|
|
189
|
+
- Invalid target format.
|
|
190
|
+
- Clone/probe failure.
|
|
191
|
+
|
|
192
|
+
Examples:
|
|
193
|
+
- `vit beacon https://github.com/org/repo.git`
|
|
194
|
+
- `vit beacon vit:github.com/org/repo`
|
|
195
|
+
|
|
196
|
+
## Human-Only Commands
|
|
197
|
+
|
|
198
|
+
### `vit login <handle>`
|
|
199
|
+
Usage: `vit login <handle>`
|
|
200
|
+
|
|
201
|
+
Options:
|
|
202
|
+
- `-v, --verbose` - Show discovery details
|
|
203
|
+
- `--force` - Force re-login, skip session validation
|
|
204
|
+
|
|
205
|
+
Output format:
|
|
206
|
+
- Text prompts and login status (`DID`, `Logged in`).
|
|
207
|
+
|
|
208
|
+
Error conditions:
|
|
209
|
+
- OAuth timeout/failure.
|
|
210
|
+
- Callback or token exchange errors.
|
|
211
|
+
|
|
212
|
+
Notes:
|
|
213
|
+
- No `requireNotAgent()` gate in code.
|
|
214
|
+
- Requires browser OAuth interaction.
|
|
215
|
+
|
|
216
|
+
Example:
|
|
217
|
+
- `vit login alice.bsky.social --force`
|
|
218
|
+
|
|
219
|
+
### `vit adopt <beacon> [name]`
|
|
220
|
+
Usage: `vit adopt <beacon> [name]`
|
|
221
|
+
|
|
222
|
+
Arguments:
|
|
223
|
+
- `<beacon>`
|
|
224
|
+
- `[name]` (optional directory name)
|
|
225
|
+
|
|
226
|
+
Options:
|
|
227
|
+
- `-v, --verbose` - Show step-by-step details
|
|
228
|
+
|
|
229
|
+
Gate:
|
|
230
|
+
- `requireNotAgent()`
|
|
231
|
+
|
|
232
|
+
Output format:
|
|
233
|
+
- Text summary including resolved beacon, destination directory, and next step.
|
|
234
|
+
|
|
235
|
+
Error conditions:
|
|
236
|
+
- Running in an agent context.
|
|
237
|
+
- Target directory already exists.
|
|
238
|
+
- Invalid beacon input.
|
|
239
|
+
- Fork/clone command failure.
|
|
240
|
+
|
|
241
|
+
Examples:
|
|
242
|
+
- `vit adopt vit:github.com/org/repo`
|
|
243
|
+
- `vit adopt https://github.com/org/repo my-copy`
|
|
244
|
+
|
|
245
|
+
### `vit vet <ref>`
|
|
246
|
+
Usage: `vit vet <ref>`
|
|
247
|
+
|
|
248
|
+
Options:
|
|
249
|
+
- `--did <did>` - Override DID
|
|
250
|
+
- `--trust` - Mark cap as trusted
|
|
251
|
+
- `-v, --verbose` - Show step-by-step details
|
|
252
|
+
|
|
253
|
+
Gate:
|
|
254
|
+
- `requireNotAgent()`
|
|
255
|
+
|
|
256
|
+
Output format:
|
|
257
|
+
- Text review output for a matching cap.
|
|
258
|
+
- With `--trust`, writes trust record and prints `trusted: <ref>`.
|
|
259
|
+
|
|
260
|
+
Error conditions:
|
|
261
|
+
- Running in an agent context.
|
|
262
|
+
- Invalid ref format.
|
|
263
|
+
- No DID configured.
|
|
264
|
+
- No beacon set.
|
|
265
|
+
- No matching cap for beacon/ref.
|
|
266
|
+
- Session restore/auth failure.
|
|
267
|
+
|
|
268
|
+
Examples:
|
|
269
|
+
- `vit vet fast-cache-invalidation`
|
|
270
|
+
- `vit vet fast-cache-invalidation --trust`
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: using-vit
|
|
3
|
+
description: >-
|
|
4
|
+
Helps coding agents use vit to discover, follow, skim, and ship software
|
|
5
|
+
capabilities (caps) over ATProto. Activates when the user mentions vit,
|
|
6
|
+
beacons, caps, shipping, skimming, following, vetting, or social coding.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 1. Overview
|
|
10
|
+
|
|
11
|
+
vit is a Bun CLI for social software capabilities. Agents use it to initialize projects, follow accounts, skim caps from followed accounts, and ship new caps. Some commands (login, adopt, vet) require human interaction - the agent should tell the user to run those in their terminal.
|
|
12
|
+
|
|
13
|
+
## 2. Prerequisites
|
|
14
|
+
|
|
15
|
+
Dependency chain: `login → init → follow → skim/ship`.
|
|
16
|
+
|
|
17
|
+
`login` is human-only. The agent starts at `init`. Use `vit doctor` to check beacon status before running discovery or shipping commands.
|
|
18
|
+
|
|
19
|
+
## 3. Agent Workflow
|
|
20
|
+
|
|
21
|
+
1. Run `vit init` to initialize `.vit/` directory (derives beacon from git remotes).
|
|
22
|
+
2. Run `vit follow <handle>` to follow accounts whose caps you want to see.
|
|
23
|
+
3. Run `vit skim --json` to read caps from followed accounts filtered by beacon.
|
|
24
|
+
4. Run `vit ship --title <t> --description <d> --ref <ref> <<'EOF' ... EOF` to publish a cap (body on stdin).
|
|
25
|
+
|
|
26
|
+
Handoffs:
|
|
27
|
+
- If no DID is configured, tell the user to run `vit login <handle>`.
|
|
28
|
+
- If the user wants to review a cap, tell them to run `vit vet <ref>` in their terminal.
|
|
29
|
+
|
|
30
|
+
## 4. Commands the Agent Runs
|
|
31
|
+
|
|
32
|
+
### Agent-only commands
|
|
33
|
+
|
|
34
|
+
### `vit init`
|
|
35
|
+
- Description: Initialize `.vit/` and set beacon data for the current repo.
|
|
36
|
+
- Usage: `vit init`
|
|
37
|
+
- Key flags: `--beacon <url>`, `--verbose`
|
|
38
|
+
- Output: text, including `beacon: vit:...` on success.
|
|
39
|
+
- Common errors: no git remote.
|
|
40
|
+
|
|
41
|
+
### `vit skim`
|
|
42
|
+
- Description: Read caps from followed accounts and self, filtered by current beacon.
|
|
43
|
+
- Usage: `vit skim`
|
|
44
|
+
- Key flags: `--handle <handle>`, `--did <did>`, `--limit <n>` (default 25), `--json`, `--verbose`
|
|
45
|
+
- Output: prefer `--json` (JSON array of ATProto records); text mode prints `ref`, `title`, and `description` per cap.
|
|
46
|
+
- Common errors: no DID, no beacon, no following, session expired.
|
|
47
|
+
|
|
48
|
+
### `vit remix <ref>`
|
|
49
|
+
- Description: Derive a vetted cap into the current codebase and output an implementation plan.
|
|
50
|
+
- Usage: `vit remix <ref>`
|
|
51
|
+
- Key flags: `--did <did>`, `--verbose`
|
|
52
|
+
- Output: text pretext block with cap content to stdout (consumed by the calling agent).
|
|
53
|
+
- Trust gate: requires the ref to be trusted (via `vit vet <ref> --trust`) OR dangerous-accept to be active. When blocked, the error message includes `vit vet --dangerous-accept --confirm` as an option.
|
|
54
|
+
- Common errors: not running inside agent, invalid ref, no DID, no beacon, cap not trusted, cap not found.
|
|
55
|
+
|
|
56
|
+
### `vit learn <ref>`
|
|
57
|
+
- Description: Install a skill from the network into your skill directory.
|
|
58
|
+
- Usage: `vit learn <ref>`
|
|
59
|
+
- Key flags: `--did <did>`, `--user`, `--verbose`
|
|
60
|
+
- Output: confirmation of install location.
|
|
61
|
+
- Trust gate: requires the ref to be trusted (via `vit vet <ref> --trust`) OR dangerous-accept to be active. `--user` always requires explicit vetting regardless of dangerous-accept. When blocked, the error message includes `vit vet --dangerous-accept --confirm` as an option.
|
|
62
|
+
- Common errors: not running inside agent, invalid skill ref, no DID, skill not trusted, skill not found.
|
|
63
|
+
|
|
64
|
+
### Agent-usable commands
|
|
65
|
+
|
|
66
|
+
### `vit doctor`
|
|
67
|
+
- Description: Read-only diagnostic for install and beacon status.
|
|
68
|
+
- Usage: `vit doctor`
|
|
69
|
+
- Key flags: none.
|
|
70
|
+
- Output: text status lines for install and beacon.
|
|
71
|
+
- Common errors: generic runtime or config read failures.
|
|
72
|
+
|
|
73
|
+
### `vit config [action] [key] [value]`
|
|
74
|
+
- Description: Read and mutate user config values.
|
|
75
|
+
- Usage: `vit config [action] [key] [value]`
|
|
76
|
+
- Key flags: none.
|
|
77
|
+
- Output: `key=value` lines for `list`; silent success for `set` and `delete`.
|
|
78
|
+
- Common errors: invalid action; missing arguments for `set` or `delete`.
|
|
79
|
+
|
|
80
|
+
### `vit follow <handle>`
|
|
81
|
+
- Description: Add an account to `.vit/following.json`.
|
|
82
|
+
- Usage: `vit follow <handle>`
|
|
83
|
+
- Key flags: `--did <did>`, `-v, --verbose`
|
|
84
|
+
- Output: `following <handle> (<did>)`.
|
|
85
|
+
- Common errors: no DID, duplicate handle, handle resolution failure.
|
|
86
|
+
|
|
87
|
+
### `vit unfollow <handle>`
|
|
88
|
+
- Description: Remove an account from `.vit/following.json`.
|
|
89
|
+
- Usage: `vit unfollow <handle>`
|
|
90
|
+
- Key flags: `-v, --verbose`
|
|
91
|
+
- Output: `unfollowed <handle>`.
|
|
92
|
+
- Common errors: not following that handle.
|
|
93
|
+
|
|
94
|
+
### `vit following`
|
|
95
|
+
- Description: List followed accounts for the current project.
|
|
96
|
+
- Usage: `vit following`
|
|
97
|
+
- Key flags: `-v, --verbose`
|
|
98
|
+
- Output: `handle (did)` lines or `no followings`.
|
|
99
|
+
- Common errors: malformed following file content.
|
|
100
|
+
|
|
101
|
+
### `vit ship`
|
|
102
|
+
- Description: Publish a cap to ATProto from stdin body input.
|
|
103
|
+
- Usage: `vit ship --title <title> --description <description> --ref <ref> [--recap <ref>] <<'EOF' ... EOF`
|
|
104
|
+
- Key flags: required `--title <title>`, `--description <description>`, `--ref <ref>`; optional `--recap <ref>`, `--did <did>`, `-v, --verbose`
|
|
105
|
+
- Input: cap body is required via stdin (pipe or heredoc).
|
|
106
|
+
- Gate: agent-only (`requireAgent()`). Ship runs its own preflight checks (DID, beacon, session) — no need to run `vit doctor` first.
|
|
107
|
+
- Output: `shipped: <ref>` and `uri:` on success. Use `--verbose` for full JSON.
|
|
108
|
+
- Common errors: not running in an agent context, missing stdin body, no DID, invalid ref, recap ref not found, session expired.
|
|
109
|
+
|
|
110
|
+
#### Shipping guide
|
|
111
|
+
|
|
112
|
+
When the user says "ship it", "vit ship", or asks you to publish a cap for work you've done:
|
|
113
|
+
|
|
114
|
+
1. **Identify what to ship** — summarize the feature or fix you just completed. A cap describes a self-contained capability, not a commit message.
|
|
115
|
+
2. **Craft the fields:**
|
|
116
|
+
- `--title`: concise noun phrase (2-5 words), e.g. "Skim Handle Attribution"
|
|
117
|
+
- `--description`: one sentence explaining the value, e.g. "vit skim shows which handle published each cap"
|
|
118
|
+
- `--ref`: three lowercase words with dashes, memorable slug for discovery, e.g. "skim-handle-attribution"
|
|
119
|
+
- `--recap <ref>`: only if this cap derives from another cap (e.g. after `vit remix`)
|
|
120
|
+
- **body (stdin)**: a short paragraph explaining what the cap does and how it works — written for another developer or agent who might adopt it
|
|
121
|
+
3. **Run the command:**
|
|
122
|
+
```
|
|
123
|
+
vit ship --title "..." --description "..." --ref "..." <<'EOF'
|
|
124
|
+
... body ...
|
|
125
|
+
EOF
|
|
126
|
+
```
|
|
127
|
+
4. Ship will validate prerequisites (DID, beacon, session) and give actionable errors if anything is missing.
|
|
128
|
+
|
|
129
|
+
### `vit beacon <target>`
|
|
130
|
+
- Description: Probe a remote repo and report whether its beacon is lit.
|
|
131
|
+
- Usage: `vit beacon <target>`
|
|
132
|
+
- Key flags: `-v, --verbose`
|
|
133
|
+
- Output: `beacon: lit <uri>` or `beacon: unlit`.
|
|
134
|
+
- Common errors: invalid target URL or clone/probe failure.
|
|
135
|
+
|
|
136
|
+
### `vit explore`
|
|
137
|
+
- Description: Query the public explore index at explore.v-it.org. No authentication required.
|
|
138
|
+
- Subcommands:
|
|
139
|
+
- `vit explore caps` — list recent caps. Flags: `--beacon <beacon>` (use `.` for current project), `--limit <n>`, `--cursor <id>`, `--json`
|
|
140
|
+
- `vit explore skills` — list published skills. Flags: `--tag <tag>`, `--limit <n>`, `--cursor <id>`, `--json`
|
|
141
|
+
- `vit explore beacons` — list active beacons. Flags: `--json`
|
|
142
|
+
- `vit explore vouches` — list vouches for a cap. Flags: `--cap <uri>` or `--ref <ref>`, `--beacon <beacon>` (narrows ref search), `--json`
|
|
143
|
+
- `vit explore stats` — network-wide stats. Flags: `--json`
|
|
144
|
+
- All subcommands accept `--explore-url <url>` to override the API endpoint (also via `VIT_EXPLORE_URL` env var).
|
|
145
|
+
- Discovery hierarchy: `explore` (indexed, instant) > `scan` (Jetstream replay, slow) > `skim` (followed accounts only).
|
|
146
|
+
- Use cases: Find caps by beacon, discover skills by tag, check network health, look up vouches before adopting.
|
|
147
|
+
|
|
148
|
+
### `vit scan`
|
|
149
|
+
- Description: Discover cap and skill publishers across the network via Jetstream replay.
|
|
150
|
+
- Usage: `vit scan [options]`
|
|
151
|
+
- Key flags:
|
|
152
|
+
- `--days <n>` — number of days to replay (default: 7)
|
|
153
|
+
- `--beacon <beacon>` — filter by beacon (caps only)
|
|
154
|
+
- `--skills` — show only skill publishers
|
|
155
|
+
- `--caps` — show only cap publishers
|
|
156
|
+
- `--tag <tag>` — filter skills by tag
|
|
157
|
+
- `-v, --verbose` — show each event as it arrives
|
|
158
|
+
- `--jetstream <url>` — custom Jetstream URL (default: `VIT_JETSTREAM_URL` env or built-in)
|
|
159
|
+
- Output: Publisher summaries sorted by activity count. Each entry shows handle, cap/skill counts, beacons, tags, and last active date.
|
|
160
|
+
- Read-only: Replays Jetstream events with a time-bounded timeout (2–10 minutes based on `--days`). Does not write any data.
|
|
161
|
+
- Use cases: Find active publishers to follow, discover beacons with recent activity, identify skill authors by tag.
|
|
162
|
+
|
|
163
|
+
## 5. Commands the Agent Must NOT Run
|
|
164
|
+
|
|
165
|
+
These commands require human interaction. Tell the user exactly what to run:
|
|
166
|
+
- `vit login <handle>` - Tell user: "Run `vit login <handle>` in your terminal to authenticate via browser OAuth."
|
|
167
|
+
- `vit adopt <beacon>` - Tell user: "Run `vit adopt <beacon>` in your terminal to fork and clone a project."
|
|
168
|
+
- `vit vet <ref>` - Human review command. Tell the user to run it in their terminal.
|
|
169
|
+
**Exception: sandboxed sub-agent vetting.** If you are a dedicated sub-agent
|
|
170
|
+
spawned specifically to evaluate a cap or skill, you can vet directly:
|
|
171
|
+
`vit vet <ref> --trust --confirm`. Only do this if:
|
|
172
|
+
1. You are running as an isolated sub-agent (not the primary agent)
|
|
173
|
+
2. You have read and evaluated the full cap/skill content
|
|
174
|
+
3. Your parent agent specifically tasked you with vetting
|
|
175
|
+
|
|
176
|
+
Do NOT use --confirm as the primary agent. The vetting step exists so a
|
|
177
|
+
separate context evaluates the content independently.
|
|
178
|
+
- `vit vet --dangerous-accept` - Human only. Permanently disables vet gate for the project. Tell the user if they want autonomous mode.
|
|
179
|
+
|
|
180
|
+
These are human-only because they call `requireNotAgent()` (or require browser interaction for login) and will fail or be inappropriate when run by an agent.
|
|
181
|
+
|
|
182
|
+
## 6. Error Handling
|
|
183
|
+
|
|
184
|
+
| Error | Cause | Resolution |
|
|
185
|
+
|-------|-------|------------|
|
|
186
|
+
| `no DID configured` | User hasn't logged in | Tell user to run `vit login <handle>` |
|
|
187
|
+
| `no beacon set` | `.vit/` not initialized or no beacon | Run `vit init` |
|
|
188
|
+
| `no followings` / empty skim results | No accounts followed | Run `vit follow <handle>` |
|
|
189
|
+
| Session errors (deleted/expired) | OAuth session invalid | Tell user to run `vit login <handle>` |
|
|
190
|
+
| Invalid ref format | Ref doesn't match `^[a-z]+-[a-z]+-[a-z]+$` | Use three lowercase words joined by hyphens |
|
|
191
|
+
|
|
192
|
+
## 7. Data Files
|
|
193
|
+
|
|
194
|
+
- `.vit/config.json` - `{ "beacon": "vit:host/org/repo" }`
|
|
195
|
+
- `.vit/following.json` - `[{ "handle": "...", "did": "...", "followedAt": "..." }]`
|
|
196
|
+
- `.vit/caps.jsonl` - Append-only shipped cap log
|
|
197
|
+
- `.vit/trusted.jsonl` - Append-only vetted cap log
|
|
198
|
+
- `.vit/dangerous-accept` - Project-wide vet bypass flag (written by `vit vet --dangerous-accept --confirm`)
|
|
199
|
+
- `~/.config/vit/vit.json` - User config with `did`, timestamps
|
|
200
|
+
|
|
201
|
+
## 8. Reference
|
|
202
|
+
|
|
203
|
+
See `COMMANDS.md` for full option details and examples.
|
package/src/cli.js
CHANGED
|
@@ -19,9 +19,9 @@ import registerSkim from './cmd/skim.js';
|
|
|
19
19
|
import registerVet from './cmd/vet.js';
|
|
20
20
|
import registerVouch from './cmd/vouch.js';
|
|
21
21
|
import registerFollow from './cmd/follow.js';
|
|
22
|
-
import registerSetup from './cmd/setup.js';
|
|
23
22
|
import registerHack from './cmd/hack.js';
|
|
24
23
|
import registerLink from './cmd/link.js';
|
|
24
|
+
import registerInbox from './cmd/inbox.js';
|
|
25
25
|
|
|
26
26
|
const program = new Command();
|
|
27
27
|
program
|
|
@@ -45,8 +45,8 @@ registerRemix(program);
|
|
|
45
45
|
registerVet(program);
|
|
46
46
|
registerVouch(program);
|
|
47
47
|
registerFollow(program);
|
|
48
|
-
registerSetup(program);
|
|
49
48
|
registerHack(program);
|
|
50
49
|
registerLink(program);
|
|
50
|
+
registerInbox(program);
|
|
51
51
|
|
|
52
52
|
export { program };
|
package/src/cmd/beacon.js
CHANGED
|
@@ -52,7 +52,8 @@ export default function register(program) {
|
|
|
52
52
|
if (beacon) {
|
|
53
53
|
console.log(`${mark} beacon: lit ${beacon}`);
|
|
54
54
|
} else {
|
|
55
|
-
console.log(`${mark} beacon: unlit
|
|
55
|
+
console.log(`${mark} beacon: unlit — this repo hasn't initialized vit yet.`);
|
|
56
|
+
console.log("the maintainer can light the beacon by running 'vit init' inside the repo.");
|
|
56
57
|
}
|
|
57
58
|
} catch (err) {
|
|
58
59
|
console.error(err instanceof Error ? err.message : String(err));
|
package/src/cmd/config.js
CHANGED
|
@@ -23,7 +23,12 @@ export default function register(program) {
|
|
|
23
23
|
// Default to list when no action given
|
|
24
24
|
if (!action || action === 'list') {
|
|
25
25
|
const config = loadConfig();
|
|
26
|
-
|
|
26
|
+
const scalars = [...getScalars(config)];
|
|
27
|
+
if (scalars.length === 0) {
|
|
28
|
+
console.log("no configuration set. run 'vit login <handle>' to get started.");
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
for (const [k, v] of scalars) {
|
|
27
32
|
console.log(`${k}=${v}`);
|
|
28
33
|
}
|
|
29
34
|
return;
|
package/src/cmd/doctor.js
CHANGED
|
@@ -41,10 +41,6 @@ export default function register(program) {
|
|
|
41
41
|
async function checkHealth(opts) {
|
|
42
42
|
try {
|
|
43
43
|
const config = loadConfig();
|
|
44
|
-
const setup = {
|
|
45
|
-
done: !!config.setup_at,
|
|
46
|
-
at: config.setup_at ? new Date(config.setup_at * 1000).toISOString() : null,
|
|
47
|
-
};
|
|
48
44
|
let installType = 'not on PATH';
|
|
49
45
|
let vitPath = which(name);
|
|
50
46
|
let installPath = vitPath || null;
|
|
@@ -55,13 +51,6 @@ export default function register(program) {
|
|
|
55
51
|
let blueskyOk = false;
|
|
56
52
|
let pds = null;
|
|
57
53
|
|
|
58
|
-
if (config.setup_at) {
|
|
59
|
-
const when = new Date(config.setup_at * 1000).toISOString();
|
|
60
|
-
if (!opts.json) console.log(`${mark} setup: ok (${when})`);
|
|
61
|
-
} else {
|
|
62
|
-
if (!opts.json) console.log(`${mark} setup: not done (run ${name} setup)`);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
54
|
if (!vitPath) {
|
|
66
55
|
installType = 'not on PATH';
|
|
67
56
|
if (!opts.json) console.log(`${mark} install: not on PATH`);
|
|
@@ -88,15 +77,16 @@ export default function register(program) {
|
|
|
88
77
|
if (projConfig.beacon) {
|
|
89
78
|
if (!opts.json) console.log(`${mark} beacon: ${projConfig.beacon}`);
|
|
90
79
|
} else {
|
|
91
|
-
if (!opts.json) console.log(`${mark} beacon: not set`);
|
|
80
|
+
if (!opts.json) console.log(`${mark} beacon: not set (run vit init)`);
|
|
92
81
|
}
|
|
93
82
|
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
|
|
83
|
+
const projectSkillPath = join(process.cwd(), '.claude', 'skills', 'using-vit', 'SKILL.md');
|
|
84
|
+
const userSkillPath = join(homedir(), '.claude', 'skills', 'using-vit', 'SKILL.md');
|
|
85
|
+
skillInstalled = existsSync(projectSkillPath) || existsSync(userSkillPath);
|
|
86
|
+
if (skillInstalled) {
|
|
97
87
|
if (!opts.json) console.log(`${mark} skill: ok (using-vit)`);
|
|
98
88
|
} else {
|
|
99
|
-
if (!opts.json) console.log(`${mark} skill: not installed (
|
|
89
|
+
if (!opts.json) console.log(`${mark} skill: not installed (reinstall vit)`);
|
|
100
90
|
}
|
|
101
91
|
|
|
102
92
|
// Report installed skills
|
|
@@ -162,7 +152,6 @@ export default function register(program) {
|
|
|
162
152
|
|
|
163
153
|
if (opts.json) {
|
|
164
154
|
jsonOk({
|
|
165
|
-
setup,
|
|
166
155
|
install: { type: installType, path: installPath },
|
|
167
156
|
beacon,
|
|
168
157
|
skill: skillInstalled,
|
package/src/cmd/explore.js
CHANGED
|
@@ -212,6 +212,7 @@ export default function register(program) {
|
|
|
212
212
|
.command('caps')
|
|
213
213
|
.description('List recent caps from the explore index')
|
|
214
214
|
.option('--beacon <beacon>', 'Filter by beacon')
|
|
215
|
+
.option('--kind <kind>', 'Filter by cap kind (e.g. request, feat, fix)')
|
|
215
216
|
.option('--limit <n>', 'Limit number of caps')
|
|
216
217
|
.option('--cursor <id>', 'Pagination cursor')
|
|
217
218
|
.option('--json', 'Output as JSON')
|
|
@@ -240,6 +241,7 @@ export default function register(program) {
|
|
|
240
241
|
|
|
241
242
|
const url = new URL('/api/caps', baseUrl);
|
|
242
243
|
if (beacon) url.searchParams.set('beacon', beacon);
|
|
244
|
+
if (opts.kind) url.searchParams.set('kind', opts.kind);
|
|
243
245
|
if (opts.limit) url.searchParams.set('limit', opts.limit);
|
|
244
246
|
if (opts.cursor) url.searchParams.set('cursor', opts.cursor);
|
|
245
247
|
|
|
@@ -255,6 +257,8 @@ export default function register(program) {
|
|
|
255
257
|
console.log(`${brand} explore caps`);
|
|
256
258
|
if (!data.caps?.length) {
|
|
257
259
|
console.log('no caps found.');
|
|
260
|
+
console.log('the network is just getting started. ship a cap or skill to be one of the first.');
|
|
261
|
+
console.log("try 'vit scan' for real-time discovery — the explore index may still be catching up.");
|
|
258
262
|
return;
|
|
259
263
|
}
|
|
260
264
|
|
|
@@ -310,6 +314,7 @@ export default function register(program) {
|
|
|
310
314
|
console.log(`${brand} explore skills`);
|
|
311
315
|
if (!data.skills?.length) {
|
|
312
316
|
console.log('no skills found.');
|
|
317
|
+
console.log('the network is just getting started. ship a cap or skill to be one of the first.');
|
|
313
318
|
return;
|
|
314
319
|
}
|
|
315
320
|
|
|
@@ -357,6 +362,7 @@ export default function register(program) {
|
|
|
357
362
|
console.log(`${brand} explore beacons`);
|
|
358
363
|
if (!data.beacons?.length) {
|
|
359
364
|
console.log('no beacons found.');
|
|
365
|
+
console.log('the network is just getting started. ship a cap or skill to be one of the first.');
|
|
360
366
|
return;
|
|
361
367
|
}
|
|
362
368
|
|
package/src/cmd/follow.js
CHANGED
|
@@ -117,10 +117,13 @@ export default function register(program) {
|
|
|
117
117
|
const list = readFollowing();
|
|
118
118
|
if (list.length === 0) {
|
|
119
119
|
if (opts.json) {
|
|
120
|
-
jsonOk({ following: [] });
|
|
120
|
+
jsonOk({ following: [], hint: "run 'vit follow <handle>' to add accounts" });
|
|
121
121
|
return;
|
|
122
122
|
}
|
|
123
|
-
console.log('
|
|
123
|
+
console.log('not following anyone yet.');
|
|
124
|
+
console.log('');
|
|
125
|
+
console.log("run 'vit follow <handle>' to start seeing what people are shipping.");
|
|
126
|
+
console.log("try 'vit scan' to discover active publishers on the network.");
|
|
124
127
|
return;
|
|
125
128
|
}
|
|
126
129
|
if (opts.json) {
|