Onboard-CLI: Visualize and Understand Unfamiliar Codebases with LLM + AST

Onboard-CLI uses LLM + AST to help developers rapidly visualize and understand new codebases.
Onboard-CLI is an early-stage open-source CLI tool that combines AST-based code structure extraction with LLM semantic understanding to help engineers onboard faster onto unfamiliar projects. By using AST to compress code into structured summaries before feeding them to an LLM, it reduces token costs, mitigates hallucinations, and generates readable architecture visualizations.
When Codebases Become Hard to Navigate: The Birth of Onboard-CLI
For every engineer joining a new project, few things are more painful than staring down a massive, unfamiliar codebase. Documentation is often outdated or missing, module dependencies are tangled, and grasping the overall architecture of a mid-to-large project can take days — or even weeks. Onboard-CLI, an open-source tool that recently appeared on Hacker News, targets exactly this pain point: it combines large language models (LLMs) with abstract syntax tree (AST) analysis to help developers quickly understand and visualize the structure of an unfamiliar codebase.
At its core, Onboard-CLI is about "onboarding" — helping developers get up to speed on new projects faster. It's a frequent, real-world engineering scenario and a niche worth watching in the AI coding tools space.

The Technical Approach: Combining AST and LLM
Why AST?
An Abstract Syntax Tree (AST) is a structured representation of source code and a fundamental data structure in compiler front-ends, with roots tracing back to compiler theory research in the 1960s. After source code goes through lexical analysis and parsing, it's represented as a tree where each node corresponds to a syntactic construct — an expression, statement, or declaration. It's called "abstract" because it omits concrete syntax details like parentheses and semicolons, retaining only the semantic skeleton of the program.
Most major languages have mature AST parsing libraries: Python has the built-in ast module, the JavaScript ecosystem has Babel Parser and Acorn, Java has JavaParser, and Rust has the syn crate. This maturity allows tools like Onboard-CLI to extract code structure across languages at relatively low cost. Compared to feeding raw code as plain text into an LLM, AST-based parsing can precisely extract function definitions, class structures, module imports, and call relationships, offering several advantages:
- Precision: Accurately identifies code structure boundaries, avoiding ambiguity in plain-text analysis.
- Structured output: Facilitates generating dependency graphs, call graphs, and other visualizations.
- Token efficiency: By extracting key structures via AST, you avoid stuffing the entire codebase into an LLM's context window, reducing cost and improving efficiency.
The Role of LLMs in Code Understanding
One of the core bottlenecks for LLMs processing code is the context window limitation. Early GPT-3 had a 4K token context; GPT-4 Turbo expanded to 128K; Claude 3 reaches 200K tokens — yet even so, a mid-sized open-source project can easily run to hundreds of thousands of lines, far exceeding any model's single-pass capacity. Simply "throwing the entire codebase at an LLM" is simply not viable. AST preprocessing is the key strategy here — by extracting structural summaries like function signatures, class definitions, and module interfaces, you can increase the information density of the input by orders of magnitude.
If AST handles "objective extraction" of code structure, LLMs take on the task of "understanding and articulation." Based on the structural information provided by AST, the model summarizes and explains module functionality, responsibilities, and relationships in natural language. This two-stage design — "first compress structurally, then understand semantically" — represents the mainstream engineering practice in today's AI coding tools, and is what sets Onboard-CLI apart from traditional static analysis tools.
Conventional AST tools (like linters or dependency analyzers) can tell you "this function calls that function," but can't explain "what this module does or why it matters." Onboard-CLI uses LLMs to fill that semantic gap.
Visualizing Codebase Architecture: Making Project Structure Immediately Clear
The phrase "visualize codebase" in the tool's name points to another key focus. Codebase visualization isn't a new concept — tools like Doxygen, PlantUML, and Graphviz have long generated static class diagrams and dependency graphs. But what they typically produce is "data-accurate but hard-to-read" charts. The core challenge for modern visualization tools is graph layout algorithms — how to render a dense dependency graph with clear hierarchical structure. Common approaches include Sugiyama hierarchical layout (suited for DAGs) and force-directed layout (suited for showing clustering).
Onboard-CLI's value proposition is that LLM-based semantic judgment about module importance can intelligently filter out noise nodes and highlight critical paths, producing more readable architecture views than traditional tools. For understanding a new project, one clear architecture diagram is often worth more than a thousand lines of documentation. By translating AST-derived module dependencies and call chains into graphical form, developers can:
- Quickly grasp the overall layered structure of a project;
- Identify core modules versus peripheral ones;
- Spot potential circular dependencies or high-coupling areas;
- Gain a reference point for refactoring and maintenance decisions.
As a CLI tool, Onboard-CLI has a clear positioning: developer-facing, workflow-integrable, and lightweight — not a bloated GUI IDE plugin. This form factor also makes it easier to integrate into CI/CD pipelines as part of a team's standardized onboarding process.
Market Positioning: A Vertical Entry Point in AI Code Understanding
Over the past two years, tools built around "AI understanding code" have proliferated, forming a multi-tiered competitive landscape. On the commercial side, Sourcegraph Cody targets enterprise-grade code search and Q&A, backed by its proprietary Code Graph technology; Pieces for Developers focuses on context-aware code snippet management; Google's Code Search provides semantic search for massive monorepos. From code generation and completion tools like GitHub Copilot and Cursor, to code search and Q&A tools like Sourcegraph Cody, Onboard-CLI has chosen a relatively vertical entry point: holistic codebase understanding and visualization, rather than line-by-line code completion.
This positioning has real-world merit. For large teams and open-source projects, slow onboarding is a genuine and costly problem. If a tool can compress the time needed to understand a project's architecture from days to hours, the value is clear. The AST + LLM combination also represents a pragmatic trend: rather than blindly relying on brute-force LLM comprehension, it uses traditional program analysis techniques to provide high-quality structured input to the LLM, striking a balance between accuracy and cost.
Current Limitations and Questions Worth Watching
To be objective: based on its Hacker News launch, Onboard-CLI is still in a very early stage with limited community traction. Several points deserve ongoing observation:
- Language support breadth: AST-based tools typically need separate parser adapters for each programming language; support for polyglot projects remains to be verified.
- Performance on large-scale projects: In codebases exceeding hundreds of thousands of lines, controlling LLM context limits and analysis costs is a critical challenge.
- Visualization usability: Whether auto-generated architecture diagrams are genuinely readable — rather than devolving into spaghetti dependency tangles — directly determines the tool's practical value.
- Output accuracy: Whether LLM-generated module descriptions are reliable and hallucination-free needs validation on real projects. Notably, research suggests that when LLMs work from structured input (such as function signatures and call relationships extracted via AST) rather than inferring from raw text, hallucination rates drop significantly — because the model has "anchorable" factual grounding. This is another important benefit of AST preprocessing: beyond saving tokens, it acts as a hallucination suppressor, constraining the model's output space to what's actually present in the code structure.
Conclusion
Onboard-CLI is a small, focused experiment in the AI coding tools ecosystem. Rather than chasing the hottest "AI writes code" trend, it has chosen the equally important but often overlooked direction of "AI reads code." Combining the structural precision of AST with the semantic understanding of LLMs is a sound technical approach — this two-stage design addresses the physical limits of context windows while using structural anchoring to reduce hallucination risk.
Although the project is still early-stage with limited community response, the problem it targets — codebase comprehension — is real and valuable. For practitioners tracking developer tools and applied AI, the evolution of tools in this direction is worth following.
Key Takeaways
Related articles

From Chat to Agent: Automating Your Entire Business Workflow with AI Agents
Veteran AI practitioner Remy breaks down the leap from chat models to AI agents: how agents work, the three pillars of context, tools, and skills, MCP connections, and hands-on architecture to make you a 100x employee.

Understand Anything: The AI Skill That Turns Code into Interactive Knowledge Graphs
Understand Anything is a high-star open-source GitHub skill that runs static analysis on any codebase and generates interactive knowledge graphs. It supports Claude Code, Cursor, Copilot and other agents, letting engineers ask questions in natural language with path references.

Kimi K3 Released: How a 2.8 Trillion Parameter Open Model Reshapes AI Cost-Effectiveness
Moonshot AI unveils Kimi K3: a 2.8 trillion parameter, 1M context, natively multimodal open model. With KDA architecture and ultra-low cost, it rivals GPT-5.6 and Fable 5, redefining AI cost-effectiveness.