cartogopher 5.0.2 → 5.0.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 +10 -14
- package/bin/cartogopher.js +16 -35
- package/binaries/darwin-arm64/cartogopher +0 -0
- package/package.json +2 -7
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# cartogopher
|
|
2
2
|
|
|
3
|
-
AI-native code intelligence: parses codebases into a searchable graph of functions, types, endpoints, and call relationships.
|
|
3
|
+
AI-native code intelligence: parses codebases into a searchable graph of functions, types, endpoints, and call relationships.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
@@ -8,9 +8,7 @@ AI-native code intelligence: parses codebases into a searchable graph of functio
|
|
|
8
8
|
npm install -g cartogopher
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
Try it without installing globally:
|
|
11
|
+
Or use without a global install:
|
|
14
12
|
|
|
15
13
|
```bash
|
|
16
14
|
npx cartogopher bake
|
|
@@ -21,28 +19,26 @@ npx cartogopher bake
|
|
|
21
19
|
```bash
|
|
22
20
|
export CARTOGOPHER_API_KEY=cg_live_your_key
|
|
23
21
|
cd your-project
|
|
24
|
-
cartogopher bake # parse the codebase
|
|
22
|
+
cartogopher bake # parse the codebase
|
|
25
23
|
cartogopher install-skill # drop the skill into .claude/skills/cartogopher/
|
|
26
24
|
```
|
|
27
25
|
|
|
28
|
-
|
|
26
|
+
Any Claude Code agent in this project now knows how to use cartogopher — it calls `cartogopher search`, `cartogopher impact`, etc. through the regular `Bash` tool.
|
|
27
|
+
|
|
28
|
+
For a system-wide install (works in every project on your machine):
|
|
29
29
|
|
|
30
|
-
For a system-wide install (works in every project):
|
|
31
30
|
```bash
|
|
32
|
-
cartogopher install-skill --global
|
|
31
|
+
cartogopher install-skill --global
|
|
33
32
|
```
|
|
34
33
|
|
|
35
|
-
## MCP server (alternative
|
|
36
|
-
|
|
37
|
-
If you'd rather plug in as an MCP server instead of a skill:
|
|
34
|
+
## MCP server (alternative)
|
|
38
35
|
|
|
39
36
|
```bash
|
|
40
37
|
cartogopher mcp
|
|
41
38
|
```
|
|
42
39
|
|
|
43
|
-
Configure your MCP client to invoke that command.
|
|
40
|
+
Configure your MCP client to invoke that command.
|
|
44
41
|
|
|
45
42
|
## Docs
|
|
46
43
|
|
|
47
|
-
-
|
|
48
|
-
- Docs: https://cartogopher.com/docs
|
|
44
|
+
- https://cartogopher.com
|
package/bin/cartogopher.js
CHANGED
|
@@ -5,42 +5,30 @@ const { spawnSync } = require("child_process");
|
|
|
5
5
|
const path = require("path");
|
|
6
6
|
const fs = require("fs");
|
|
7
7
|
|
|
8
|
-
const PLATFORM_PACKAGES = {
|
|
9
|
-
"darwin-arm64": "@cartogopher.com/darwin-arm64",
|
|
10
|
-
"darwin-x64": "@cartogopher.com/darwin-x64",
|
|
11
|
-
"linux-x64": "@cartogopher.com/linux-x64",
|
|
12
|
-
"linux-arm64": "@cartogopher.com/linux-arm64",
|
|
13
|
-
};
|
|
14
|
-
|
|
15
8
|
function resolveBinary() {
|
|
16
9
|
const key = `${process.platform}-${process.arch}`;
|
|
17
|
-
const
|
|
18
|
-
|
|
10
|
+
const exeName = process.platform === "win32" ? "cartogopher.exe" : "cartogopher";
|
|
11
|
+
const binary = path.join(__dirname, "..", "binaries", key, exeName);
|
|
12
|
+
if (!fs.existsSync(binary)) {
|
|
19
13
|
console.error(
|
|
20
|
-
`cartogopher:
|
|
14
|
+
`cartogopher: this build does not include a binary for ${key}.\n` +
|
|
15
|
+
`Supported in this release: ${listAvailable().join(", ") || "(none)"}.\n` +
|
|
16
|
+
`Try: npm install cartogopher@latest`
|
|
21
17
|
);
|
|
22
18
|
process.exit(1);
|
|
23
19
|
}
|
|
20
|
+
return binary;
|
|
21
|
+
}
|
|
24
22
|
|
|
25
|
-
|
|
23
|
+
function listAvailable() {
|
|
24
|
+
const dir = path.join(__dirname, "..", "binaries");
|
|
26
25
|
try {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
console.error(
|
|
30
|
-
`cartogopher: platform package '${pkg}' is not installed.\n` +
|
|
31
|
-
`This usually means npm skipped optional dependencies, or the platform package failed to download.\n` +
|
|
32
|
-
`Try: npm install -g ${pkg}`
|
|
26
|
+
return fs.readdirSync(dir).filter((d) =>
|
|
27
|
+
fs.statSync(path.join(dir, d)).isDirectory()
|
|
33
28
|
);
|
|
34
|
-
|
|
29
|
+
} catch {
|
|
30
|
+
return [];
|
|
35
31
|
}
|
|
36
|
-
|
|
37
|
-
const exeName = process.platform === "win32" ? "cartogopher.exe" : "cartogopher";
|
|
38
|
-
const binary = path.join(path.dirname(pkgJsonPath), "bin", exeName);
|
|
39
|
-
if (!fs.existsSync(binary)) {
|
|
40
|
-
console.error(`cartogopher: binary missing at ${binary}`);
|
|
41
|
-
process.exit(1);
|
|
42
|
-
}
|
|
43
|
-
return binary;
|
|
44
32
|
}
|
|
45
33
|
|
|
46
34
|
function mcpScriptPath() {
|
|
@@ -52,7 +40,6 @@ function bundledSkillPath() {
|
|
|
52
40
|
}
|
|
53
41
|
|
|
54
42
|
function installSkill(argv) {
|
|
55
|
-
// Usage: cartogopher install-skill [--global] [--dest <dir>]
|
|
56
43
|
const flagGlobal = argv.includes("--global");
|
|
57
44
|
const destIdx = argv.indexOf("--dest");
|
|
58
45
|
const targetRoot = destIdx >= 0 && argv[destIdx + 1]
|
|
@@ -70,8 +57,7 @@ function installSkill(argv) {
|
|
|
70
57
|
fs.mkdirSync(targetRoot, { recursive: true });
|
|
71
58
|
const dest = path.join(targetRoot, "SKILL.md");
|
|
72
59
|
fs.copyFileSync(src, dest);
|
|
73
|
-
console.log(`Installed cartogopher skill
|
|
74
|
-
console.log("Claude Code agents in this project can now load it via /cartogopher.");
|
|
60
|
+
console.log(`Installed cartogopher skill -> ${dest}`);
|
|
75
61
|
process.exit(0);
|
|
76
62
|
}
|
|
77
63
|
|
|
@@ -82,12 +68,7 @@ if (args[0] === "install-skill") {
|
|
|
82
68
|
|
|
83
69
|
const binary = resolveBinary();
|
|
84
70
|
const env = { ...process.env, CARTOGOPHER_MCP_SCRIPT: mcpScriptPath() };
|
|
85
|
-
|
|
86
|
-
const result = spawnSync(binary, args, {
|
|
87
|
-
stdio: "inherit",
|
|
88
|
-
env,
|
|
89
|
-
});
|
|
90
|
-
|
|
71
|
+
const result = spawnSync(binary, args, { stdio: "inherit", env });
|
|
91
72
|
if (result.error) {
|
|
92
73
|
console.error(`cartogopher: failed to exec binary: ${result.error.message}`);
|
|
93
74
|
process.exit(1);
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cartogopher",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.3",
|
|
4
4
|
"description": "AI-native code intelligence: parses codebases into a searchable graph of functions, types, endpoints, and call relationships. CLI + MCP server.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"cartogopher": "bin/cartogopher.js"
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"bin",
|
|
10
10
|
"lib",
|
|
11
11
|
"share",
|
|
12
|
+
"binaries",
|
|
12
13
|
"README.md"
|
|
13
14
|
],
|
|
14
15
|
"engines": {
|
|
@@ -34,11 +35,5 @@
|
|
|
34
35
|
],
|
|
35
36
|
"dependencies": {
|
|
36
37
|
"@modelcontextprotocol/sdk": "^1.18.2"
|
|
37
|
-
},
|
|
38
|
-
"optionalDependencies": {
|
|
39
|
-
"cartogopher-darwin-arm64": "5.0.2",
|
|
40
|
-
"cartogopher-darwin-x64": "5.0.2",
|
|
41
|
-
"cartogopher-linux-x64": "5.0.2",
|
|
42
|
-
"cartogopher-linux-arm64": "5.0.2"
|
|
43
38
|
}
|
|
44
39
|
}
|