vit 0.1.0 → 0.1.3

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 CHANGED
@@ -1,116 +1,94 @@
1
- [![v̇it](https://v-it.org/badge/vit-enabled.svg)](https://v-it.org)
2
- [![open source is social](https://v-it.org/badge/social-open-source.svg)](https://v-it.org)
1
+ <p align="center">
2
+ <a href="https://v-it.org">
3
+ <img src="docs/brand/vit-wordmark.svg" alt="vit" height="48">
4
+ </a>
5
+ </p>
3
6
 
4
- # v̇it manifesto
7
+ <p align="center">
8
+ <strong>open source is social</strong>
9
+ </p>
5
10
 
6
- vit is a **social system for personalized software** where the unit of exchange is not pull requests, not screenshots, not diffs, not even git.
11
+ <p align="center">
12
+ <a href="https://v-it.org"><img src="https://v-it.org/badge/vit-enabled.svg" alt="vit enabled"></a>
13
+ <a href="https://v-it.org"><img src="https://v-it.org/badge/social-open-source.svg" alt="open source is social"></a>
14
+ </p>
7
15
 
8
- the unit of exchange is **capability**: structured, attributable, auditable capabilities, published into a network where other builders (and their agents) can **discover it, remix it into their own codebases, vet it locally, vouch for it publicly, and ship new capabilities back into the stream**.
16
+ ---
9
17
 
10
- vit is how software becomes *organic* and *yours*.
18
+ vit is a CLI where you and your coding agent discover, evaluate, and share software capabilities across projects — published to your identity on the AT Protocol. think of it as a social network for code improvements, where humans vet and agents execute.
11
19
 
12
- ## install
20
+ **[get started](https://v-it.org/start/)** · **[read the doctrine](https://v-it.org/doctrine/)** · **[explore the network](https://explore.v-it.org)**
13
21
 
14
- ```bash
15
- npx vit doctor
16
- ```
22
+ ## quick start
17
23
 
18
- or install globally:
24
+ **you run this** (terminal):
19
25
 
20
26
  ```bash
21
27
  npm install -g vit
28
+ vit setup
29
+ vit login your-handle.bsky.social
22
30
  ```
23
31
 
24
- for development:
32
+ then open your coding agent (Claude Code, Codex CLI, or Gemini CLI) — it already knows how to use vit because `setup` installed the skill. your agent runs `vit init` to connect your project to the network, then `vit skim` to discover what others have built.
25
33
 
26
- ```bash
27
- make install
28
- ```
34
+ **[full getting started guide →](https://v-it.org/start/)**
29
35
 
30
- ## terminology
36
+ ## the verbs
31
37
 
32
- - **beacon** — canonical project identity derived from normalized git URLs; anchors all project-scoped vit activity; stored in `.vit/config.json`
33
- - **init** — initialize `.vit/` in the current repo and validate beacon configuration
34
- - **doctor** — verify system environment and project configuration
35
- - **adopt** — adopt an existing project by its beacon; forks or clones and initializes locally
36
- - **follow** — subscribe to ATProto handles for cap discovery
37
- - **skim** — read caps from followed agents and the beacon repo
38
- - **vet** — run local evaluation on a cap in a sandbox environment
39
- - **vouch** — publicly endorse a vetted cap
40
- - **remix** — derive a vetted cap into the local codebase and create an implementation plan
41
- - **ship** — publish a new cap to your feed (or a recap when sourced from a remix)
38
+ four core verbs drive the loop:
42
39
 
43
- ## beacon
40
+ - **skim** — browse capabilities from people you follow
41
+ - **vet** — evaluate a capability in a sandbox before trusting it
42
+ - **remix** — adapt a vetted capability into your codebase
43
+ - **ship** — publish a new capability to the network
44
44
 
45
- probe a remote repo for its beacon.
45
+ and as you go deeper: **vouch** (stake your reputation), **learn** (install agent skills), **follow** (curate your feed), **scan** (discover publishers).
46
46
 
47
- ```bash
48
- vit beacon https://github.com/solpbc/vit.git
49
- vit beacon vit:github.com/solpbc/vit
50
- ```
51
-
52
- | option | description |
53
- |---|---|
54
- | `-v, --verbose` | show step-by-step details |
47
+ see [COMMANDS.md](COMMANDS.md) for the full command reference and [VOCAB.md](VOCAB.md) for the complete vocabulary.
55
48
 
56
- ## login
57
-
58
- log in to Bluesky via browser-based OAuth.
59
-
60
- ### usage
49
+ ## install
61
50
 
62
51
  ```bash
63
- vit login alice.bsky.social
52
+ npm install -g vit
64
53
  ```
65
54
 
66
- this will:
67
- 1. start a temporary localhost callback server
68
- 2. open your browser to the Bluesky authorization page
69
- 3. after you approve, print your DID
70
- 4. save your DID to `vit.json` and OAuth session to `session.json`
71
-
72
- ### options
73
-
74
- - `-v, --verbose` - show discovery and protocol details
75
- - `--force` - force re-login, skip session validation
76
-
77
- ## firehose
55
+ or try it out without installing:
78
56
 
79
- listen to Bluesky Jetstream for custom record events.
57
+ ```bash
58
+ npx vit doctor
59
+ ```
80
60
 
81
- ### usage
61
+ for contributors working on vit itself:
82
62
 
83
63
  ```bash
84
- vit firehose
64
+ make install
85
65
  ```
86
66
 
87
- ### options
67
+ ## works with
88
68
 
89
- - `--did <did>` - filter by DID (reads saved DID from config if not provided)
90
- - `--collection <nsid>` - collection NSID to filter (default: `org.v-it.cap`)
91
- - `-v, --verbose` - show full JSON for each event
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 (setup, login, vet), others are for your agent (skim, remix, ship).
92
70
 
93
- ## ship
71
+ ## reference
94
72
 
95
- write a cap (org.v-it.cap record) to the authenticated PDS.
73
+ - **[COMMANDS.md](COMMANDS.md)** — full command reference
74
+ - **[VOCAB.md](VOCAB.md)** — terminology: capabilities, beacons, skills, and the verbs that drive the workflow
75
+ - **[ARCHITECTURE.md](ARCHITECTURE.md)** — technical design: ATProto record types, cap lexicons, and system internals
96
76
 
97
- ```bash
98
- vit ship "hello from caps"
99
- ```
77
+ ## contributing
100
78
 
101
- | option | description |
102
- |---|---|
103
- | `--did <did>` | DID to use (default: from config) |
79
+ contributions to vit happen through vit itself — you ship capabilities, not pull requests. this isn't a policy; it's the product working as designed. your contribution gets your identity, provenance, and reputation attached to it on the network.
104
80
 
105
- ## skim
81
+ read [CONTRIBUTING.md](CONTRIBUTING.md) for the full setup and the skim/vet/remix/ship loop.
106
82
 
107
- list caps from the authenticated PDS.
83
+ ## links
108
84
 
109
- ```bash
110
- vit skim
111
- ```
85
+ - **[homepage](https://v-it.org)** — what vit is and why it exists
86
+ - **[getting started](https://v-it.org/start/)** — prerequisites, setup, and first run
87
+ - **[doctrine](https://v-it.org/doctrine/)** — the philosophy behind social open source
88
+ - **[explore](https://explore.v-it.org)** — browse live capabilities, skills, and projects on the network
89
+ - **[lexicons](https://lexicon.garden/nsid/org.v-it.cap)** — published AT Protocol schemas (cap, skill, vouch)
90
+ - **[contributing](CONTRIBUTING.md)** — how to contribute to vit itself
91
+
92
+ ## license
112
93
 
113
- | option | description |
114
- |---|---|
115
- | `--did <did>` | DID to use (default: from config) |
116
- | `--limit <n>` | max records to return (default: 25) |
94
+ [MIT](LICENSE) — built by [sol pbc](https://solpbc.org), a public benefit corporation.
package/bin/vit.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- // SPDX-License-Identifier: AGPL-3.0-only
2
+ // SPDX-License-Identifier: MIT
3
3
  // Copyright (c) 2026 sol pbc
4
4
 
5
5
  import { program } from '../src/cli.js';
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "vit",
3
- "version": "0.1.0",
3
+ "version": "0.1.3",
4
4
  "description": "Social toolkit for personalized software",
5
- "license": "AGPL-3.0-only",
5
+ "license": "MIT",
6
6
  "bin": {
7
7
  "vit": "bin/vit.js"
8
8
  },
@@ -11,6 +11,7 @@
11
11
  "src/"
12
12
  ],
13
13
  "type": "module",
14
+ "scripts": {},
14
15
  "engines": {
15
16
  "node": ">=20.0.0"
16
17
  },
@@ -27,5 +28,8 @@
27
28
  "env-paths": "4.0.0",
28
29
  "isomorphic-git": "1.37.0",
29
30
  "memfs": "4.56.10"
31
+ },
32
+ "devDependencies": {
33
+ "marked": "^17.0.4"
30
34
  }
31
35
  }
package/src/cli.js CHANGED
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: AGPL-3.0-only
1
+ // SPDX-License-Identifier: MIT
2
2
  // Copyright (c) 2026 sol pbc
3
3
 
4
4
  import { Command } from 'commander';
@@ -7,9 +7,12 @@ import registerAdopt from './cmd/adopt.js';
7
7
  import registerBeacon from './cmd/beacon.js';
8
8
  import registerConfig from './cmd/config.js';
9
9
  import registerDoctor from './cmd/doctor.js';
10
+ import registerExplore from './cmd/explore.js';
10
11
  import registerInit from './cmd/init.js';
12
+ import registerLearn from './cmd/learn.js';
11
13
  import registerLogin from './cmd/login.js';
12
14
  import registerFirehose from './cmd/firehose.js';
15
+ import registerScan from './cmd/scan.js';
13
16
  import registerRemix from './cmd/remix.js';
14
17
  import registerShip from './cmd/ship.js';
15
18
  import registerSkim from './cmd/skim.js';
@@ -17,6 +20,8 @@ import registerVet from './cmd/vet.js';
17
20
  import registerVouch from './cmd/vouch.js';
18
21
  import registerFollow from './cmd/follow.js';
19
22
  import registerSetup from './cmd/setup.js';
23
+ import registerHack from './cmd/hack.js';
24
+ import registerLink from './cmd/link.js';
20
25
 
21
26
  const program = new Command();
22
27
  program
@@ -28,9 +33,12 @@ registerAdopt(program);
28
33
  registerBeacon(program);
29
34
  registerConfig(program);
30
35
  registerDoctor(program);
36
+ registerExplore(program);
31
37
  registerInit(program);
38
+ registerLearn(program);
32
39
  registerLogin(program);
33
40
  registerFirehose(program);
41
+ registerScan(program);
34
42
  registerShip(program);
35
43
  registerSkim(program);
36
44
  registerRemix(program);
@@ -38,5 +46,7 @@ registerVet(program);
38
46
  registerVouch(program);
39
47
  registerFollow(program);
40
48
  registerSetup(program);
49
+ registerHack(program);
50
+ registerLink(program);
41
51
 
42
52
  export { program };
package/src/cmd/adopt.js CHANGED
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: AGPL-3.0-only
1
+ // SPDX-License-Identifier: MIT
2
2
  // Copyright (c) 2026 sol pbc
3
3
 
4
4
  import { existsSync } from 'node:fs';
package/src/cmd/beacon.js CHANGED
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: AGPL-3.0-only
1
+ // SPDX-License-Identifier: MIT
2
2
  // Copyright (c) 2026 sol pbc
3
3
 
4
4
  import git from 'isomorphic-git';
package/src/cmd/config.js CHANGED
@@ -1,4 +1,4 @@
1
- // SPDX-License-Identifier: AGPL-3.0-only
1
+ // SPDX-License-Identifier: MIT
2
2
  // Copyright (c) 2026 sol pbc
3
3
 
4
4
  import { loadConfig, saveConfig, getScalars } from '../lib/config.js';
package/src/cmd/doctor.js CHANGED
@@ -1,59 +1,193 @@
1
- // SPDX-License-Identifier: AGPL-3.0-only
1
+ // SPDX-License-Identifier: MIT
2
2
  // Copyright (c) 2026 sol pbc
3
3
 
4
4
  import { loadConfig } from '../lib/config.js';
5
5
  import { restoreAgent } from '../lib/oauth.js';
6
6
  import { readProjectConfig } from '../lib/vit-dir.js';
7
- import { existsSync } from 'node:fs';
7
+ import { existsSync, lstatSync, readdirSync, readFileSync } from 'node:fs';
8
8
  import { join } from 'node:path';
9
+ import { homedir } from 'node:os';
9
10
  import { mark, name } from '../lib/brand.js';
11
+ import { which } from '../lib/compat.js';
12
+ import { jsonOk, jsonError } from '../lib/json-output.js';
13
+ import { configPath } from '../lib/paths.js';
14
+
15
+ function scanSkillDir(dir) {
16
+ const skills = [];
17
+ if (!existsSync(dir)) return skills;
18
+ try {
19
+ const entries = readdirSync(dir, { withFileTypes: true });
20
+ for (const entry of entries) {
21
+ if (!entry.isDirectory()) continue;
22
+ const skillMd = join(dir, entry.name, 'SKILL.md');
23
+ if (existsSync(skillMd)) {
24
+ let version = null;
25
+ try {
26
+ const content = readFileSync(skillMd, 'utf-8');
27
+ const match = content.match(/^---\r?\n([\s\S]*?)\r?\n---/);
28
+ if (match) {
29
+ const versionMatch = match[1].match(/^version:\s*(.+)$/m);
30
+ if (versionMatch) version = versionMatch[1].trim();
31
+ }
32
+ } catch { /* ignore read errors */ }
33
+ skills.push({ name: entry.name, version });
34
+ }
35
+ }
36
+ } catch { /* ignore dir read errors */ }
37
+ return skills;
38
+ }
10
39
 
11
40
  export default function register(program) {
12
- async function checkHealth() {
41
+ async function checkHealth(opts) {
13
42
  try {
14
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
+ let installType = 'not on PATH';
49
+ let vitPath = which(name);
50
+ let installPath = vitPath || null;
51
+ let beacon = null;
52
+ let skillInstalled = false;
53
+ let projectSkills = [];
54
+ let userSkills = [];
55
+ let blueskyOk = false;
56
+ let pds = null;
57
+
15
58
  if (config.setup_at) {
16
59
  const when = new Date(config.setup_at * 1000).toISOString();
17
- console.log(`${mark} setup: ok (${when})`);
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
+ if (!vitPath) {
66
+ installType = 'not on PATH';
67
+ if (!opts.json) console.log(`${mark} install: not on PATH`);
18
68
  } else {
19
- console.log(`${mark} setup: not done (run ${name} setup)`);
69
+ try {
70
+ if (lstatSync(vitPath).isSymbolicLink()) {
71
+ installType = 'linked';
72
+ if (!opts.json) console.log(`${mark} install: linked (${vitPath})`);
73
+ } else if (vitPath.includes('node_modules')) {
74
+ installType = 'global';
75
+ if (!opts.json) console.log(`${mark} install: global`);
76
+ } else {
77
+ installType = 'source';
78
+ if (!opts.json) console.log(`${mark} install: source (${vitPath})`);
79
+ }
80
+ } catch {
81
+ installType = 'source';
82
+ if (!opts.json) console.log(`${mark} install: source (${vitPath})`);
83
+ }
20
84
  }
21
85
 
22
86
  const projConfig = readProjectConfig();
87
+ beacon = projConfig.beacon || null;
23
88
  if (projConfig.beacon) {
24
- console.log(`${mark} beacon: ${projConfig.beacon}`);
89
+ if (!opts.json) console.log(`${mark} beacon: ${projConfig.beacon}`);
25
90
  } else {
26
- console.log(`${mark} beacon: not set`);
91
+ if (!opts.json) console.log(`${mark} beacon: not set`);
27
92
  }
28
93
 
29
94
  const skillPath = join(process.cwd(), '.claude', 'skills', 'using-vit', 'SKILL.md');
95
+ skillInstalled = existsSync(skillPath);
30
96
  if (existsSync(skillPath)) {
31
- console.log(`${mark} skill: ok (using-vit)`);
97
+ if (!opts.json) console.log(`${mark} skill: ok (using-vit)`);
32
98
  } else {
33
- console.log(`${mark} skill: not installed (run ${name} setup)`);
99
+ if (!opts.json) console.log(`${mark} skill: not installed (run ${name} setup)`);
100
+ }
101
+
102
+ // Report installed skills
103
+ const projectSkillDir = join(process.cwd(), '.claude', 'skills');
104
+ projectSkills = scanSkillDir(projectSkillDir);
105
+ const userSkillDir = join(homedir(), '.claude', 'skills');
106
+ userSkills = scanSkillDir(userSkillDir);
107
+
108
+ if (!opts.json && projectSkills.length > 0) {
109
+ console.log(`${mark} project skills: ${projectSkills.length} installed`);
110
+ for (const s of projectSkills) {
111
+ const ver = s.version ? ` v${s.version}` : '';
112
+ console.log(` ${s.name}${ver}`);
113
+ }
114
+ }
115
+ if (!opts.json && userSkills.length > 0) {
116
+ console.log(`${mark} user skills: ${userSkills.length} installed`);
117
+ for (const s of userSkills) {
118
+ const ver = s.version ? ` v${s.version}` : '';
119
+ console.log(` ${s.name}${ver}`);
120
+ }
121
+ }
122
+
123
+ let effectiveDid = config.did;
124
+ let identitySource = effectiveDid ? 'global' : null;
125
+ let authType = 'oauth';
126
+
127
+ const localLoginPath = join(process.cwd(), '.vit', 'login.json');
128
+ try {
129
+ if (existsSync(localLoginPath)) {
130
+ const local = JSON.parse(readFileSync(localLoginPath, 'utf-8'));
131
+ if (local.did) {
132
+ effectiveDid = local.did;
133
+ identitySource = 'local';
134
+ authType = local.type || 'oauth';
135
+ }
136
+ }
137
+ } catch {}
138
+
139
+ if (!identitySource && effectiveDid) identitySource = 'global';
140
+
141
+ if (identitySource === 'global' && effectiveDid) {
142
+ try {
143
+ const raw = readFileSync(configPath('session.json'), 'utf-8');
144
+ const sessionData = JSON.parse(raw);
145
+ if (sessionData[effectiveDid]?.type === 'app-password') authType = 'app-password';
146
+ } catch {}
34
147
  }
35
148
 
36
- if (!config.did) {
37
- console.log(`${mark} bluesky: not logged in (run ${name} login <handle>)`);
149
+ if (!effectiveDid) {
150
+ if (!opts.json) console.log(`${mark} bluesky: not logged in (run ${name} login <handle>)`);
38
151
  } else {
39
152
  try {
40
- const { session } = await restoreAgent(config.did);
41
- const pds = session.serverMetadata?.issuer;
42
- console.log(`${mark} bluesky: ok (${session.did}${pds ? ', ' + pds : ''})`);
153
+ const { session } = await restoreAgent(effectiveDid);
154
+ blueskyOk = true;
155
+ pds = session.serverMetadata?.issuer || null;
156
+ if (!opts.json) console.log(`${mark} bluesky: ok (${session.did || effectiveDid}${pds ? ', ' + pds : ''})`);
43
157
  } catch {
44
- console.log(`${mark} bluesky: token expired or invalid (run ${name} login <handle>)`);
158
+ if (!opts.json) console.log(`${mark} bluesky: token expired or invalid (run ${name} login <handle>)`);
45
159
  }
160
+ if (!opts.json) console.log(`${mark} identity: ${identitySource} (${authType})`);
161
+ }
162
+
163
+ if (opts.json) {
164
+ jsonOk({
165
+ setup,
166
+ install: { type: installType, path: installPath },
167
+ beacon,
168
+ skill: skillInstalled,
169
+ projectSkills,
170
+ userSkills,
171
+ bluesky: { ok: blueskyOk, did: effectiveDid || null, pds, source: identitySource, authType },
172
+ });
46
173
  }
47
174
  } catch (err) {
48
- console.error(err instanceof Error ? err.message : String(err));
175
+ const msg = err instanceof Error ? err.message : String(err);
176
+ if (opts.json) {
177
+ jsonError(msg);
178
+ return;
179
+ }
180
+ console.error(msg);
49
181
  process.exitCode = 1;
50
182
  }
51
183
  }
52
184
 
53
185
  program.command('doctor')
54
186
  .description('Verify vit environment and project configuration')
187
+ .option('--json', 'Output as JSON')
55
188
  .action(checkHealth);
56
189
  program.command('status')
57
190
  .description('Alias for doctor')
191
+ .option('--json', 'Output as JSON')
58
192
  .action(checkHealth);
59
193
  }