@bodhi-ventures/aiocs 0.3.1 → 0.5.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
@@ -13,7 +13,6 @@ Local-only documentation fetch, versioning, and search CLI for AI agents.
13
13
  - diffs snapshots to show what changed between fetches
14
14
  - indexes heading-aware chunks in SQLite FTS5
15
15
  - adds optional hybrid retrieval with local Ollama embeddings and a dedicated Qdrant vector index
16
- - compiles derived research workspaces into Markdown wiki artifacts with LM Studio
17
16
  - links docs sources to local projects for scoped search
18
17
  - exports and imports manifest-backed backups for `~/.aiocs`
19
18
 
@@ -31,15 +30,15 @@ For testing or local overrides, set:
31
30
 
32
31
  ```bash
33
32
  npm install -g @bodhi-ventures/aiocs
34
- docs --version
35
- docs --help
33
+ aiocs --version
34
+ aiocs --help
36
35
  command -v aiocs-mcp
37
36
  ```
38
37
 
39
38
  Zero-install fallback:
40
39
 
41
40
  ```bash
42
- npx -y -p @bodhi-ventures/aiocs docs --version
41
+ npx -y -p @bodhi-ventures/aiocs aiocs --version
43
42
  npx -y -p @bodhi-ventures/aiocs aiocs-mcp
44
43
  ```
45
44
 
@@ -55,12 +54,12 @@ pnpm dev:mcp
55
54
  For AI agents, prefer the root-level `--json` flag for one-shot commands:
56
55
 
57
56
  ```bash
58
- docs --json version
59
- docs --json doctor
60
- docs --json init --no-fetch
61
- docs --json source list
62
- docs --json search "maker flow" --source hyperliquid
63
- docs --json show 42
57
+ aiocs --json version
58
+ aiocs --json doctor
59
+ aiocs --json init --no-fetch
60
+ aiocs --json source list
61
+ aiocs --json search "maker flow" --source hyperliquid
62
+ aiocs --json show 42
64
63
  ```
65
64
 
66
65
  `--json` emits exactly one JSON document to stdout with this envelope:
@@ -128,21 +127,21 @@ The open-source repo bundles both web and git sources in `sources/`:
128
127
 
129
128
  Additional machine-local source specs belong in `~/.aiocs/sources`.
130
129
 
131
- `docs init` bootstraps both managed locations, so source behavior is the same regardless of
130
+ `aiocs init` bootstraps both managed locations, so source behavior is the same regardless of
132
131
  whether a spec lives in the repo or in `~/.aiocs/sources`.
133
132
 
134
133
  Bootstrap managed sources in one command:
135
134
 
136
135
  ```bash
137
- docs init --no-fetch
138
- docs --json init --no-fetch
136
+ aiocs init --no-fetch
137
+ aiocs --json init --no-fetch
139
138
  ```
140
139
 
141
140
  Validate the machine before bootstrapping:
142
141
 
143
142
  ```bash
144
- docs doctor
145
- docs --json doctor
143
+ aiocs doctor
144
+ aiocs --json doctor
146
145
  ```
147
146
 
148
147
  ## Workflow
@@ -152,131 +151,54 @@ Register a source:
152
151
  ```bash
153
152
  mkdir -p ~/.aiocs/sources
154
153
  cp /path/to/source.yaml ~/.aiocs/sources/my-source.yaml
155
- docs source upsert ~/.aiocs/sources/my-source.yaml
156
- docs source upsert /path/to/source.yaml
157
- docs source list
154
+ aiocs source upsert ~/.aiocs/sources/my-source.yaml
155
+ aiocs source upsert /path/to/source.yaml
156
+ aiocs source list
158
157
  ```
159
158
 
160
159
  Fetch and snapshot docs:
161
160
 
162
161
  ```bash
163
- docs refresh due hyperliquid
164
- docs snapshot list hyperliquid
165
- docs refresh due
162
+ aiocs refresh due hyperliquid
163
+ aiocs snapshot list hyperliquid
164
+ aiocs refresh due
166
165
  ```
167
166
 
168
167
  Force fetch remains available for explicit maintenance:
169
168
 
170
169
  ```bash
171
- docs fetch hyperliquid
172
- docs fetch all
170
+ aiocs fetch hyperliquid
171
+ aiocs fetch all
173
172
  ```
174
173
 
175
174
  Link docs to a local project:
176
175
 
177
176
  ```bash
178
- docs project link /absolute/path/to/project hyperliquid lighter
179
- docs project unlink /absolute/path/to/project lighter
177
+ aiocs project link /absolute/path/to/project hyperliquid lighter
178
+ aiocs project unlink /absolute/path/to/project lighter
180
179
  ```
181
180
 
182
181
  Search and inspect results:
183
182
 
