Getting Started
Relevant source files
The following files were used as context for generating this wiki page:
Arbor is a local-first impact analysis engine and Code Property Graph (CPG) designed for deep understanding of large codebases. It transforms source code into a semantic dependency graph, enabling developers and AI agents to trace execution paths, identify blast radii of changes, and resolve cross-file relationships with structural certainty.
The system is composed of several core components: a Rust-based indexing and graph engine, a Command Line Interface (CLI), a native Graphical User Interface (GUI), and a Model Context Protocol (MCP) bridge for AI integration.
Sources: README.md:14-25, crates/arbor-graph/README.md
System Prerequisites
To build and run Arbor from source, the following environments must be configured:
- Rust (1.70+): Required for building the core crates, including the graph engine and CLI.
- Flutter (3.0+): Required for building and running the native visualizer/GUI.
- Node.js: Necessary for testing specific language parsers, such as TypeScript.
- Linux Dependencies: Specific system libraries are required for the GUI on Linux systems, including
libx11-dev,libgtk-3-dev, andcmake.
Sources: CONTRIBUTING.md:33-40, README.md:166-169
Installation and Initial Setup
Arbor can be installed directly via Cargo or built from the source repository.
Standard Installation
The most common way to install the Arbor CLI and GUI tools is through the Rust package manager:
cargo install arbor-graph-cli
Sources: README.md:88-90, crates/arbor-cli/README.md:25-27
Building from Source
For development or custom builds, clone the repository and build the Rust workspace:
git clone https://github.com/Anandb71/arbor.git
cd arbor/crates
cargo build --release
Sources: CONTRIBUTING.md:43-48, README.md:160-164
Project Initialization and Indexing
To begin analyzing a codebase, Arbor must first initialize a configuration directory and index the project's source files.
- Initialize: Run
arbor initin the project root. This creates a.arbor/directory containingconfig.json, which defines supported languages and ignore patterns. - Index: Run
arbor index. The indexer scans the directory, respects.gitignore, and builds a graph of code nodes (functions, classes, structs) and edges (calls, imports).
Initialization Logic Flow
The following diagram illustrates the initialization and indexing process:
Primary Interaction Modes
Arbor provides three distinct interfaces for interacting with the code graph:
1. Command Line Interface (CLI)
The CLI supports direct queries, impact analysis, and server management.
| Command | Purpose |
|---|---|
arbor refactor <symbol> | Analyzes the "blast radius" of a symbol to predict breakage. |
arbor query <text> | Searches the graph for specific symbols or partial matches. |
arbor status | Displays indexing statistics, including node counts and file coverage. |
arbor check-health | Performs system diagnostics on the environment and ports. |
Sources: crates/arbor-cli/src/commands.rs:360-390, crates/arbor-cli/README.md:40-50
2. Graphical User Interface (GUI)
The native GUI provides an interactive visualization of the logic forest. Users can explore transitive dependencies and visualize impact levels using a force-directed layout.
arbor gui
Sources: README.md:65-71, crates/arbor-cli/src/commands.rs:595-625
3. AI Bridge (MCP)
Arbor implements the Model Context Protocol (MCP), allowing AI agents like Claude to programmatically query the codebase graph.
arbor bridge --viz
This command starts an MCP server over stdio while optionally launching the visualizer in "Spotlight" mode, where the GUI follows the AI's focus.
Sources: crates/arbor-mcp/README.md:25-35, crates/arbor-cli/src/commands.rs:434-450
Core Architecture and Data Flow
Arbor's architecture relies on a shared graph state that can be updated in real-time.
Language Support
Arbor uses parser_v2.rs to consolidate Tree-sitter queries for multiple languages. Supported entities include functions, classes, interfaces, and methods across 10 major languages.
| Language | Status | Supported Entities |
|---|---|---|
| Rust | ✅ | fn, struct, trait, impl, macro |
| TypeScript | ✅ | class, interface, method, type |
| Python | ✅ | class, def, decorator, import |
| Go | ✅ | struct, interface, func, method |
| C# | ✅ | class, method, property, interface |
Sources: README.md:143-155, crates/arbor-core/README.md:20-30, crates/arbor-core/src/parser_v2.rs:100-150
Summary
To get started with Arbor, install the CLI, initialize your project root with arbor init, and run arbor index to build the semantic graph. From there, you can perform impact analysis via arbor refactor, explore the codebase visually with arbor gui, or connect AI tools using the arbor bridge.