Docs

Getting started

Codiluce reads a repository, builds an evidenced graph of it and opens an interactive map in your browser. Everything runs on your machine.

Requirements

  • Node.js 22.12 or newer, and npm. Codiluce uses Node’s built-in SQLite. On versions that need a startup flag for it, Codiluce adds the flag for you.
  • Git is optional. Without it you get the map, but no Git metrics and no history.
  • You do not need to install the dependencies of the repository you map. Codiluce never runs its code.

Map a repository

Go to the repository you want to see and start Codiluce:

cd /path/to/my-repository
npx codiluce@latest start .

This detects the applications in the repository, indexes them, starts a local server and opens the map. It tries port 4300 first and takes another one if that port is busy. Press Ctrl + C to stop.

The first start asks a few questions

After the first analysis, and before the map opens, Codiluce asks in the terminal. Enter keeps each default, and codiluce setup asks again whenever you like:

  • History: the last 50 commits, the last 6 months, everything or nothing, each with the time it takes. It is indexed in the background while you use the map.
  • Language models (optional): an Anthropic or OpenAI key, typed hidden and checked with the provider, for asking questions in the map and describing the code. Keys stay in ~/.config/codiluce/credentials, readable only by you.
  • Describing the code: with an OpenAI key, the cost is estimated first and capped; nothing is spent without a yes.
  • Your agents: installed coding harnesses (Claude Code, Codex, Cursor, OpenCode and others) are found and connected to Codiluce's MCP server, so they can explain the code on the map. Their hooks put them on the map as characters while they work.

Without a terminal (CI, scripts) or with --yes, nothing is asked and nothing is spent. --history 200 (or all, none, "6 months ago") sets the depth for one start.

The npm package includes the compiled CLI and a prebuilt map, so the first run needs no build step. Omit the . to scan the current directory, or give the path of another local directory. Remote URLs are not supported: clone the repository first.

Install it instead

For a command that is always available, install Codiluce globally:

npm install --global codiluce
codiluce start /path/to/my-repository

For a fixed version in a Node project, add it as a development dependency and commit the lockfile:

npm install --save-dev codiluce
npx codiluce start .

Useful options

# keep the analysis outside the repository, and open the browser yourself
npx codiluce start . --state-dir ~/.codiluce/my-repo --no-open
# choose a port (0 asks the system for a free one)
npx codiluce start . --port 4400
# no questions; index the last 200 commits this time
npx codiluce start . --yes --history 200
# ask the setup questions again
npx codiluce setup

Run npx codiluce --help for every command, and see CLI & API for the details.

Where the analysis goes

Codiluce keeps its state in <repository>/.codiluce/: the configuration, the graph (codiluce.db), the history, an analysis cache, explanations and the layout of the map. It holds file paths, symbols and routes of your code, so it hides itself from Git with its own .gitignore; your repository's .gitignore is never changed.

The next start reuses the configuration and the cache. An application whose files did not change is replayed from the cache instead of analyzed again, so a re-index of an unchanged repository takes a few seconds.

Your first look

The whole BookStack repository as one isometric plate, with folders such as app, resources, tests and lang drawn as districts.
The whole repository at once. Folders are districts; zoom in and they open into files, then symbols, then source.
  • Zoom with the wheel, a pinch or + / −; drag or use the arrow keys to pan; F fits the view.
  • Search with /: files, symbols, routes, endpoints, controllers, tables. Choose a result and the map flies there.
  • Select anything to see its facts and relationships in the inspector; the Dependencies view draws what it uses and what uses it on the map. Why? on a relationship opens its evidence.
  • Open Flows, History, Explain, Agents or Coverage from the header, and switch between 3D and the 2D plan with the 3D button beside the map.

The next page explains the map in detail.

How deep does it go? It depends on the stack. TypeScript and JavaScript are analyzed down to calls and requests in any application, and supported frameworks down to routes, commands and tables. Every other ecosystem is detected and mapped with its files, languages, lines and Git metrics. See Languages & frameworks.