This walkthrough shows real CLI output captured from the open-source angular-spotify repository during a local proof run. That sample checkout is not bundled here.
These commands use the current npm release. The output shown below is historical and does not establish behavior of that release.
To try the same CLI flow, use Node.js 22 or newer and open a terminal in the repository you want to inspect. These commands target codebase-context; the CLI uses the current directory as the project root. MCP registration and project selection are covered in the client setup guide.
The saved output below is from an earlier CLI run, not from the current commands. The machine-specific repository root is omitted from the returned file path. This capture does not verify the current package or an MCP connection.
npx -y codebase-context reindexRun this before the first map or search in a repository. Later runs can use reindex --incremental after the code changes.
npx -y codebase-context map --jsonCaptured output excerpt:
{
"project": "angular-spotify",
"architecture": {
"layers": [
{ "name": "libs", "fileCount": 252 },
{ "name": "apps", "fileCount": 6 }
]
},
"activePatterns": [
{ "name": "Effect", "adoption": "100%", "trend": "Rising" },
{ "name": "Standalone", "adoption": "100%", "trend": "Rising" },
{ "name": "RxJS", "adoption": "98%", "trend": "Rising" }
],
"bestExamples": [
{ "file": "src/lib/card.component.ts", "score": 4, "reason": "Angular TestBed" }
]
}What this shows:
- The first call gives a compact conventions map instead of raw grep output.
- The response already includes architecture layers, active patterns, and a concrete best example.
npx -y codebase-context search --query "auth headers" --intent edit --limit 3 --jsonCaptured output excerpt:
{
"status": "success",
"searchQuality": { "status": "ok", "confidence": 1 },
"preflight": {
"ready": true,
"warnings": [
"Index is aging (>24h) — results may not reflect recent changes"
],
"patterns": {
"do": [
"Constructor injection — 85% adoption",
"Standalone — 100% adoption",
"RxJS — 98% adoption"
]
},
"bestExample": "src/lib/card.component.ts"
},
"results": [
{
"file": "repos/angular-spotify/libs/web/auth/util/src/lib/interceptors/auth.interceptor.ts:10-42",
"type": "interceptor:core"
}
]
}What this shows:
- Search is the second step after the map, not a separate headline workflow.
intent=editadds preflight evidence instead of forcing a separate call.- The response stays compact while still surfacing a best example and impact hints.
npx -y codebase-context patterns --category state --jsonCaptured output excerpt:
{
"patterns": {
"stateManagement": {
"primary": {
"name": "RxJS",
"frequency": "98%",
"trend": "Rising"
},
"alsoDetected": [
{
"name": "Signals",
"frequency": "2%",
"trend": "Rising"
}
]
}
}
}What this shows:
- The tool distinguishes dominant patterns from emerging ones.
- The map/search story is backed by direct pattern evidence rather than generic prose.
- These excerpts were captured from the current local proof run and will change if the frozen sample repo or index state changes.
- File paths in the excerpts belong to that capture; your output will use the repository you run the command from.
- The benchmark documents observed local evidence and its limitations; this walkthrough demonstrates shipped behavior, not a universal performance or coding result.