Understand, query, and guard your architecture. For you and your agent.

CodeExplorer indexes your repositories into one local SQLite database. Inspect architecture diagrams in VS Code, expose structural queries to coding agents over MCP, and check layer boundaries in CI.

Installation
  • Open source, MIT
  • Runs 100% locally
  • 12 languages
  • 16 MCP tools
CodeExplorer orbit map of services, queues, and SQL tables built from source code
Services Queues Databases Built straight from source code. Click map to enlarge.

One graph for engineers and AI agents.

CodeExplorer scans your repository once into .codeexplorer/graph.db so your IDE, coding agent, and pull-request checks read the same structural graph.

CodeExplorer Project Flow view in VS Code showing a service with its PostgreSQL tables, Pub/Sub topics, cache, and libraries

Stop letting agents guess in the dark.

~7.0×

faster time to answer

Answered in 1m 33s vs 9m 15s on twentyhq/twenty (7 vs 28 turns) and 4m 16s vs 29m 52s across 324 services (18 vs 285 turns).

100% recall on paired architectural audits (~98% across ORM queries, raw SQL tables, and message broker topics where AST-only indexers and ripgrep miss callers and services).

Explore all 10 benchmark reports

Case 01: twentyhq/twenty (24,527 files)

Report
codebase-memory-mcp + AST scripts 9m 15s, 28 turns, 3.4% graph recall (13/381)
CodeExplorer MCP 1m 33s (~6.0× faster), 7 turns, 100% recall (381/381)

Recall across 381 ground-truth items: 3.4% (13/381) from CBM graph vs 100% (381/381) directly from graph.db (0 source file reads).

Case 02: 324-service workspace (13,782 files)

Report
ripgrep + Python scripts 29m 52s, 285 turns, ~82% recall (missed 9 services)
CodeExplorer (10 CLI commands + 16 file reads, 0 scripts, 0 compactions) 4m 16s (~7.0× faster), 18 turns, 100% recall (0 missed)

Paired agent runs with identical system prompts. Bars show wall-clock time to answer.

Query your architecture with Cypher.

Ask structural and cross-service questions in Cypher instead of chaining grep across dozens of files.

blast_radius.cypher
MATCH path = (caller:Function)-[:CALLS*1..4]->
      (target:Function {name: "ChargeAsync"})
RETURN caller.symbol AS UpstreamCaller,
       length(path) AS Hops
ORDER BY Hops ASC
LIMIT 10

Finds upstream callers within 4 hops that reach PaymentProcessor.ChargeAsync.

Execution Result (SQLite Graph Engine) 4 rows in 3.8 ms
UpstreamCallerHops
Billing.Application.Commands.CaptureOrderHandler.Handle1
Orders.Api.Controllers.CheckoutController.SubmitOrder2
Subscriptions.Worker.Consumers.RenewalConsumer.Consume2
Gateway.Bff.Endpoints.MobileCheckoutEndpoint.Execute3

Semantic Invariant Gates: architectural checks in CI.

Linters inspect one file at a time. Semantic Invariant Gates (SIG) check dependencies and dataflow across the full 5-layer graph, with a SHA-256 baseline ratchet so legacy violations stay frozen while new ones fail the build.

Architecture Gate Packs
.codeexplorer/gates/domain-purity.yaml
id: SIG-CA-B-001
name: Domain Layer Must Not Reference Infrastructure
severity: Error
target: "{inf.name}"
message: "Domain type '{d.name}' references infrastructure type '{inf.name}'"
query: |-
  MATCH (d:Type)-[:DEPENDS_ON|INHERITS|IMPLEMENTS]->(inf:Type)
  WHERE d.file_path CONTAINS "/Domain/"
    AND (inf.file_path CONTAINS "/Infrastructure/"
      OR inf.symbol CONTAINS "DbContext")
  RETURN d, inf

Blocks any type inside a Domain module from referencing Infrastructure or EF Core types.

