Skip to content
Documentation menu

Commands

Eighteen commands in two groups: the loop you run around every change, and the ones that explain a codebase rather than judge it.

Global flags work everywhere: -C, --cwd <dir> runs against another directory, --no-color disables colour, and -h, --help prints usage. --no-cache analyses without writing anything to the project.

Watching what changes

The loop you run around every change.

little-owl

Interactive mode. Shows what was detected, then offers the handful of things you actually want to do.

little-owl

What it reports

  • The stack, framework and file count it detected
  • A menu covering review, check, watch, architecture, impact, map, tests, dead code and more
  • Falls back to `little-owl check` when output is piped or running in CI

Useful options

-C, --cwd <dir>
Run against another directory.

little-owl init

Set up .little-owl/config.ts and record an initial baseline. Optional — every command works without it.

little-owl init [--yes] [--force] [--no-baseline]

What it reports

  • The layers it inferred from your directory names, which you can accept or replace
  • A written config file with your chosen strictness and thresholds
  • A baseline, unless you pass --no-baseline

Useful options

-y, --yes
Accept the defaults without asking.
--force
Overwrite an existing configuration.
--no-baseline
Skip creating a baseline.

little-owl check

Report the health of the codebase as it stands right now.

little-owl check [--json] [--details] [--quiet]

What it reports

  • Six scores: overall, architecture, maintainability, complexity, dependencies and type safety
  • Findings grouped by severity, each with the file, the reason it matters and what to do
  • A warning when the scan was partial, so a truncated run never reads as a clean one

Useful options

--json
Machine-readable output on a versioned schema.
--details
Show every finding rather than the highest-signal ones.
-q, --quiet
Only the essentials.
--no-cache
Ignore the parse cache.

little-owl review

Review what recent changes did to the codebase, measured against your baseline rather than against nothing.

little-owl review [--base <ref>] [--scope <glob>]

What it reports

  • Changed files with lines added and removed
  • Every score before and after, and the concrete counts behind each move
  • Only the findings this change introduced — existing debt is not repeated at you
  • Files changed outside the area you scoped the work to

Useful options

-b, --base <ref>
Git ref to compare against.
-s, --scope <glob>
Area the change was meant to touch. Repeatable.
--prompt
Print an AI prompt instead of the report.
--details
Show every finding.
--json
Machine-readable output.

little-owl watch

Keep an eye on the codebase while you work, and report drift as it happens.

little-owl watch [--debounce <ms>]

What it reports

  • The files you just changed, and how many modules import them
  • New findings grouped by whether they are in the changed files, in files that depend on them, or elsewhere
  • Score movement against a fixed reference, not against the state a second ago

Useful options

--debounce <ms>
Delay before re-analysing. Default 400.
--prompt
Include an AI prompt with each report.

little-owl baseline

Record the current state as the reference for future reviews. Little Owl never updates it on its own.

little-owl baseline [--yes] [--show]

What it reports

  • Current health, with the previous baseline alongside it when one exists
  • How many findings appeared since the last baseline, before you accept them
  • The written baseline file, which belongs in version control

Useful options

-y, --yes
Write without asking.
--show
Print the existing baseline instead of writing one.
--json
Machine-readable output.

little-owl compare

Show recent reviews against the same baseline, so you can see a trend rather than a snapshot.

little-owl compare [-n <count>]

What it reports

  • The last runs with their overall score and whether each improved or degraded
  • Baseline snapshots, marked as such

Useful options

-n, --limit <count>
How many entries to show. Default 10.
--json
Machine-readable output.

little-owl prompt

Write a short brief for your AI assistant from the findings that actually exist. Little Owl never calls a model.

little-owl prompt [--scope <glob>] [--max <count>]

What it reports

  • A numbered instruction list built only from real findings, capped so it stays actionable
  • A scope constraint, when you gave one
  • A reminder to preserve behaviour and keep tests passing

Useful options

-s, --scope <glob>
Restrict the assistant to these paths.
--all
Include findings that predate this change.
-n, --max <count>
Maximum number of instructions.

little-owl ci

