All Tools

domain-scan

Structural code intelligence via tree-sitter

Find every interface, service, method, trait, protocol, and type boundary in any codebase. Deterministic output across 12 languages. No LLMs in the analysis pipeline. Built for AI agents, refactoring audits, and domain architecture mapping.

macOS Apple Silicon (arm64). Also available for Linux and Windows. Run xattr -cr /Applications/domain-scan.app after install.

domain-scan CLI showing extracted interfaces with methods in a table view

The problem

Large codebases have thousands of interfaces, services, and methods scattered across hundreds of files. Developers joining a project, auditing an API surface, or preparing for a refactor need answers to:

  • What services exist and what methods do they expose?
  • Which interfaces are implemented by which structs/classes?
  • What is the full public API surface of this module?
  • Where are the HTTP/gRPC/event service definitions?
  • Which methods are async? Which take callbacks? Which return streams?

Today this requires grepping, manual navigation, or language-specific tooling that breaks across polyglot repos. LSP servers answer point queries but cannot produce a full structural census.

domain-scan solves this with declarative tree-sitter queries that extract everything in one pass, producing structured JSON that agents, dashboards, and humans can all consume.

What it extracts

Deterministic structural analysis. Same input, same output. No LLMs required.

12 Languages

TypeScript, Python, Rust, Go, Java, Kotlin, C#, Swift, C++, PHP, Ruby, and Scala. All from declarative .scm query files.

Full Structural Census

Extracts every interface, service, class, method, function, schema, type alias, and implementation. Complete API surface in one scan.

Cross-File Resolution

Tracks imports, exports, and trait/interface implementations across files. Knows that UserRepoImpl in file A implements UserRepo from file B.

Agent-First CLI

Structured JSON output, --fields for context window discipline, --json for raw payloads, schema introspection, and input hardening against hallucinations.

Effect.ts Deep Extraction

First-class support for Effect.ts services, layers, error channels, schemas, and pipelines. Understands Context.Tag, Layer composition, and Effect.gen.

Subsystem Matching

Map every entity to a known subsystem via manifest files. File path, import graph, and name matching. Generate LLM prompts for unmatched items.

See it in action

domain-scan interfaces table showing extracted interfaces with methods across TypeScript files

Interfaces with method signatures extracted from TypeScript

domain-scan services table showing HTTP controllers with routes

Service definitions with HTTP routes and method counts

CLI usage

One binary, structured JSON output, agent-ready by default.

Full scan
domain-scan scan --output json -o scan.json
Find all repository interfaces
domain-scan interfaces --name ".*Repository" --show-methods --output json
List HTTP controllers
domain-scan services --kind HttpController --show-routes
Run validation rules
domain-scan validate --strict
Map entities to subsystems
domain-scan match --manifest system.json --fail-on-unmatched
Generate LLM agent prompts
domain-scan prompt --agents 5 --focus auth
Introspect the schema
domain-scan schema interfaces

Installation

Desktop App

Download the macOS .dmg, drag to Applications, and open.

Download .dmg

CLI (from source)

Install the CLI via Cargo for command-line and AI agent use.

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

Build from Source

Clone the repo and build everything yourself.

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

Supported languages

83 declarative .scm query files across 12 languages. Adding a new language = writing .scm files, zero Rust code.

TypeScriptPythonRustGoJavaKotlinC#SwiftC++PHPRubyScala

Know your codebase

Free and open source. Scan any codebase in seconds. Structured output for humans, agents, and dashboards.