184
183
  ```bash
185
- docs search "maker flow" --source hyperliquid
186
- docs search "WebSocketTransport" --source nktkas-hyperliquid --path "src/**" --language typescript
187
- docs search "maker flow" --source hyperliquid --mode lexical
188
- docs search "maker flow" --source hyperliquid --mode hybrid
189
- docs search "maker flow" --source hyperliquid --mode semantic
190
- docs search "maker flow" --all
191
- docs search "maker flow" --source hyperliquid --limit 5 --offset 0
192
- docs show 42
193
- docs canary hyperliquid
194
- docs diff hyperliquid
195
- docs embeddings status
196
- docs embeddings backfill all
197
- docs embeddings run
198
- docs backup export /absolute/path/to/backup
199
- docs verify coverage hyperliquid /absolute/path/to/reference.md
200
- ```
201
-
202
- When `docs search` runs inside a linked project, it automatically scopes to that project's linked sources unless `--source` or `--all` is provided.
203
-
204
- ### Research workspaces
205
-
206
- `aiocs` can compile a derived workspace wiki on top of canonical source snapshots. Workspace artifacts are stored separately from fetched sources under `~/.aiocs/data/workspaces/<workspace-id>/` and keep provenance links back to source chunks.
207
-
208
- LM Studio is the v1 compiler runtime. Load `google/gemma-4-26b-a4b` in LM Studio, start the local API server, and make sure `doctor` can see it:
209
-
210
- ```bash
211
- docs --json doctor
212
- ```
213
-
214
- If LM Studio is running on a non-default host or model, override:
215
-
216
- ```bash
217
- export AIOCS_LMSTUDIO_BASE_URL=ws://127.0.0.1:1234
218
- export AIOCS_LMSTUDIO_MODEL=google/gemma-4-26b-a4b
219
- ```
220
-
221
- These environment overrides apply at runtime, including for already-created workspaces.
222
-
223
- Create, bind, compile, and search a workspace:
224
-
225
- ```bash
226
- docs workspace create market-structure --label "Market Structure" --auto-compile
227
- docs workspace bind market-structure hyperliquid nktkas-hyperliquid
228
- docs workspace compile market-structure
229
- docs workspace status market-structure
230
- docs workspace queue-run
231
- docs workspace search market-structure "transport and websocket design" --scope mixed
232
- docs workspace artifact list market-structure
233
- docs workspace artifact show market-structure derived/index.md
234
- docs workspace lint market-structure
235
- docs workspace output market-structure report --name weekly-brief
236
- docs workspace output market-structure slides --name weekly-brief
237
- docs workspace answer market-structure note "What changed in websocket transport?" --name websocket-note
238
- ```
239
-
240
- Workspace compile and maintenance are incremental:
241
-
242
- - canonical source snapshots remain the source of truth
243
- - unchanged sources are skipped on later compiles
244
- - changed sources regenerate only their derived summaries/concepts plus the shared index
245
- - changed raw inputs regenerate only their derived summaries/concepts plus the shared index
246
- - compiled artifacts get deterministic graph navigation with outgoing relations and backlinks
247
- - workspace lint persists durable suggestion artifacts for duplicate concepts, missing articles, and follow-up questions
248
- - generated reports/slides keep provenance to the bound source snapshots
249
- - generated notes/reports/slides are marked stale when their inputs change
250
-
251
- Opt-in automatic recompilation:
252
-
253
- - set `--auto-compile` when creating the workspace, or later with `docs workspace configure <workspace-id> --auto-compile true`
254
- - the daemon queues recompiles after bound source refreshes
255
- - run `docs workspace queue-run` to process queued jobs outside the daemon
256
-
257
- Workspace-scoped raw ingest:
258
-
259
- ```bash
260
- docs workspace ingest add market-structure markdown-dir /absolute/path/to/notes --label "Research notes"
261
- docs workspace ingest add market-structure pdf /absolute/path/to/paper.pdf --label "Paper PDF"
262
- docs workspace ingest add market-structure image /absolute/path/to/diagram.png --label "Market diagram"
263
- docs workspace ingest add market-structure csv /absolute/path/to/fills.csv --label "Fills CSV"
264
- docs workspace ingest add market-structure json /absolute/path/to/manifest.json --label "Research manifest"
265
- docs workspace ingest add market-structure jsonl /absolute/path/to/events.jsonl --label "Events JSONL"
266
- docs workspace ingest list market-structure
267
- docs workspace ingest search market-structure "fee tier" --kind markdown-dir
268
- docs workspace ingest show market-structure markdown-dir-notes-<hash>
269
- ```
270
-
271
- Obsidian sync:
272
-
273
- ```bash
274
- docs workspace sync obsidian market-structure /absolute/path/to/obsidian-vault
275
- ```
276
-
277
- The workspace is synced under `aiocs/<workspace-id>/` by default so the raw, derived, and output trees stay grouped inside the vault.
278
-
279
- If any bound source snapshot changes, rerun `docs workspace compile <workspace-id>` before `docs workspace output ...`. Output generation fails closed when required derived artifacts are stale.
184
+ aiocs search "maker flow" --source hyperliquid
185
+ aiocs search "WebSocketTransport" --source nktkas-hyperliquid --path "src/**" --language typescript
186
+ aiocs search "maker flow" --source hyperliquid --mode lexical
187
+ aiocs search "maker flow" --source hyperliquid --mode hybrid
188
+ aiocs search "maker flow" --source hyperliquid --mode semantic
189
+ aiocs search "maker flow" --all
190
+ aiocs search "maker flow" --source hyperliquid --limit 5 --offset 0
191
+ aiocs show 42
192
+ aiocs canary hyperliquid
193
+ aiocs diff hyperliquid
194
+ aiocs embeddings status
195
+ aiocs embeddings backfill all
196
+ aiocs embeddings run
197
+ aiocs backup export /absolute/path/to/backup
198
+ aiocs verify coverage hyperliquid /absolute/path/to/reference.md
199
+ ```
200
+
201
+ When `aiocs search` runs inside a linked project, it automatically scopes to that project's linked sources unless `--source` or `--all` is provided.
280
202
 
281
203
  For agents, the intended decision order is:
282
204
 
@@ -397,22 +319,22 @@ All one-shot commands support `--json`:
397
319
  Representative examples:
398
320
 
399
321
  ```bash