Non-interactive check with an exit code. By default only findings that are new relative to the baseline can fail a build.

little-owl ci [--base <ref>] [--fail-on <level>]

What it reports

  • A one-line status, the finding counts and the score movement
  • The findings that drove the verdict
  • Exit code 0 or 1, and a PARTIAL ANALYSIS line if the scan did not cover everything

Useful options

-b, --base <ref>
Git ref to compare against.
--fail-on <level>
error | warning | never.
--max-drop <points>
Largest acceptable drop in the overall score.
--all
Consider pre-existing findings too, not just new ones.
--json
Machine-readable output.

Understanding what is there

Commands that explain rather than judge.

little-owl map

A high-level map of the project, aimed at someone who has never opened it.

little-owl map [--json]

What it reports

  • A suggested reading order — where execution starts, then what most code depends on
  • Areas with their size, and how many imports cross into each one
  • Detected layers, entry points with their route paths, and the modules most files depend on
  • External services grouped by what they are, rather than by package name

Useful options

--json
Machine-readable output.

little-owl explain

Why does this code exist? Answered from git history, never invented.

little-owl explain <file>

What it reports

  • The commit that introduced the file and how old it is
  • Commit messages that record a reason, and who has maintained it
  • What imports it today, and what keeps changing alongside it
  • An evidence rating of strong, partial or none — and a plain statement when the history is silent

Useful options

--json
Machine-readable output.

little-owl impact

Show what changing a file could affect, by walking the reverse dependency graph.

little-owl impact [file]

What it reports

  • Affected files ranked by how many import hops away they are
  • Route-like entry points among them, labelled with their URL
  • Tests that reach the change, and external packages it talks to
  • A risk level, and a lowered confidence when a dynamic import could reach further than it can see

Useful options

-f, --files <paths>
Additional files to analyse.
-b, --base <ref>
Git ref to compare against.
--json
Machine-readable output.

little-owl dead-code

Find files nothing appears to reach — deliberately cautiously.

little-owl dead-code [--min-confidence <level>]

What it reports

  • Candidates graded high, medium or low confidence
  • Why each one looks unused, and what undermines that conclusion
  • Exported names nothing imports, for files that are otherwise in use
  • Files skipped because a framework convention makes them entry points

Useful options

--min-confidence <level>
high | medium | low.
--include-tests
Consider test files too.
--no-cache
Analyse without writing anything to the project.
--json
Machine-readable output.

little-owl tests

Find behaviour that no test appears to watch. A risk signal, not a coverage percentage.

little-owl tests [--changed]

What it reports

  • Modules with real logic that no test file reaches through imports
  • Modules a test reaches without naming every exported behaviour
  • Files skipped because they are configuration, scripts or migrations

Useful options

--changed
Only look at what the current change touched.
-b, --base <ref>
Git ref to compare against.
--json
Machine-readable output.

little-owl architecture

Show the detected layers and where the boundaries between them break.

little-owl architecture [--json]

What it reports

  • The layer chain, and whether it was configured or inferred
  • Boundary violations and skipped layers
  • Circular dependencies, with the whole loop named

Useful options

--json
Machine-readable output.

little-owl dependencies

Compare what package.json declares with what the code actually imports.

little-owl dependencies [--json]

What it reports

  • Packages imported but not declared
  • Packages declared but never imported, with build tooling filtered out
  • It is hygiene, not security — run your package manager's audit for vulnerabilities

Useful options

--json
Machine-readable output.

little-owl config

Show the configuration currently in effect, including every rule and its severity.

little-owl config [--rules]

What it reports

  • Which config file was loaded, or that defaults are in use
  • Layers, thresholds and CI settings as resolved
  • Every rule with its active severity, with --rules

Useful options

--rules
List every rule and its severity.
--json
Machine-readable output.

little-owl doctor

Check that Little Owl can see this project properly. The command to run when the output looks wrong.

little-owl doctor [--json]

What it reports

  • Node version, detected stack, git availability, config and baseline status
  • How many files were analysed, and whether the scan was cut short
  • Unresolved imports, detected layers and test files found

Useful options

--json
Machine-readable output.