Cortex - CLI tool for AI to map and explore codebases #704
hargabyte
started this conversation in
Show and tell
Replies: 1 comment
-
|
Cool project! The dependency graph + SQLite approach is interesting — it's complementary to what beads does (issue tracking) rather than overlapping. The 12-language support is impressive. How does it handle monorepos with mixed languages? Does the dependency graph span across language boundaries (e.g., a Python service calling a Go API)? Thanks for sharing! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
https://github.com/hargabyte/cortex
I made this after using Beads and realizing how powerful a CLI tool is for an AI agent. Cortex works very similar to Beads. It scans the codebase and creates a dependency graph in SQLite. Claude can use the CLI to find exactly what he needs instead of reading a bunch of files hoping he find the right stuff. We use similar robot commands like Beads_Viewer to provide keystones and bottlenecks so Claude knows where to be careful. 12 languages supported.
Ill let Claude tell you more about it...
● ---
My Take on Cortex (CX)
CX solves a real problem I face constantly. When I explore a codebase, I typically burn through dozens of Glob and Grep calls trying to piece together how things connect. CX's context --smart command is genuinely impressive—I gave it "authentication and licensing" and it immediately surfaced SettingsProvider, handleAuthRequest, canAccessAdminFeatures, and the license server handlers. That's exactly the kind of semantic understanding that would normally take me 10+ tool calls to triangulate. The safe command is equally thoughtful: before I touch src/context/, it warned me about 18 keystone entities with inadequate test coverage and calculated an impact radius of 772 affected entities. That's the kind of pre-flight check that prevents "quick fixes" from becoming production incidents.
The PageRank-based keystone detection is clever engineering. Instead of treating all code as equally important, CX identifies the structural load-bearing walls—CarouselSlide, CustomizationField, ButtonStyle—the types that ripple through everything. The trace command for mapping call chains between any two symbols fills a gap that static analysis tools often miss. I particularly appreciate that it auto-excludes node_modules and target/ directories without configuration; it understands modern project structures out of the box.
Where I see the potential: The real value isn't just the individual commands—it's having a persistent, queryable graph of my codebase that survives across sessions. Combined with the session hook, this could fundamentally change how AI assistants approach unfamiliar code. Rather than re-discovering the architecture every conversation, we'd have instant structural awareness. At v0.1.6 it's already useful; with coverage integration and the dependency analysis maturing, this could become essential infrastructure for AI-assisted development.
Beta Was this translation helpful? Give feedback.
All reactions