CLI

Commands

Reference for the abstr CLI commands.

Ask a question

Running abstr with a question asks Astrid directly:

abstr "how does auth work in this repo?"

You can also pipe input, or scope the question to a GitHub pull request:

echo "explain this module" | abstr
abstr --pr https://github.com/org/repo/pull/42 "summarize this diff"
FlagDescription
-w, --workspace <slug>Workspace to query
--pr <url>Scope the question to a GitHub pull request URL
--config <path>Config file to use

Interactive session

Run abstr with no question in a terminal to open an interactive session:

abstr

Inside the session, use slash commands:

CommandDescription
/pr [url]Scope the conversation to a PR (or run /pr alone to pick from a list)
/pr clearRemove the PR scope
/workspace [slug]Switch workspace
/newStart a fresh conversation
/helpShow available commands
/exitQuit the session

abstr review

Review the branch you're on before you open its pull request, or review a pull request by URL. The command follows the review and lists its findings.

abstr review                                        # pre-review the current branch
abstr review --base develop                         # compare against another branch
abstr review https://github.com/org/repo/pull/42    # review a pull request

See Pre-review for every flag and what happens when you open the pull request.

Each finding is listed with its id, such as #4211, the same number the app and Astrid use. --json includes it as commentId.

abstr review resolve

Rule on a finding from the terminal, as you would on the review page.

abstr review resolve 4211 --as fixed
abstr review resolve 4211 --as invalid --reason "the caller checks for nil"
abstr review resolve 4211 --as duplicate --duplicate-of 4200
abstr review resolve 4211 --as open                  # reopen it
FlagDescription
--as <verdict>fixed, invalid, wont_fix, duplicate or open
--reason <text>Why. Required for invalid and wont_fix
--duplicate-of <id>The finding this one repeats. Only for duplicate
--report <id>The review the finding is in (default: the newest review of the current branch)
-w, --workspaceWorkspace to use

The ruling is yours, exactly as a click in the app: on a pull request its GitHub thread follows it. You need to be an editor or admin of the workspace. The command prints the finding as the ruling left it and exits non-zero when the ruling is refused.

abstr login

Store your API key and pick a workspace. See Installation.

abstr login

abstr workspace

Manage the active workspace (alias: abstr ws).

abstr workspace list        # list workspaces; current is marked with *
abstr workspace use my-team # switch to a workspace
abstr workspace             # interactive picker

abstr config

Inspect your configuration.

abstr config show   # workspace, redacted API key, resolved API URL
abstr config path   # print the config file path
© Abstraction — documentation