@swarmvaultai/cli 3.12.0 → 3.13.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 +44 -56
- package/dist/index.js +13 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -29,70 +29,45 @@ The smoke parses `packages/cli/src/index.ts` with the TypeScript compiler API, c
|
|
|
29
29
|
|
|
30
30
|
## First Run
|
|
31
31
|
|
|
32
|
+
Start in an empty folder or scratch folder:
|
|
33
|
+
|
|
32
34
|
```bash
|
|
33
35
|
mkdir my-vault
|
|
34
36
|
cd my-vault
|
|
35
|
-
swarmvault
|
|
36
|
-
|
|
37
|
+
swarmvault quickstart ../your-repo
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
That single command initializes a vault, ingests the input, compiles the wiki and graph, writes share artifacts, and opens the local graph viewer. It is the beginner-friendly alias for `swarmvault scan`.
|
|
41
|
+
|
|
42
|
+
No input ready yet?
|
|
43
|
+
|
|
44
|
+
```bash
|
|
37
45
|
swarmvault demo
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
swarmvault
|
|
44
|
-
swarmvault
|
|
45
|
-
|
|
46
|
-
swarmvault
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
After the first compile, use:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
swarmvault query "What are the key concepts?"
|
|
52
|
+
swarmvault graph serve
|
|
53
|
+
swarmvault doctor
|
|
54
|
+
swarmvault candidate list
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Use the step-by-step flow when you want more control:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
swarmvault init --obsidian --profile personal-research
|
|
61
|
+
swarmvault ingest ./src --repo-root .
|
|
62
|
+
swarmvault ingest ./meeting.srt --guide
|
|
51
63
|
swarmvault add https://arxiv.org/abs/2401.12345
|
|
52
|
-
swarmvault compile
|
|
53
|
-
swarmvault
|
|
54
|
-
swarmvault graph share --post
|
|
55
|
-
swarmvault graph share --svg ./share-card.svg
|
|
56
|
-
swarmvault graph share --bundle ./share-kit
|
|
57
|
-
swarmvault benchmark
|
|
58
|
-
swarmvault query "What keeps recurring?" --commit
|
|
59
|
-
swarmvault chat "What should the next agent know?"
|
|
60
|
-
swarmvault chat --resume <session-id> "What changed?"
|
|
61
|
-
swarmvault export ai --out ./exports/ai
|
|
62
|
-
swarmvault context build "Ship this feature safely" --target ./src --budget 8000
|
|
63
|
-
swarmvault task start "Ship this feature safely" --target ./src --agent codex
|
|
64
|
-
swarmvault retrieval status
|
|
65
|
-
swarmvault doctor --repair
|
|
66
|
-
swarmvault query "Turn this into slides" --format slides
|
|
67
|
-
swarmvault explore "What should I research next?" --steps 3
|
|
68
|
-
swarmvault lint --deep
|
|
69
|
-
swarmvault graph blast ./src/index.ts
|
|
70
|
-
swarmvault graph status ./src
|
|
71
|
-
swarmvault check-update ./src
|
|
72
|
-
swarmvault graph stats
|
|
73
|
-
swarmvault graph validate --strict
|
|
74
|
-
swarmvault graph update .
|
|
75
|
-
swarmvault update .
|
|
76
|
-
swarmvault graph cluster
|
|
77
|
-
swarmvault cluster-only
|
|
78
|
-
swarmvault graph tree --output ./exports/tree.html
|
|
79
|
-
swarmvault tree --output ./exports/tree.html
|
|
80
|
-
swarmvault graph query "Which nodes bridge the biggest clusters?"
|
|
81
|
-
swarmvault graph explain "concept:drift"
|
|
82
|
-
swarmvault watch status
|
|
83
|
-
swarmvault watch --repo --once
|
|
84
|
-
swarmvault hook install
|
|
64
|
+
swarmvault compile
|
|
65
|
+
swarmvault query "What is the auth flow?"
|
|
85
66
|
swarmvault graph serve
|
|
86
|
-
swarmvault graph export --report ./exports/report.html
|
|
87
|
-
swarmvault graph export --html ./exports/graph.html
|
|
88
|
-
swarmvault graph export --cypher ./exports/graph.cypher
|
|
89
|
-
swarmvault graph export --neo4j ./exports/graph.cypher
|
|
90
|
-
swarmvault graph merge ./exports/graph.json ./other-graph.json --out ./exports/merged-graph.json
|
|
91
|
-
swarmvault merge-graphs ./exports/graph.json ./other-graph.json --out ./exports/merged-graph.json
|
|
92
|
-
swarmvault graph push neo4j --dry-run
|
|
93
|
-
swarmvault clone https://github.com/owner/repo --no-viz
|
|
94
67
|
```
|
|
95
68
|
|
|
69
|
+
Use `source add` for recurring inputs (`swarmvault source add https://github.com/karpathy/micrograd`, `swarmvault source add https://example.com/docs/getting-started`, `swarmvault source list`, `swarmvault source reload --all`, and `swarmvault source session file-customer-call-srt-12345678`). Use advanced graph/context surfaces when needed: `swarmvault graph status ./src`, `swarmvault check-update ./src`, `swarmvault update ./src`, `swarmvault graph stats`, `swarmvault graph validate --strict`, `swarmvault graph cluster`, `swarmvault cluster-only`, `swarmvault tree --output ./exports/tree.html`, `swarmvault export ai --out ./exports/ai`, `swarmvault context build "Ship this feature safely" --target ./src --budget 8000`, and `swarmvault task start "Ship this feature safely" --target ./src --agent codex`.
|
|
70
|
+
|
|
96
71
|
## Commands
|
|
97
72
|
|
|
98
73
|
### `swarmvault init [--obsidian] [--profile <alias-or-presets>]`
|
|
@@ -116,6 +91,19 @@ Set `SWARMVAULT_OUT=<dir>` when generated artifacts should be isolated from the
|
|
|
116
91
|
|
|
117
92
|
`--profile` accepts `default`, `personal-research`, or a comma-separated preset list such as `reader,timeline`. For fully custom vault behavior, edit the `profile` block in `swarmvault.config.json`; that deterministic profile layer works alongside the human-written `swarmvault.schema.md`. The `personal-research` preset also sets `profile.guidedIngestDefault: true` and `profile.deepLintDefault: true`, so guided ingest/source and lint flows are on by default until you override them with `--no-guide` or `--no-deep`.
|
|
118
93
|
|
|
94
|
+
### `swarmvault quickstart <directory|github-url> [--port <port>] [--no-serve] [--no-viz] [--mcp] [--branch <name>] [--ref <ref>] [--checkout-dir <path>]`
|
|
95
|
+
|
|
96
|
+
Beginner-friendly alias for `swarmvault scan`.
|
|
97
|
+
|
|
98
|
+
- initializes the current directory as a SwarmVault workspace
|
|
99
|
+
- ingests the supplied local directory, or registers/syncs the supplied public GitHub repo root URL
|
|
100
|
+
- compiles wiki, graph, search, and share artifacts immediately
|
|
101
|
+
- prints the generated `raw/`, `wiki/`, `state/graph.json`, and `wiki/graph/` paths in human output
|
|
102
|
+
- starts `graph serve` unless you pass `--no-serve` or `--no-viz`
|
|
103
|
+
- keeps the same JSON output contract as `scan`
|
|
104
|
+
|
|
105
|
+
Use this as the default first-run command in docs and onboarding.
|
|
106
|
+
|
|
119
107
|
### `swarmvault scan <directory|github-url> [--port <port>] [--no-serve] [--no-viz] [--mcp] [--branch <name>] [--ref <ref>] [--checkout-dir <path>]`
|
|
120
108
|
|
|
121
109
|
Quick-start a scratch vault from a local directory or public GitHub repo root URL in one command.
|
package/dist/index.js
CHANGED
|
@@ -319,9 +319,9 @@ program.name("swarmvault").description("SwarmVault is a local-first knowledge co
|
|
|
319
319
|
function readCliVersion() {
|
|
320
320
|
try {
|
|
321
321
|
const packageJson = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
|
|
322
|
-
return typeof packageJson.version === "string" && packageJson.version.trim() ? packageJson.version : "3.
|
|
322
|
+
return typeof packageJson.version === "string" && packageJson.version.trim() ? packageJson.version : "3.13.0";
|
|
323
323
|
} catch {
|
|
324
|
-
return "3.
|
|
324
|
+
return "3.13.0";
|
|
325
325
|
}
|
|
326
326
|
}
|
|
327
327
|
function parsePositiveInt(value, fallback) {
|
|
@@ -608,10 +608,19 @@ async function runScanCommand(input, options) {
|
|
|
608
608
|
const shareKitPath = path2.join(paths.wikiDir, "graph", "share-kit");
|
|
609
609
|
if (!isJson()) {
|
|
610
610
|
log(`Compiled ${compiled.sourceCount} source(s), ${compiled.pageCount} page(s).`);
|
|
611
|
+
log(`Vault workspace: ${rootDir}`);
|
|
612
|
+
log(`Raw sources: ${paths.rawDir}`);
|
|
613
|
+
log(`Wiki output: ${paths.wikiDir}`);
|
|
614
|
+
log(`Graph JSON: ${paths.graphPath}`);
|
|
611
615
|
log(`Share card: ${shareCardPath}`);
|
|
612
616
|
log(`Visual card: ${shareCardSvgPath}`);
|
|
613
617
|
log(`Share kit: ${shareKitPath}`);
|
|
614
|
-
log("
|
|
618
|
+
log("");
|
|
619
|
+
log("Next steps:");
|
|
620
|
+
log(' swarmvault query "What are the key concepts?"');
|
|
621
|
+
log(" swarmvault graph serve");
|
|
622
|
+
log(" swarmvault doctor");
|
|
623
|
+
log(" swarmvault candidate list");
|
|
615
624
|
}
|
|
616
625
|
if (options.mcp) {
|
|
617
626
|
process2.stderr.write(`${JSON.stringify({ status: "running", transport: "stdio", compiled: compiled.sourceCount })}
|
|
@@ -762,6 +771,7 @@ program.hook("postAction", async (_thisCommand, actionCommand) => {
|
|
|
762
771
|
emitNotice(notice);
|
|
763
772
|
}
|
|
764
773
|
});
|
|
774
|
+
program.command("quickstart").description("Beginner path: initialize, ingest, compile, and optionally open the graph viewer in one command.").argument("<input>", "Directory or public GitHub repo root URL to turn into a vault").option("--port <port>", "Port for the graph viewer").option("--no-serve", "Skip launching the graph viewer after compile").option("--no-viz", "Compatibility alias for --no-serve; skip launching the graph viewer after compile").option("--mcp", "Start the MCP stdio server after compile instead of launching the graph viewer", false).option("--branch <name>", "GitHub branch to clone when the input is a public repo URL").option("--ref <ref>", "Git ref, tag, or commit to check out when the input is a public repo URL").option("--checkout-dir <path>", "Persistent checkout directory for a public GitHub repo input").action(runScanCommand);
|
|
765
775
|
program.command("init").description("Initialize a SwarmVault workspace in the current directory.").option("--obsidian", "Generate a minimal .obsidian workspace alongside the vault", false).option(
|
|
766
776
|
"--profile <profile>",
|
|
767
777
|
"Starter workspace profile or comma-separated preset list (for example: personal-research or reader,timeline)"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swarmvaultai/cli",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.13.0",
|
|
4
4
|
"description": "Global CLI for SwarmVault.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"prepublishOnly": "node ../../scripts/check-release-sync.mjs && node ../../scripts/check-published-manifests.mjs"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@swarmvaultai/engine": "3.
|
|
47
|
+
"@swarmvaultai/engine": "3.13.0",
|
|
48
48
|
"commander": "^14.0.1"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|