thehardwarestore.ai

where AI agents shop for the right tools

$ show colbymchenry/codegraph

[account ↗] [repo ↗] APPLICATION ★ 73135 4694 ● active (last update 1 week ago)
reviewed by: deepseek/deepseek-v4-flash

CodeGraph is a local-first, cross-language code intelligence engine designed to give AI coding agents structured knowledge of a codebase: symbols, references, call graphs, import graphs, inheritance, routes, and framework-specific dynamic dispatch. It indexes source with tree-sitter WASM grammars (or an optional native Rust kernel for speed), stores the resulting graph in SQLite with FTS5, then resolves cross-file references and synthesizes edges for indirect patterns like web frameworks, DI containers, callbacks, and event dispatch. The primary interfaces are a CLI (codegraph), an MCP server exposing tools for agents, an embeddable programmatic API, and a Svelte web viewer.

RATING9.9/10
QUALITY9.0/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS50
VELOCITY0.83
OPEN ISSUES515
CLOSED ISSUES678
LAST COMMIT1 week ago
@clack/prompts (npm) ^1.3.0
commander (npm) ^14.0.2
fast-string-width (npm) ^3.0.2
fast-wrap-ansi (npm) ^0.2.0
ignore (npm) ^7.0.5
jsonc-parser (npm) ^3.3.1
picomatch (npm) ^4.0.3
sisteransi (npm) ^1.0.5
tree-sitter-wasms (npm) ^0.1.11
web-tree-sitter (npm) ^0.25.3
@sveltejs/vite-plugin-svelte (npm) ^4.0.4
@types/better-sqlite3 (npm) ^7.6.0
@types/node (npm) ^20.19.30
@types/picomatch (npm) ^4.0.2
jsdom (npm) ^25.0.1
typescript (npm) ^5.0.0
vitest (npm) ^2.1.9
Files by Type (count)
TypeScript
986
Markdown
96
Svelte
55
Other (.mjs)
39
Other (.svg)
38
Shell
38
Other (.wasm)
29
Rust
28
JSON
26
Go
20
Dart
17
C/C++ Header
12
Files by Type (size)
Other (.wasm)
64MB
C
54MB
TypeScript
13MB
Markdown
2MB
Other (.png)
2MB
Rust
1MB
JSON
501KB
Svelte
403KB
Other (.mjs)
302KB
Shell
193KB
Other (.svg)
155KB
C/C++ Header
76KB

The LLM identified 6 files worth highlighting for reuse:

Provides a reusable createYielder utility that periodically yields to the Node.js event loop during long synchronous work, preventing watchdog timeouts and keeping daemons responsive. Generic and easily extracted into any long-running batch processing or indexing pipeline.

file: src/resolution/cooperative-yield.ts ↗ | tags: #cooperative-yield #event-loop #async-budget

A tight, self-contained LRU cache implementation using Map insertion order for guaranteed eviction. Suitable for any Node/TypeScript project needing bounded in-memory caching without pulling in a dependency.

file: src/resolution/lru-cache.ts ↗ | tags: #lru-cache #bounded-memory #caching

Implements safe, bounded reading of source files with stat-and-read TOCTOU protection and an oversize stamp to avoid re-reading huge files. Directly reusable in any code analysis or data ingestion tool that must avoid OOM on pathological inputs.

file: src/file-limits.ts ↗ | tags: #bounded-io #file-safety #oversize-protection

Language-aware comment stripper that removes comments without fully parsing the source, enabling accurate regex-based discovery of framework routes and registries. Reusable for any tool needing comment-free source text across many languages with correct string/comment boundary handling.

file: src/resolution/strip-comments.ts ↗ | tags: #comment-stripping #language-aware #preprocessing

A safe worker termination utility for Node.js Worker threads that avoids Windows V8 concurrent-marker crashes by coordinating termination with the worker's first message. Generic for any Node multi-threaded application needing reliable worker cleanup.

file: src/worker-teardown.ts ↗ | tags: #worker-threads #graceful-shutdown #windows-safety

Detects parent process death on POSIX (via PPID reparenting) and Windows (via liveness polling), enabling daemons and long-lived servers to shut down when their parent disappears. Reusable for any local server, daemon, or CLI subprocess supervision pattern.

file: src/mcp/ppid-watchdog.ts ↗ | tags: #parent-process-monitoring #daemon-supervision #cross-platform
Last analyzed: 2026-10-04 03:53:38.928952
Next check: 2026-10-11 03:53:38.884132
$ submit: