Skip to content
Prilog / Docs
Tools & agents / CLI reference

CLI reference

Install the Prilog CLI, manage projects, upload logs, import GitHub issues, and automate fixes with structured JSON output.

Install

brew install prilog-ai/tap/prilog

For macOS and Linux, the release installer detects the operating system and architecture and downloads the matching binary:

curl -fsSL https://raw.githubusercontent.com/Prilog-ai/prilog-cli/main/install.sh | sh
prilog version

To choose a user-local directory:

curl -fsSL https://raw.githubusercontent.com/Prilog-ai/prilog-cli/main/install.sh | PRILOG_INSTALL_DIR="$HOME/.local/bin" sh

Ensure your chosen directory is in PATH. Release binaries and source are available in prilog-cli.

Authentication and project selection

prilog login
prilog projects
prilog use-project "Payments"
prilog status

login starts browser authentication. logout clears the saved login while keeping endpoint and repository settings. Credentials live in your operating system's user config directory; repository metadata lives in .prilog/config.json. Use prilog config path to locate them.

create-project <name> creates and selects a project. use-project <name-or-id> selects an existing default across directories. Names match exactly without case sensitivity. If names are duplicated, select the UUID returned by projects.

Use --project-id <uuid> before a command to select a project for that invocation.

Repository setup

prilog create-project "Payments"
prilog add-repo

Run add-repo in your Git repository and finish GitHub authorization and Add service setup in the browser. The browser and CLI must use the same Prilog account. Repeating the command adds another service to the project.

There is no init command. Use create-project, use-project, and add-repo.

Command reference

  • login — authenticate or switch accounts.
  • logout — clear the saved CLI login.
  • projects — list projects in the active organization and mark the selected project.
  • create-project <name> — create a project and select it.
  • use-project <name-or-id> — select an existing project.
  • add-repo — open repository authorization and service onboarding.
  • status — show active account, organization, project, and error/fix counts.
  • config — show local configuration for the repository.
  • config path — print global and repository configuration paths.
  • ingest [file] — upload logs, traces, or error text from a file or stdin.
  • issue import <url-or-owner/repo#number> — import an open public GitHub issue for a connected fork.
  • list [filter] — list recent errors; filters are all, pending, processing, completed, failed, and skipped.
  • fix <error-id> — queue analysis for an error.
  • diff <error-id> — print the generated code diff.
  • pr <error-id> — create a pull request for a generated fix and return its URL.
  • version — show the installed CLI version.

Run prilog --help for the command surface of your installed binary.

JSON output and automation

Global flags must precede the command. Replace PROJECT_UUID and ERROR_UUID with IDs returned by Prilog:

prilog --json projects
prilog --json --project-id PROJECT_UUID status
prilog --json --project-id PROJECT_UUID list pending
prilog --json --project-id PROJECT_UUID diff ERROR_UUID

--json supports status, projects, create-project, use-project, add-repo, list, ingest, issue import, fix, diff, and pr. It returns structured command output without starting interactive authentication. Run prilog login beforehand. --json add-repo returns a browser handoff URL without opening a browser.

PRILOG_CONFIG_DIR isolates login configuration in an absolute directory. Private automation can use an operator-issued PRILOG_ACCESS_TOKEN in the process environment. It skips browser login and token refresh without replacing the saved login. An environment token does not inherit the saved login's default project: pass --project-id explicitly. Keep this token in server-side secret storage.

Public GitHub issue imports

Use one project per upstream repository. Connect your fork to Prilog, install the Prilog GitHub App on the fork, and choose the upstream default branch during service setup.

prilog issue import owner/upstream#123
prilog fix ERROR_ID
prilog diff ERROR_ID
prilog pr ERROR_ID

The importer rejects closed issues, pull request URLs, unrelated forks, and an incorrect base branch. The resulting PR uses a generated branch in the connected fork and targets the upstream issue's repository.

Errors and completion

A successful upload or queued analysis does not mean a fix has finished. Inspect returned states, review the diff, and use the PR URL returned by publication. See troubleshooting for authentication, selection, and empty-diff problems.