context-vault 2.8.6 → 2.8.7
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 +15 -16
- package/bin/cli.js +27 -3
- package/node_modules/@context-vault/core/package.json +1 -1
- package/package.json +2 -2
- package/scripts/postinstall.js +12 -7
package/README.md
CHANGED
|
@@ -10,16 +10,13 @@ Persistent memory for AI agents — saves and searches knowledge across sessions
|
|
|
10
10
|
## Quick Start
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
|
-
|
|
14
|
-
context-vault setup
|
|
13
|
+
npx context-vault setup
|
|
15
14
|
```
|
|
16
15
|
|
|
17
|
-
Setup
|
|
16
|
+
One command — no global install required. Setup detects your AI tools (Claude Code, Codex, Claude Desktop, Cursor, Windsurf, Cline, and more), downloads the embedding model (~22MB), seeds your vault, and configures MCP.
|
|
18
17
|
|
|
19
18
|
Then open your AI tool and try: **"Search my vault for getting started"**
|
|
20
19
|
|
|
21
|
-
> `context-mcp` still works as a CLI alias — `context-vault` is the primary command.
|
|
22
|
-
|
|
23
20
|
## What It Does
|
|
24
21
|
|
|
25
22
|
- **Save** — insights, decisions, patterns, contacts. Your AI agent writes them as you work.
|
|
@@ -43,17 +40,19 @@ Entries are organized by `kind` (insight, decision, pattern, reference, contact,
|
|
|
43
40
|
|
|
44
41
|
## CLI
|
|
45
42
|
|
|
46
|
-
| Command
|
|
47
|
-
|
|
|
48
|
-
| `context-vault setup`
|
|
49
|
-
| `context-vault
|
|
50
|
-
| `context-vault
|
|
51
|
-
| `context-vault
|
|
52
|
-
| `context-vault
|
|
53
|
-
| `context-vault
|
|
54
|
-
| `context-vault
|
|
55
|
-
| `context-vault
|
|
56
|
-
| `context-vault
|
|
43
|
+
| Command | Description |
|
|
44
|
+
| ----------------------------- | --------------------------------------------------------- |
|
|
45
|
+
| `context-vault setup` | Interactive installer — detects tools, writes MCP configs |
|
|
46
|
+
| `context-vault connect --key` | Connect AI tools to hosted vault |
|
|
47
|
+
| `context-vault switch` | Switch between local and hosted MCP modes |
|
|
48
|
+
| `context-vault serve` | Start the MCP server (used by AI clients) |
|
|
49
|
+
| `context-vault status` | Vault health, paths, entry counts |
|
|
50
|
+
| `context-vault reindex` | Rebuild search index |
|
|
51
|
+
| `context-vault import <path>` | Import .md, .csv, .json, .txt |
|
|
52
|
+
| `context-vault export` | Export to JSON or CSV |
|
|
53
|
+
| `context-vault ingest <url>` | Fetch URL and save as vault entry |
|
|
54
|
+
| `context-vault update` | Check for updates |
|
|
55
|
+
| `context-vault uninstall` | Remove MCP configs |
|
|
57
56
|
|
|
58
57
|
## Manual MCP Config
|
|
59
58
|
|
package/bin/cli.js
CHANGED
|
@@ -38,6 +38,11 @@ function isInstalledPackage() {
|
|
|
38
38
|
return ROOT.includes("/node_modules/") || ROOT.includes("\\node_modules\\");
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
/** Detect if running via npx (ephemeral cache — paths won't survive cache eviction) */
|
|
42
|
+
function isNpx() {
|
|
43
|
+
return ROOT.includes("/_npx/") || ROOT.includes("\\_npx\\");
|
|
44
|
+
}
|
|
45
|
+
|
|
41
46
|
const bold = (s) => `\x1b[1m${s}\x1b[0m`;
|
|
42
47
|
const dim = (s) => `\x1b[2m${s}\x1b[0m`;
|
|
43
48
|
const green = (s) => `\x1b[32m${s}\x1b[0m`;
|
|
@@ -620,7 +625,14 @@ async function configureClaude(tool, vaultDir) {
|
|
|
620
625
|
} catch {}
|
|
621
626
|
|
|
622
627
|
try {
|
|
623
|
-
if (
|
|
628
|
+
if (isNpx()) {
|
|
629
|
+
const cmdArgs = ["-y", "context-vault", "serve"];
|
|
630
|
+
if (vaultDir) cmdArgs.push("--vault-dir", `"${vaultDir}"`);
|
|
631
|
+
execSync(
|
|
632
|
+
`claude mcp add -s user context-vault -- npx ${cmdArgs.join(" ")}`,
|
|
633
|
+
{ stdio: "pipe", env },
|
|
634
|
+
);
|
|
635
|
+
} else if (isInstalledPackage()) {
|
|
624
636
|
const launcherPath = join(HOME, ".context-mcp", "server.mjs");
|
|
625
637
|
const cmdArgs = [`"${launcherPath}"`];
|
|
626
638
|
if (vaultDir) cmdArgs.push("--vault-dir", `"${vaultDir}"`);
|
|
@@ -653,7 +665,13 @@ async function configureCodex(tool, vaultDir) {
|
|
|
653
665
|
} catch {}
|
|
654
666
|
|
|
655
667
|
try {
|
|
656
|
-
if (
|
|
668
|
+
if (isNpx()) {
|
|
669
|
+
const cmdArgs = ["-y", "context-vault", "serve"];
|
|
670
|
+
if (vaultDir) cmdArgs.push("--vault-dir", `"${vaultDir}"`);
|
|
671
|
+
execSync(`codex mcp add context-vault -- npx ${cmdArgs.join(" ")}`, {
|
|
672
|
+
stdio: "pipe",
|
|
673
|
+
});
|
|
674
|
+
} else if (isInstalledPackage()) {
|
|
657
675
|
const launcherPath = join(HOME, ".context-mcp", "server.mjs");
|
|
658
676
|
const cmdArgs = [`"${launcherPath}"`];
|
|
659
677
|
if (vaultDir) cmdArgs.push("--vault-dir", `"${vaultDir}"`);
|
|
@@ -701,7 +719,13 @@ function configureJsonTool(tool, vaultDir) {
|
|
|
701
719
|
// Clean up old "context-mcp" key
|
|
702
720
|
delete config[tool.configKey]["context-mcp"];
|
|
703
721
|
|
|
704
|
-
if (
|
|
722
|
+
if (isNpx()) {
|
|
723
|
+
const serverArgs = vaultDir ? ["--vault-dir", vaultDir] : [];
|
|
724
|
+
config[tool.configKey]["context-vault"] = {
|
|
725
|
+
command: "npx",
|
|
726
|
+
args: ["-y", "context-vault", "serve", ...serverArgs],
|
|
727
|
+
};
|
|
728
|
+
} else if (isInstalledPackage()) {
|
|
705
729
|
const launcherPath = join(HOME, ".context-mcp", "server.mjs");
|
|
706
730
|
const serverArgs = [];
|
|
707
731
|
if (vaultDir) serverArgs.push("--vault-dir", vaultDir);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "context-vault",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Persistent memory for AI agents — saves and searches knowledge across sessions",
|
|
6
6
|
"bin": {
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@context-vault/core"
|
|
56
56
|
],
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@context-vault/core": "^2.8.
|
|
58
|
+
"@context-vault/core": "^2.8.7",
|
|
59
59
|
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
60
60
|
"better-sqlite3": "^12.6.2",
|
|
61
61
|
"sqlite-vec": "^0.1.0"
|
package/scripts/postinstall.js
CHANGED
|
@@ -90,13 +90,18 @@ async function main() {
|
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
// ── 3. Write local server launcher
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
const
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
93
|
+
// ── 3. Write local server launcher (global installs only) ────────────
|
|
94
|
+
// Under npx the path would be stale after cache eviction — configs use
|
|
95
|
+
// `npx context-vault serve` instead, so skip writing the launcher.
|
|
96
|
+
const isNpx = PKG_ROOT.includes("/_npx/") || PKG_ROOT.includes("\\_npx\\");
|
|
97
|
+
if (!isNpx) {
|
|
98
|
+
const SERVER_ABS = join(PKG_ROOT, "src", "server", "index.js");
|
|
99
|
+
const DATA_DIR = join(homedir(), ".context-mcp");
|
|
100
|
+
const LAUNCHER = join(DATA_DIR, "server.mjs");
|
|
101
|
+
mkdirSync(DATA_DIR, { recursive: true });
|
|
102
|
+
writeFileSync(LAUNCHER, `import "${SERVER_ABS}";\n`);
|
|
103
|
+
console.log("[context-vault] Local server launcher written to " + LAUNCHER);
|
|
104
|
+
}
|
|
100
105
|
}
|
|
101
106
|
|
|
102
107
|
main().catch(() => {});
|