@bodhi-ventures/aiocs 0.1.1 → 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 CHANGED
@@ -5,6 +5,7 @@ Local-only documentation fetch, versioning, and search CLI for AI agents.
5
5
  ## What it does
6
6
 
7
7
  - fetches docs from websites with Playwright
8
+ - snapshots curated external git repositories as shared local reference sources
8
9
  - supports authenticated sources via environment-backed headers and cookies
9
10
  - runs lightweight canaries to detect source drift before full refreshes
10
11
  - normalizes them into Markdown
@@ -30,25 +31,24 @@ For testing or local overrides, set:
30
31
  ```bash
31
32
  npm install -g @bodhi-ventures/aiocs
32
33
  docs --version
34
+ docs --help
35
+ command -v aiocs-mcp
33
36
  ```
34
37
 
35
- For repository development:
38
+ Zero-install fallback:
36
39
 
37
40
  ```bash
38
- pnpm install
39
- pnpm build
41
+ npx -y -p @bodhi-ventures/aiocs docs --version
42
+ npx -y -p @bodhi-ventures/aiocs aiocs-mcp
40
43
  ```
41
44
 
42
- Run the CLI during development with:
45
+ For repository development only:
43
46
 
44
47
  ```bash
48
+ pnpm install
49
+ pnpm build
45
50
  pnpm dev -- --help
46
- ```
47
-
48
- Or after build:
49
-
50
- ```bash
51
- ./dist/cli.js --help
51
+ pnpm dev:mcp
52
52
  ```
53
53
 
54
54
  For AI agents, prefer the root-level `--json` flag for one-shot commands:
@@ -57,9 +57,9 @@ For AI agents, prefer the root-level `--json` flag for one-shot commands:
57
57
  docs --json version
58
58
  docs --json doctor
59
59
  docs --json init --no-fetch
60
- pnpm dev -- --json source list
61
- pnpm dev -- --json search "maker flow" --source hyperliquid
62
- pnpm dev -- --json show 42
60
+ docs --json source list
61
+ docs --json search "maker flow" --source hyperliquid
62
+ docs --json show 42
63
63
  ```
64
64
 
65
65
  `--json` emits exactly one JSON document to stdout with this envelope:
@@ -109,12 +109,23 @@ GitHub Actions publishes `@bodhi-ventures/aiocs` publicly to npm and creates the
109
109
 
110
110
  ## Codex integration
111
111
 
112
- For Codex-first setup, automatic-use guidance, MCP recommendations, and subagent examples, see [docs/codex-integration.md](./docs/codex-integration.md).
112
+ For Codex-first setup, automatic-use guidance, MCP recommendations, and agent definitions, see [docs/codex-integration.md](./docs/codex-integration.md).
113
+
114
+ Canonical Codex setup:
115
+
116
+ - register `aiocs-mcp` in `~/.codex/config.toml`
117
+ - link `skills/aiocs` into `~/.codex/skills/aiocs`
118
+ - link `skills/aiocs-curation` into `~/.codex/skills/aiocs-curation`
119
+ - keep the optional specialist subagent linked only as a fallback for heavier docs workflows
113
120
 
114
121
  ## Managed sources
115
122
 
116
- The open-source repo bundles `hyperliquid` in `sources/`. Additional machine-local source specs
117
- belong in `~/.aiocs/sources`.
123
+ The open-source repo bundles both web and git sources in `sources/`:
124
+
125
+ - `hyperliquid` for the public docs site
126
+ - `nktkas-hyperliquid` for the `nktkas/hyperliquid` GitHub repository
127
+
128
+ Additional machine-local source specs belong in `~/.aiocs/sources`.
118
129
 
119
130
  `docs init` bootstraps both managed locations, so source behavior is the same regardless of
120
131
  whether a spec lives in the repo or in `~/.aiocs/sources`.
@@ -140,50 +151,51 @@ Register a source:
140
151
  ```bash
141
152
  mkdir -p ~/.aiocs/sources
142
153
  cp /path/to/source.yaml ~/.aiocs/sources/my-source.yaml
143
- pnpm dev -- source upsert ~/.aiocs/sources/my-source.yaml
144
- pnpm dev -- source upsert /path/to/source.yaml
145
- pnpm dev -- source list
154
+ docs source upsert ~/.aiocs/sources/my-source.yaml
155
+ docs source upsert /path/to/source.yaml
156
+ docs source list
146
157
  ```
147
158
 
148
159
  Fetch and snapshot docs:
149
160
 
150
161
  ```bash
