Perception β†’ Precision β†’ Results

Agents go big when they see.

Loctree gives AI agents one-shot structural perception of a live codebase, then keeps it fresh as the repository changes. It surfaces file responsibilities, symbol occurrences, definitions, risks, and intent-aware guidance through AST-powered understanding, so agents can predict impact, choose the next move, and act without losing the shape of the system.

Loctree is perception, which gives precision, safety, velocity and results.

SCAN REGISTRY

OUTPUT SURFACES

One scan. Multiple surfaces.

One real `loct auto` scan emits seven artifacts. Pick a surface β€” the panel swaps to the actual output, copy-ready.

EXHIBIT Acontext.jsonAgent context
{
  "agent_context": {
    "target": "loctree_rs/src/analyzer/env_truth/mod.rs",
    "role": "target",
    "authority": "repo_verified",

    "health": {
      "scope": "DirtyWorktree",
      "snapshot": "fresh",
      "stale": false
    },

    "structure": {
      "dependencies": 13,
      "direct_consumers": [
        "loctree_rs/src/analyzer/mod.rs",
        "loctree_rs/src/cli/dispatch/handlers/env_truth.rs"
      ],
      "transitive_consumers": 5
    },

    "risk": {
      "hotspot": true,
      "importers": 2,
      "runtime_surfaces": {
        "tauri_commands": 0,
        "env_contracts": 0
      }
    },

    "next_safe_actions": [
      "loct slice loctree_rs/src/analyzer/env_truth/mod.rs",
      "loct impact loctree_rs/src/analyzer/env_truth/mod.rs",
      "loct context --file loctree_rs/src/analyzer/env_truth/mod.rs"
    ],

    "verify": [
      "cargo check --workspace",
      "cargo clippy --workspace --all-targets -- -D warnings",
      "cargo test --workspace"
    ]
  }
}

Actual scan output, copy-ready.

Structure
files, symbols, ownership
Surfaces
APIs, routes, events
Risks
cycles, dead, unsafe
Actions
impact, next safe edit

CONTEXT FIRST

Give agents context before they act.

01

Impact before commit

loct impact <file>

See every file that breaks.


02

Dead code, found

loct dead

Exports that nothing imports.


03

Context, not grepping

loct slice <file>

Core + deps + consumers.


04

Cycles detected

loct cycles

Circular imports mapped.

WORKS WHERE YOU WORK

Works where your repo works.

No special project shape required. Loctree follows the stack already in front of it.

  • TypeScript
  • Rust
  • Python
  • Go
  • Tauri
  • Swift
  • Java
  • Kotlin
  • PHP
  • CSS
  • Shell
  • JavaScript

Tested on real codebases.

Zellij Β· Rust + shell Β· fix/skip-render-when-detached

See proof β†’
0files scanned
13.26sscan time
0duplicate groups
0params indexed
0functions indexed

WORKFLOW

From perception to safe action.

The same loop for humans and agents: read the repo, understand the blast radius, make a bounded change, verify the result.

  1. 01
    Scan
    loct
    Build the map
  2. 02
    Slice
    loct slice
    Focused context
  3. 03
    Impact
    loct impact
    Blast radius
  4. 04
    Clean
    loct dead
    Remove dead code
  5. 05
    Verify
    loct doctor
    Confirm health

AGENT SURFACES

Built for agents. Useful for humans.

loct
Run Loctree on any repo from your terminal: scan, slice, impact, dead, cycles, doctor.

context tools
Give compatible agents the same repo map humans use.

artifacts
Export structured context for agents, reports, CI, and follow-up tools.

explorer
Inspect the repository map without sending source code away.
Open docs β†’

INSTALL

Start now.

Install the scanner, generate context, and let your agent stop guessing.

curl -fsSL https://loctree.com/install.sh | sh