← Projects

Srcly

A local codebase map: treemap, hotspots, import and data-flow graphs, and PR compare, with a headless CLI for agents

active · Started 2025Python, FastAPI, SolidJS, TypeScript, Tree-sitter, Static Analysis

Srcly is a local tool for looking at a codebase as a whole. You point it at a repo and it shows where the code is, how complex it is, how often it changes, and how the pieces connect. Since 1.0 shipped on October 16, 2026, twelve more releases have shipped, and it is a very different tool from the dark treemap that used to be here.

Interface

The treemap sizes every folder, file, and function by lines of code and colors it by a metric. This is Srcly looking at itself: 51,271 lines, 381 files, 4,355 functions.

Srcly treemap of its own repo, colored by max complexity, with the explorer sidebar

The 2×2 puts complexity against git commits. The top-right corner is the one I care about: code that is both complex and changing often is where a refactor pays off first.

Srcly Hot Spots ranking beside the activity 2x2 of complexity against commits

The Graph view has three modes. Imports shows folder and file dependencies, and folders expand in place:

Srcly imports graph drilled into client/src with folder boxes, hub badges and bundled edges

Symbols centers on one function and shows what references it and what it references:

Srcly Symbols mode centered on placeAndRoute with referenced-by and references columns

Data flow traces a value from where it starts to where it renders. That is the old TSX Data Flow analyzer.

What it does now

  • One map, three views. Treemap, Graph, and 2×2 share the same metrics model, with real back navigation and URL state.
  • Metrics that tell zero apart from not measured. Cyclomatic and cognitive complexity, comment noise, and React and Solid component metrics.
  • Git activity. Change frequency and churn per file, with 2×2 presets for activity, blast radius, component weight, comment noise, and findings.
  • Findings with no setup. tsc, eslint, ruff, and Srcly's own TypeScript rules, plus reachability from the import graph and any ast-grep rules in .srcly/rules.
  • Compare. srcly compare and a compare UI with side-by-side treemaps and before/after graphs on one shared layout. It can pick from open PRs, worktrees, and branches, and step through a PR one commit at a time.
  • Symbols. A reference index for TypeScript and Python: the path between two symbols, dead and hub overlays, and the HTTP seam that joins client requests to server routes.
  • A headless CLI for agents and CI. report, explain, hotspots, compare, fix, check --ratchet for a size budget, and scan.
  • Fast reruns. Scans are cached until files change, and the UI shows live scan progress.

How it works

Srcly is a FastAPI server with a SolidJS client. It combines Lizard with tree-sitter analyzers to build a tree of folders, files, functions, and nested scopes, then rolls the metrics up so any level can be sorted, colored, and ranked. The data-flow engine is TypeScript and runs as a lazy Node child process when you open that view.