151
- pnpm dev -- refresh due hyperliquid
152
- pnpm dev -- snapshot list hyperliquid
153
- pnpm dev -- refresh due
162
+ docs refresh due hyperliquid
163
+ docs snapshot list hyperliquid
164
+ docs refresh due
154
165
  ```
155
166
 
156
167
  Force fetch remains available for explicit maintenance:
157
168
 
158
169
  ```bash
159
- pnpm dev -- fetch hyperliquid
160
- pnpm dev -- fetch all
170
+ docs fetch hyperliquid
171
+ docs fetch all
161
172
  ```
162
173
 
163
174
  Link docs to a local project:
164
175
 
165
176
  ```bash
166
- pnpm dev -- project link /absolute/path/to/project hyperliquid lighter
167
- pnpm dev -- project unlink /absolute/path/to/project lighter
177
+ docs project link /absolute/path/to/project hyperliquid lighter
178
+ docs project unlink /absolute/path/to/project lighter
168
179
  ```
169
180
 
170
181
  Search and inspect results:
171
182
 
172
183
  ```bash
173
- pnpm dev -- search "maker flow" --source hyperliquid
174
- pnpm dev -- search "maker flow" --source hyperliquid --mode lexical
175
- pnpm dev -- search "maker flow" --source hyperliquid --mode hybrid
176
- pnpm dev -- search "maker flow" --source hyperliquid --mode semantic
177
- pnpm dev -- search "maker flow" --all
178
- pnpm dev -- search "maker flow" --source hyperliquid --limit 5 --offset 0
179
- pnpm dev -- show 42
180
- pnpm dev -- canary hyperliquid
181
- pnpm dev -- diff hyperliquid
182
- pnpm dev -- embeddings status
183
- pnpm dev -- embeddings backfill all
184
- pnpm dev -- embeddings run
185
- pnpm dev -- backup export /absolute/path/to/backup
186
- pnpm dev -- verify coverage hyperliquid /absolute/path/to/reference.md
184
+ docs search "maker flow" --source hyperliquid
185
+ docs search "WebSocketTransport" --source nktkas-hyperliquid --path "src/**" --language typescript
186
+ docs search "maker flow" --source hyperliquid --mode lexical
187
+ docs search "maker flow" --source hyperliquid --mode hybrid
188
+ docs search "maker flow" --source hyperliquid --mode semantic
189
+ docs search "maker flow" --all
190
+ docs search "maker flow" --source hyperliquid --limit 5 --offset 0
191
+ docs show 42
192
+ docs canary hyperliquid
193
+ docs diff hyperliquid
194
+ docs embeddings status
195
+ docs embeddings backfill all
196
+ docs embeddings run
197
+ docs backup export /absolute/path/to/backup
198
+ docs verify coverage hyperliquid /absolute/path/to/reference.md
187
199
  ```
188
200
 
189
201
  When `docs search` runs inside a linked project, it automatically scopes to that project's linked sources unless `--source` or `--all` is provided.
@@ -195,6 +207,34 @@ For agents, the intended decision order is:
195
207
  3. if the source is missing but worth reusing, add a spec under `~/.aiocs/sources`, then upsert and refresh only that source
196
208
  4. avoid `fetch all` unless the user explicitly asks or the daemon is doing maintenance
197
209
 
210
+ ### Git repo sources
211
+
212
+ `aiocs` supports first-class `kind: git` sources for curated external repositories that should be
213
+ reused across multiple local projects.
214
+
215
+ Example:
216
+
217
+ ```yaml
218
+ kind: git
219
+ id: nktkas-hyperliquid
220
+ label: nktkas/hyperliquid Repo
221
+ repo:
222
+ url: https://github.com/nktkas/hyperliquid.git
223
+ ref: main
224
+ include:
225
+ - README.md
226
+ - docs/**
227
+ - src/**
228
+ exclude:
229
+ - .github/**
230
+ - dist/**
231
+ schedule:
232
+ everyHours: 24
233
+ ```
234
+
235
+ Git source snapshots are commit-based, stored under the shared local catalog, and searchable with
236
+ the same project linking, diffing, canary, and hybrid search flows as website docs.
237
+
198
238
  ### Hybrid search
199
239
 
200
240
  `aiocs` keeps SQLite FTS5/BM25 as the canonical lexical index and adds an optional hybrid layer:
@@ -279,22 +319,22 @@ All one-shot commands support `--json`:
279
319
  Representative examples:
280
320
 
281
321
  ```bash
282
- pnpm dev -- --json doctor
283
- pnpm dev -- --json init --no-fetch
284
- pnpm dev -- --json source list
285
- pnpm dev -- --json source upsert sources/hyperliquid.yaml
286
- pnpm dev -- --json refresh due hyperliquid
287
- pnpm dev -- --json canary hyperliquid
288
- pnpm dev -- --json refresh due
289
- pnpm dev -- --json diff hyperliquid
290
- pnpm dev -- --json embeddings status
291
- pnpm dev -- --json embeddings backfill all
292
- pnpm dev -- --json embeddings clear hyperliquid
293
- pnpm dev -- --json embeddings run
294
- pnpm dev -- --json project link /absolute/path/to/project hyperliquid lighter
295
- pnpm dev -- --json snapshot list hyperliquid
296
- pnpm dev -- --json backup export /absolute/path/to/backup
297
- pnpm dev -- --json verify coverage hyperliquid /absolute/path/to/reference.md
322
+ docs --json doctor
323
+ docs --json init --no-fetch
324
+ docs --json source list
325
+ docs --json source upsert sources/hyperliquid.yaml
326
+ docs --json refresh due hyperliquid
327
+ docs --json canary hyperliquid
328
+ docs --json refresh due
329
+ docs --json diff hyperliquid
330
+ docs --json embeddings status
331
+ docs --json embeddings backfill all
332
+ docs --json embeddings clear hyperliquid
333
+ docs --json embeddings run
334
+ docs --json project link /absolute/path/to/project hyperliquid lighter
335
+ docs --json snapshot list hyperliquid
336
+ docs --json backup export /absolute/path/to/backup
337
+ docs --json verify coverage hyperliquid /absolute/path/to/reference.md
298
338
  ```
299
339
 
300
340
  For multi-result commands like `fetch`, `refresh due`, and `search`, `data` contains structured collections rather than line-by-line output:
@@ -321,8 +361,7 @@ For multi-result commands like `fetch`, `refresh due`, and `search`, `data` cont
321
361
  `aiocs` ships a first-class long-running refresh process:
322
362
 
323
363
  ```bash
324
- pnpm dev -- daemon
325
- ./dist/cli.js daemon
364
+ docs daemon
326
365
  ```
327
366
 
328
367
  The daemon bootstraps source specs from the configured directories, refreshes due sources, sleeps for the configured interval, and repeats.
@@ -353,7 +392,7 @@ For local agents, the daemon keeps the shared catalog under `~/.aiocs` warm whil
353
392
  `docs daemon --json` is intentionally different from one-shot commands. Because it is long-running, it emits one JSON event per line:
354
393
 
355
394
  ```bash
356
- ./dist/cli.js --json daemon
395
+ docs --json daemon
357
396
  ```
358
397
 
359
398
  Example event stream:
@@ -369,7 +408,13 @@ Example event stream:
369
408
  `aiocs` also ships an MCP server binary for tool-native agent integrations:
370
409
 
371
410
  ```bash
411
+ command -v aiocs-mcp
372
412
  aiocs-mcp
413
+ ```
414
+
415
+ For repository development only:
416
+
417
+ ```bash
373
418
  pnpm dev:mcp
374
419
  ```
375
420
 
@@ -405,7 +450,7 @@ The repo ships two GitHub Actions workflows:
405
450
  - [ci.yml](./.github/workflows/ci.yml): validation for lint, tests, build, pack, and Docker smoke coverage
406
451
  - [release.yml](./.github/workflows/release.yml): tag-driven stable release flow that validates the tagged package state, publishes to npm, and creates a GitHub release
407
452
 
408
- The release workflow is triggered only by pushed stable tags matching `vX.Y.Z` and expects `NPM_TOKEN` in repository secrets. The release job is retryable: if `@bodhi-ventures/aiocs@X.Y.Z` already exists on npm or the GitHub release already exists for `vX.Y.Z`, the workflow skips the completed publication step and finishes the remaining one.
453
+ The release workflow is triggered only by pushed stable tags matching `vX.Y.Z` and expects an npm publish token in GitHub repository secrets. The release job is retryable: if `@bodhi-ventures/aiocs@X.Y.Z` already exists on npm or the GitHub release already exists for `vX.Y.Z`, the workflow skips the completed publication step and finishes the remaining one.
409
454
 
410
455
  Successful MCP results use an envelope:
411
456