domain-scan
Structural code intelligence and subsystem maps via tree-sitter
Parse a polyglot codebase into a deterministic structural index, search it from an agent-first CLI, and turn manifests into Tube Map views of domains, services, and subsystem boundaries.
Available for macOS, Linux, and Windows. All downloads

From parse to map
Large codebases hide two kinds of structure at once: the low-level API surface and the higher-level subsystem boundaries. Most tooling gives you one or the other, and AI agents end up wasting time on directory walks, grep loops, and partial guesses.
domain-scan uses tree-sitter queries to extract the structural graph directly from source code, then layers subsystem matching and Tube Map visualisation on top so humans and agents can reason about the same model.
- Which interfaces, services, schemas, and routes actually exist?
- What is the right slice of the repo to hand to an AI agent?
- How do auth, billing, ingestion, and front-end subsystems connect?
- Where are the unmatched seams in the current system map?
Parse the repo with tree-sitter and build a deterministic structural index across interfaces, services, methods, schemas, and types.
domain-scan scan --output json --fields statsQuery the index with field masks so agents get the exact slice of the codebase they need instead of a token-heavy dump.
domain-scan search "auth" --output json --fields "name,kind,file"Bootstrap or load a manifest, match entities into domains and subsystems, then inspect the Tube Map to trace architecture boundaries.
domain-scan init --bootstrap -o system.jsonWhat it does
Deterministic structural analysis for developers, reviewers, and AI agents.
Tube Map Visualiser
Render domains as coloured lines and subsystems as stations. Trace dependencies, inspect coverage, and drill into subsystems from the desktop app.
Agentic Search CLI
Search entity names, scope output with --fields, introspect schemas at runtime, and generate prompts or unmatched-item tasks for sub-agents.
Full Structural Census
Extract every interface, service, class, method, function, schema, type alias, and implementation. Complete API surface in one scan.
Manifest Bootstrap + Matching
Infer a starting system.json, match entities into subsystems by file path, import graph, and naming, then iterate until coverage is clean.
Cross-File Resolution
Track imports, exports, protocols, traits, and interface implementations across files so relationships survive monorepo boundaries.
12 Languages
TypeScript, Python, Rust, Go, Java, Kotlin, C#, Swift, C++, PHP, Ruby, and Scala. Language support comes from declarative .scm query files.
See it in action
Structural views for code search, route audits, and subsystem visualisation.

Searchable structural inventory for interfaces, methods, and types.

Controllers and route surfaces extracted straight from source.

Whole-system Tube Map with domain lines, dependency edges, and coverage status.
CLI usage
Search the structural index, bootstrap subsystem manifests, and prepare scoped prompts for agents.
domain-scan scan --output json --fields statsdomain-scan search "auth" --output json --fields "name,kind,file"domain-scan interfaces --output json --fields "name,file,methods_count"domain-scan init --bootstrap -o system.jsondomain-scan match --manifest system.json --output json --fields coverage_percent,unmatched_countdomain-scan match --manifest system.json --prompt-unmatched --agents 3domain-scan skills install --codexdomain-scan schema matchInstallation
Desktop App
Download the latest release for macOS, Linux, or Windows and open the Tube Map locally.
Download for macOSCLI
Install the CLI via Cargo for automation, shell workflows, and agent tooling.
cargo install --git https://github.com/jamesaphoenix/domain-scan domain-scan-cliBuild from Source
Clone the repository and build the CLI, tests, or Tauri app yourself.
git clone https://github.com/jamesaphoenix/domain-scan
cd domain-scan
cargo build --release -p domain-scan-cliSupported languages
Declarative tree-sitter query files across 12 languages. Adding a new language means writing .scm files, not reworking the Rust core.
Parse the repo once. Search it like data. View it as a system.
Free and open source. Structural extraction for humans, scoped prompts for agents, and Tube Map views for subsystem reasoning.