Skip to content

CLI Usage

The Unfault CLI is how you analyze code, explore dependencies, and query your project’s health from the terminal.

Terminal window
# Example: Linux x86_64 (glibc)
mkdir -p ~/.local/bin
curl -L -o ~/.local/bin/unfault https://github.com/unfault/cli/releases/latest/download/unfault-x86_64-unknown-linux-gnu
chmod +x ~/.local/bin/unfault

Pick the matching artifact for your OS/CPU from the GitHub releases page: https://github.com/unfault/cli/releases/latest

Authenticate using device flow:

Terminal window
unfault login

Follow the prompts to open a browser and complete authentication. Your token is stored securely for future commands.

Check your status anytime:

Terminal window
unfault status

Analyze your codebase for production-readiness:

Terminal window
unfault review

Filter by dimension:

Terminal window
unfault review --dimension stability

Get detailed output with suggested fixes:

Terminal window
unfault review --output full

When Unfault scans a workspace, it tries to stay out of your way.

It only considers supported source files, and it skips things that are usually not worth reviewing.

By default Unfault respects the same ignore rules you already rely on:

  • .gitignore (including global gitignore and .git/info/exclude)
  • .ignore
  • .dockerignore

On top of that, Unfault also skips common dependency/build directories even if you forgot to ignore them (for example node_modules, target, dist, build, .venv).

There isn’t a separate Unfault-specific “ignore list” to maintain - if you want a path excluded, add it to your ignore files.

If Unfault says it found 0 files, the usual causes are:

  • you’re running it from the wrong directory
  • your source files are being ignored by one of the ignore files above
  • your repo is mostly tests and you didn’t pass --include-tests

Query your project’s health in natural language:

Terminal window
unfault ask "What are my main stability concerns?"

For AI-synthesized answers, configure an LLM and use --llm:

Terminal window
unfault config llm openai --model gpt-4o
unfault ask "How do we handle timeouts?" --llm

Check what depends on a file before changing it:

Terminal window
unfault graph impact src/api/auth.py

Find the most critical files in your codebase:

Terminal window
unfault graph critical

See which files use a library:

Terminal window
unfault graph library requests

For CI/CD integration:

CodeMeaning
0Success, no findings
5Findings detected
1-4, 6-10Various errors (see reference)

Example CI usage:

Terminal window
unfault review
if [ $? -eq 5 ]; then
echo "Findings detected"
unfault review --output full
fi

Explore the Code Graph

Understand dependencies, impact, and critical files. Read more

Ask Questions

Query your codebase in natural language. Read more

SLO Discovery

Link cloud SLOs to your routes. Read more

Use with AI Agents

Integrate with Claude, Cursor, and others. Read more

For complete command options, flags, and examples, see the CLI Reference.