All Tools
CLI • TUI • Desktop App

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.

Structural searchSubsystem Tube MapPrompt generationManifest matching

Available for macOS, Linux, and Windows. All downloads

domain-scan Tube Map filtered to the Platform Core domain to inspect subsystem boundaries

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?
Scan once

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 stats
Search for agent context

Query 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"
Render the subsystem map

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.json

What 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.

domain-scan interface explorer showing extracted interfaces and method counts across a TypeScript codebase

Searchable structural inventory for interfaces, methods, and types.

domain-scan services view showing HTTP controllers and routes extracted from source code

Controllers and route surfaces extracted straight from source.

domain-scan Tube Map showing domains as coloured lines and subsystems as stations across a codebase

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.

Structural scan summary
domain-scan scan --output json --fields stats
Search for entities by concern
domain-scan search "auth" --output json --fields "name,kind,file"
Inspect interface surfaces
domain-scan interfaces --output json --fields "name,file,methods_count"
Bootstrap a manifest
domain-scan init --bootstrap -o system.json
Measure subsystem coverage
domain-scan match --manifest system.json --output json --fields coverage_percent,unmatched_count
Create agent tasks for unmatched areas
domain-scan match --manifest system.json --prompt-unmatched --agents 3
Install Codex skills
domain-scan skills install --codex
Inspect command schema at runtime
domain-scan schema match

Installation

Desktop App

Download the latest release for macOS, Linux, or Windows and open the Tube Map locally.

Download for macOS

CLI

Install the CLI via Cargo for automation, shell workflows, and agent tooling.

Terminal
cargo install --git https://github.com/jamesaphoenix/domain-scan domain-scan-cli

Build from Source

Clone the repository and build the CLI, tests, or Tauri app yourself.

Terminal
git clone https://github.com/jamesaphoenix/domain-scan
cd domain-scan
cargo build --release -p domain-scan-cli

Supported languages

Declarative tree-sitter query files across 12 languages. Adding a new language means writing .scm files, not reworking the Rust core.

TypeScriptPythonRustGoJavaKotlinC#SwiftC++PHPRubyScala

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.