400
- docs --json doctor
401
- docs --json init --no-fetch
402
- docs --json source list
403
- docs --json source upsert sources/hyperliquid.yaml
404
- docs --json refresh due hyperliquid
405
- docs --json canary hyperliquid
406
- docs --json refresh due
407
- docs --json diff hyperliquid
408
- docs --json embeddings status
409
- docs --json embeddings backfill all
410
- docs --json embeddings clear hyperliquid
411
- docs --json embeddings run
412
- docs --json project link /absolute/path/to/project hyperliquid lighter
413
- docs --json snapshot list hyperliquid
414
- docs --json backup export /absolute/path/to/backup
415
- docs --json verify coverage hyperliquid /absolute/path/to/reference.md
322
+ aiocs --json doctor
323
+ aiocs --json init --no-fetch
324
+ aiocs --json source list
325
+ aiocs --json source upsert sources/hyperliquid.yaml
326
+ aiocs --json refresh due hyperliquid
327
+ aiocs --json canary hyperliquid
328
+ aiocs --json refresh due
329
+ aiocs --json diff hyperliquid
330
+ aiocs --json embeddings status
331
+ aiocs --json embeddings backfill all
332
+ aiocs --json embeddings clear hyperliquid
333
+ aiocs --json embeddings run
334
+ aiocs --json project link /absolute/path/to/project hyperliquid lighter
335
+ aiocs --json snapshot list hyperliquid
336
+ aiocs --json backup export /absolute/path/to/backup
337
+ aiocs --json verify coverage hyperliquid /absolute/path/to/reference.md
416
338
  ```
417
339
 
418
340
  For multi-result commands like `fetch`, `refresh due`, and `search`, `data` contains structured collections rather than line-by-line output:
@@ -439,7 +361,7 @@ For multi-result commands like `fetch`, `refresh due`, and `search`, `data` cont
439
361
  `aiocs` ships a first-class long-running refresh process:
440
362
 
441
363
  ```bash
442
- docs daemon
364
+ aiocs daemon
443
365
  ```
444
366
 
445
367
  The daemon bootstraps source specs from the configured directories, refreshes due sources, sleeps for the configured interval, and repeats.
@@ -449,7 +371,7 @@ Configured source spec directories are treated as the daemon’s source of truth
449
371
  - if a managed source spec is removed from disk, the source is removed from the catalog on the next bootstrap
450
372
  - if `AIOCS_SOURCE_SPEC_DIRS` is explicitly set but resolves to missing or empty directories, the daemon fails fast instead of silently idling
451
373
  - due canaries run independently from full fetch schedules so drift is caught earlier than the next full snapshot refresh
452
- - daemon heartbeat state is persisted in the local catalog and surfaced through `docs doctor`
374
+ - daemon heartbeat state is persisted in the local catalog and surfaced through `aiocs doctor`
453
375
  - queued embedding jobs are processed in the same daemon cycle after fetches complete
454
376
 
455
377
  Environment variables:
@@ -467,10 +389,10 @@ For local agents, the daemon keeps the shared catalog under `~/.aiocs` warm whil
467
389
 
468
390
  ### Daemon JSON mode
469
391
 
470
- `docs daemon --json` is intentionally different from one-shot commands. Because it is long-running, it emits one JSON event per line:
392
+ `aiocs daemon --json` is intentionally different from one-shot commands. Because it is long-running, it emits one JSON event per line:
471
393
 
472
394
  ```bash
473
- docs --json daemon
395
+ aiocs --json daemon
474
396
  ```
475
397
 
476
398
  Example event stream:
@@ -566,7 +488,7 @@ docker compose up --build -d
566
488
 
567
489
  The compose file:
568
490
 
569
- - runs `docs daemon` as the container entrypoint
491
+ - runs `aiocs daemon` as the container entrypoint
570
492
  - bind-mounts `${HOME}/.aiocs` into `/root/.aiocs` so the container shares the same local catalog defaults as the host CLI
571
493
  - bind-mounts `./sources` into `/app/sources` so source spec edits are picked up without rebuilding
572
494
  - runs a dedicated `aiocs-qdrant` container for vector search