Skip to content
Documentation menu

Commands

Twenty commands in two groups: the loop you run around every change, and the ones that explain a codebase rather than judge it. Listed first is little-owl on its own, which is interactive mode rather than a command of its own.

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 Little Owl up for this project. Asks nothing — the stack, the structure and the layers are all read from the files on disk. Optional: every command works without it.

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

What it reports

  • What it detected: stack, framework, file count, git
  • What it will watch for, in plain words, before it writes anything
  • A config file, a baseline, and LITTLE_OWL.md — the briefing file AI assistants read
  • One recommended next command

Useful options

-i, --interactive
Choose the structure and strictness yourself instead of having them detected.
--force
Overwrite an existing configuration.
--no-baseline
Skip creating a baseline.
--no-agent-file
Skip writing LITTLE_OWL.md.

little-owl check

What needs attention in this project right now, most important first.

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

What it reports

  • A one-line health score, then a verdict: is this fine, or does it need work?
  • Issue counts by priority — critical, important, minor — each with what that level means
  • The first few issues, numbered, with the file, the line and a plain-language summary
  • One recommended next command
  • A warning when the scan was partial, so a truncated run never reads as a clean one

Useful options

--all
List every issue, not just the first few.
--details
The full explanation of every issue, with rule ids.
--json
Machine-readable output on a versioned schema.
-q, --quiet
Only the essentials.
--no-cache
Ignore the parse cache.

little-owl explain

Given a number, explains that issue in plain language. Given a file path, explains why the file exists — from git history, never invented.

little-owl explain <issue-number | file>

What it reports

  • For an issue: what happened, why it matters, where it is, the related files, what should happen instead, how to fix it and how to confirm the fix
  • Any term a non-expert might not know, defined in one clause
  • For a file: the commit that introduced it, messages that record a reason, who maintains it and what imports it today
  • An evidence rating of strong, partial or none — and a plain statement when the history is silent

Useful options

--technical
Include the rule id and the raw evidence.
--json
Machine-readable output.

little-owl fix

Everything needed to fix one issue, including a brief precise enough to hand to an AI assistant. Little Owl never edits your source itself.

little-owl fix [issue] [--brief]

What it reports

  • The files involved: where the change goes, and what may need updating with it
  • The goal, in one sentence
  • Two ways to apply it — give the brief to your assistant, or do it yourself
  • A markdown brief with the file, line, function, related files, risks and acceptance criteria

Useful options

--brief
Print only the brief, ready to pipe or copy.
--json
Machine-readable output.

little-owl verify

Check whether the fixes actually landed. The findings are re-derived from your source, so an issue can only disappear by genuinely being gone.

little-owl verify [issue] [--tests]

What it reports

  • Which issues are fixed, and which are still there
  • Anything new that appeared since — a fix that trades one problem for another is not finished
  • How the health score moved
  • Exit code 1 while the issue you named is still reproducing, so a script can wait on it

Useful options

--tests
Also run this project's own test command.
--json
Machine-readable output.

little-owl agent

Write LITTLE_OWL.md, the briefing file Claude Code, Cursor and similar agents read before touching the project. `init` writes it too.

little-owl agent [--force]

What it reports

  • The loop, and which command answers which question
  • Your layers, the size limits this project agreed to, and how to read a priority
  • What not to touch — in particular that editing the baseline to silence a finding is not a fix

Useful options

--force
Overwrite an existing file. Without it, an edited copy is left alone.

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 brief for your AI assistant from the findings that actually exist, so it does not have to re-investigate anything. Little Owl never calls a model.

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

What it reports

  • Each issue with its priority, file, line, enclosing function and related files
  • Current behaviour, expected behaviour, the risks, and acceptance criteria
  • Constraints — fix only what is named, change no behaviour, add no dependencies, never edit the baseline to silence a finding
  • The commands to run when the work is done

Useful options

--compact
A short numbered list instead of the full brief.
-s, --scope <glob>
Restrict the assistant to these paths.
--all
Include findings that predate this change.
-n, --max <count>
Maximum number of issues to include.

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 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.