Local CLI

Install Ernest, authenticate with GitHub device flow, and inspect a local worktree.

Use the CLI when you want Ernest to inspect local work before opening or updating a pull request.

The CLI uses the same Ernest account as the dashboard. Authenticate once, then run inspections from a Git repository.

Install

Install the latest CLI release:

curl -fsSL https://ernest.kubeply.com/install.sh | sh

Confirm the binary is available:

ernest --version

Authenticate

Run device authentication:

ernest auth login

Ernest tries to open GitHub in your browser and prints a one-time code. If the browser does not open, use the URL shown in the terminal, approve the device flow, then return to the terminal.

Inspect a worktree

From a Git repository, run:

ernest inspect .

Ernest prepares a temporary inspection branch from your current changes, uploads the review context, runs the hosted inspection, and prints the result.

Prepare local context

Ernest checks the repository, base branch, current branch, tracked files, and staged or unstaged changes.

Upload review context

Ernest uploads the bounded worktree context needed for the hosted review.

Run hosted inspection

The backend checks account access, repository setup, and inspection quota before running the review.

The CLI prints a short summary and any findings with title, explanation, and file location.

Expected output

A clean inspection looks like this:

Base main | Branch feature-branch | files changed: 2

Findings: none

When Ernest finds issues, each finding is shown with a severity label, title, explanation, and file location.

Use JSON output when another tool needs to parse the result:

ernest inspect . --format json

Working tree rules

Ernest refuses to inspect unexpected untracked files because they are easy to include by accident.

If a new file should be inspected, add it intentionally:

git add path/to/file
ernest inspect .

If a file should not be inspected, remove it or add it to .gitignore.

Common options

ernest inspect .
ernest inspect . --base origin/main
ernest inspect . --format json

Most users should start with ernest inspect . and let Ernest choose the pull request-style base automatically.

When to use the CLI

Use the CLI before pushing when you want feedback on a local change. Use the GitHub App review when the change is already in a pull request and should be visible to the whole team.