Gate Evaluation Output Exit 1 · 2 violations
SIG-CA-B-001 · Error Orders.Domain.Aggregates.Order -> Orders.Infrastructure.Persistence.OrderDbContext src/Orders.Domain/Aggregates/Order.cs:84
SIG-CA-B-001 · Error Billing.Domain.Services.InvoiceCalculator -> Billing.Infrastructure.Http.TaxRateClient src/Billing.Domain/Services/InvoiceCalculator.cs:41
  1. Author YAML rules Place invariant rules in .codeexplorer/gates/*.yaml or scaffold defaults with ce gate init.
  2. Snapshot brownfield debt Run ce gate ratchet --update to record SHA-256 fingerprints of existing legacy violations in .codeexplorer/baselines/*.json.
  3. Block net-new violations ce gate check passes when only baselined debt is present and exits with code 1 when a PR introduces a new violation.
  4. Auto-tighten as code heals Whenever a baselined violation is fixed, re-running the ratchet lowers the ceiling so resolved debt cannot return.
GitHub Actions CI Pipeline .github/workflows/architecture-gates.yml
name: Architecture Invariant Gates
on: [pull_request]

jobs:
  invariant-gates:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Install CodeExplorer CLI
        run: curl -fsSL https://code-explorer.app/install.sh | sh
      - name: Build Graph & Verify Invariant Gates
        run: |
          ~/.local/bin/ce scan
          ~/.local/bin/ce gate check --format sarif > results.sarif

Five-layer graph ontology across twelve languages.

Every node and relationship in .codeexplorer/graph.db belongs to one of five layers, from files on disk up to services, queues, SQL tables, and bounded contexts.

Explore all 38 entities & 56 relationships
  • C# / .NETASP.NET Core, EF Core, Dapper, MassTransit
  • Java & GroovySpring, Quarkus, Seam/JSF, GWT, Hibernate, Liquibase
  • KotlinSpring, Ktor, Exposed, Coroutines
  • TypeScript / JSNestJS, Next.js, Express, TypeORM, Prisma
  • GoGin, Echo, gRPC-Gateway, GORM, sqlx
  • PythonFastAPI, Django, Flask, SQLAlchemy, Celery
  • RustAxum, Actix, Tonic gRPC, SQLx, Diesel
  • PHPSymfony, Laravel, Doctrine, Nette
  • PerlDBI, Mojolicious, Dancer2, LWP
  • ColdFusionCFML components, cfquery SQL lineage
  • SQLPostgreSQL, T-SQL, MySQL, ClickHouse, BigQuery
  • TerraformHCL modules, Terragrunt, AWS/GCP/Azure
Pluggable YAML Framework Detectors & Coverage Diagnostics .codeexplorer/detectors/custom-bus.yaml
schema_version: 1
id: internal-rpc-bus
name: Internal RPC & Event Bus
languages: [java, kotlin, typescript]
packages: ["com.acme.platform:rpc-bus*"]
messaging_brokers:
  - protocol: acme-bus
    listener_annotations: [BusSubscriber]
    publish_methods: [publishEvent]

Spot uncovered legacy or internal packages with ce doctor --gaps, drop a declarative YAML detector into .codeexplorer/detectors/, and validate with ce detector validate without recompiling.

Install in thirty seconds.

Single native binary. Runs locally on your machine and CI runners with no account, cloud dependencies, or source code uploads.

brew install vmikhailov/tap/ce

Install native binary via Homebrew on macOS (Apple Silicon & Intel) or Linux.

ce scan indexes the repository into .codeexplorer/graph.db.

ce context "<task>" builds a one-shot context pack for an issue.

ce doctor --gaps checks index health, parse errors, and uncovered frameworks.

ce mcp starts the Model Context Protocol server over stdio.

ce gate check evaluates Semantic Invariant Gates in CI.

Copied to clipboard!