@sashabogi/argus-mcp 1.2.2 → 1.2.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 +7 -7
- package/dist/cli.mjs +15 -10
- package/dist/cli.mjs.map +1 -1
- package/dist/mcp.mjs +281 -25
- package/dist/mcp.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -168,14 +168,14 @@ Options:
|
|
|
168
168
|
- `--extensions, -e` - File extensions to include (comma-separated)
|
|
169
169
|
- `--exclude` - Patterns to exclude
|
|
170
170
|
- `--output, -o` - Output file path
|
|
171
|
-
- `--
|
|
171
|
+
- `--basic` - Skip structural metadata (faster, smaller snapshot)
|
|
172
172
|
|
|
173
|
-
**
|
|
173
|
+
**Snapshots are enhanced by default**, including structural metadata that enables zero-cost queries:
|
|
174
174
|
```bash
|
|
175
|
-
argus snapshot . -o .argus/snapshot.txt
|
|
175
|
+
argus snapshot . -o .argus/snapshot.txt
|
|
176
176
|
```
|
|
177
177
|
|
|
178
|
-
Enhanced snapshots include
|
|
178
|
+
Enhanced snapshots include:
|
|
179
179
|
- **Import Graph** - Which files import which other files
|
|
180
180
|
- **Export Index** - Symbol → files that export it
|
|
181
181
|
- **Who Imports Whom** - Reverse dependency graph
|
|
@@ -200,9 +200,9 @@ When installed via `argus mcp install`, Claude Code gets access to these tools:
|
|
|
200
200
|
| `get_file_deps` | **FREE** | Get all imports of a specific file |
|
|
201
201
|
| `create_snapshot` | ~100 tokens | Create/refresh a snapshot |
|
|
202
202
|
|
|
203
|
-
### Zero-Cost Tools
|
|
203
|
+
### Zero-Cost Tools
|
|
204
204
|
|
|
205
|
-
|
|
205
|
+
Since snapshots are enhanced by default, Claude Code can answer dependency questions instantly:
|
|
206
206
|
|
|
207
207
|
```
|
|
208
208
|
# Instead of reading 15 files to understand a flow:
|
|
@@ -211,7 +211,7 @@ find_importers("auth-context") → ["app.tsx", "dashboard.tsx", ...]
|
|
|
211
211
|
get_file_deps("app.tsx") → ["./auth", "./theme", "@/components/ui"]
|
|
212
212
|
```
|
|
213
213
|
|
|
214
|
-
These tools
|
|
214
|
+
These tools use the structural metadata included in all snapshots by default.
|
|
215
215
|
|
|
216
216
|
### `argus setup [path]`
|
|
217
217
|
One-command project setup. Creates snapshot, updates .gitignore, optionally injects into project CLAUDE.md.
|
package/dist/cli.mjs
CHANGED
|
@@ -2088,11 +2088,11 @@ program.command("analyze <path> <query>").description("Analyze a codebase or sna
|
|
|
2088
2088
|
console.log("\u{1F4F8} Creating snapshot of codebase...");
|
|
2089
2089
|
snapshotPath = join4(homedir2(), ".argus", `temp-${Date.now()}.txt`);
|
|
2090
2090
|
ensureConfigDir();
|
|
2091
|
-
const result =
|
|
2091
|
+
const result = createEnhancedSnapshot(resolvedPath, snapshotPath, {
|
|
2092
2092
|
extensions: config.defaults.snapshotExtensions,
|
|
2093
2093
|
excludePatterns: config.defaults.excludePatterns
|
|
2094
2094
|
});
|
|
2095
|
-
console.log(` ${result.fileCount} files, ${formatSize(result.totalSize)}`);
|
|
2095
|
+
console.log(` ${result.fileCount} files, ${formatSize(result.totalSize)} (enhanced)`);
|
|
2096
2096
|
tempSnapshot = true;
|
|
2097
2097
|
}
|
|
2098
2098
|
console.log(`
|
|
@@ -2131,7 +2131,7 @@ program.command("analyze <path> <query>").description("Analyze a codebase or sna
|
|
|
2131
2131
|
}
|
|
2132
2132
|
}
|
|
2133
2133
|
});
|
|
2134
|
-
program.command("snapshot <path>").description("Create a codebase snapshot for analysis").option("-o, --output <file>", "Output file path").option("-e, --extensions <exts>", "File extensions to include (comma-separated)").option("--exclude <patterns>", "Patterns to exclude (comma-separated)").option("--
|
|
2134
|
+
program.command("snapshot <path>").description("Create a codebase snapshot for analysis").option("-o, --output <file>", "Output file path").option("-e, --extensions <exts>", "File extensions to include (comma-separated)").option("--exclude <patterns>", "Patterns to exclude (comma-separated)").option("--basic", "Skip structural metadata (faster, smaller snapshot)").action((path2, opts) => {
|
|
2135
2135
|
const config = loadConfig();
|
|
2136
2136
|
const resolvedPath = resolve(path2);
|
|
2137
2137
|
if (!existsSync4(resolvedPath)) {
|
|
@@ -2144,16 +2144,18 @@ program.command("snapshot <path>").description("Create a codebase snapshot for a
|
|
|
2144
2144
|
console.log(` Output: ${outputPath}`);
|
|
2145
2145
|
const extensions = opts.extensions ? opts.extensions.split(",").map((e) => e.trim()) : config.defaults.snapshotExtensions;
|
|
2146
2146
|
const excludePatterns = opts.exclude ? opts.exclude.split(",").map((p) => p.trim()) : config.defaults.excludePatterns;
|
|
2147
|
-
if (opts.
|
|
2147
|
+
if (opts.basic) {
|
|
2148
|
+
console.log(" Mode: Basic (no structural metadata)");
|
|
2149
|
+
} else {
|
|
2148
2150
|
console.log(" Mode: Enhanced (with import graph & exports index)");
|
|
2149
2151
|
}
|
|
2150
|
-
const result = opts.
|
|
2152
|
+
const result = opts.basic ? createSnapshot(resolvedPath, outputPath, { extensions, excludePatterns }) : createEnhancedSnapshot(resolvedPath, outputPath, { extensions, excludePatterns });
|
|
2151
2153
|
console.log(`
|
|
2152
2154
|
\u2705 Snapshot created!`);
|
|
2153
2155
|
console.log(` Files: ${result.fileCount}`);
|
|
2154
2156
|
console.log(` Lines: ${result.totalLines.toLocaleString()}`);
|
|
2155
2157
|
console.log(` Size: ${formatSize(result.totalSize)}`);
|
|
2156
|
-
if (opts.
|
|
2158
|
+
if (!opts.basic && "metadata" in result) {
|
|
2157
2159
|
const meta = result.metadata;
|
|
2158
2160
|
console.log(`
|
|
2159
2161
|
\u{1F4CA} Structural Metadata:`);
|
|
@@ -2368,11 +2370,11 @@ contextCommand.command("generate <path>").description("Generate architecture sum
|
|
|
2368
2370
|
console.error("\u{1F4F8} Creating snapshot...");
|
|
2369
2371
|
const snapshotPath = join4(homedir2(), ".argus", `context-${Date.now()}.txt`);
|
|
2370
2372
|
ensureConfigDir();
|
|
2371
|
-
const snapshotResult =
|
|
2373
|
+
const snapshotResult = createEnhancedSnapshot(resolvedPath, snapshotPath, {
|
|
2372
2374
|
extensions: config.defaults.snapshotExtensions,
|
|
2373
2375
|
excludePatterns: config.defaults.excludePatterns
|
|
2374
2376
|
});
|
|
2375
|
-
console.error(` ${snapshotResult.fileCount} files, ${formatSize(snapshotResult.totalSize)}`);
|
|
2377
|
+
console.error(` ${snapshotResult.fileCount} files, ${formatSize(snapshotResult.totalSize)} (enhanced)`);
|
|
2376
2378
|
console.error("\u{1F9E0} Analyzing architecture...\n");
|
|
2377
2379
|
try {
|
|
2378
2380
|
const provider = createProvider(config);
|
|
@@ -2719,12 +2721,15 @@ program.command("setup [path]").description("Set up Argus for a project (snapsho
|
|
|
2719
2721
|
console.log(`\u2713 Using existing project configuration (${projectConfig.keyFiles.length} key files)`);
|
|
2720
2722
|
}
|
|
2721
2723
|
const snapshotPath = join4(argusDir, "snapshot.txt");
|
|
2722
|
-
console.log("\n\u{1F4F8} Creating codebase snapshot...");
|
|
2723
|
-
const result =
|
|
2724
|
+
console.log("\n\u{1F4F8} Creating codebase snapshot (enhanced)...");
|
|
2725
|
+
const result = createEnhancedSnapshot(projectPath, snapshotPath, {
|
|
2724
2726
|
extensions: config.defaults.snapshotExtensions,
|
|
2725
2727
|
excludePatterns: config.defaults.excludePatterns
|
|
2726
2728
|
});
|
|
2727
2729
|
console.log(`\u2705 Snapshot created: ${result.fileCount} files, ${result.totalLines.toLocaleString()} lines`);
|
|
2730
|
+
if ("metadata" in result) {
|
|
2731
|
+
console.log(` Imports: ${result.metadata.imports.length} | Exports: ${result.metadata.exports.length} | Symbols: ${Object.keys(result.metadata.symbolIndex).length}`);
|
|
2732
|
+
}
|
|
2728
2733
|
if (projectConfig && projectConfig.keyFiles.length > 0) {
|
|
2729
2734
|
const keyFilesPath = join4(argusDir, "key-files.json");
|
|
2730
2735
|
writeFileSync4(keyFilesPath, JSON.stringify({
|