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:
Confirm the binary is available:
Installer behavior
The installer downloads the latest public release from the Ernest Cloudflare mirror and verifies the archive checksum before installing it.
Authenticate
Run device authentication:
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.
Use the same GitHub identity
Sign in with the GitHub account you use in the Ernest dashboard. The account must have access to the organization or account you want inspected.
Inspect a worktree
From a Git repository, run:
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.
Print findings
The CLI prints a short summary and any findings with title, explanation, and file location.
Expected output
A clean inspection looks like this:
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:
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:
If a file should not be inspected, remove it or add it to .gitignore.
Generated files can make inspections noisy
Do not upload generated directories, build outputs, dependency folders, or temporary files. Ignore or remove them before running ernest inspect.
Common options
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.
