Commands

Commands

Use the shell command to start PARI, and slash commands inside the prompt to inspect or steer the session.

Start the CLI

pari-cli --help
InvocationWhen to use it
pari-cliInteractive session in the current directory.
pari-cli --workspace <dir>Interactive session in another directory.
pari-cli --model <name>Start on a specific model id.
pari-cli --dry-runCheck the workspace, sandbox, and model.
pari-cli --add <file>Pin a workspace file before the first turn.
pari-cli find <glob>Find files without starting a session.
pari-cli grep <text>Search file contents without starting a session.
pari-cli loginSave a provider credential.
pari-cli logout [provider]Remove one saved sign-in, or open the picker.

Search examples:

pari-cli find "src/**/*.py"
pari-cli grep "def load_config" --filter "*.py"

find and grep read the workspace as the CLI user. They do not go through Bubblewrap. Limits default to 100 paths and 50 matches. Raise them with --limit.

Inside the session

Type /help at the prompt. A line that starts with / is handled locally and is not sent to the model.

CommandDescription
/helpList the slash commands.
/diffPrint the uncommitted unified diff.
/undoRevert files from the most recent turn.
/modelShow the active model.
/model <name>Switch model. The previous model stays if the new name cannot be used.
/add <file>Pin a file that exists inside the workspace.
/snapshot [name]Save a named marker on the session log. This does not copy the files.
/costShow token and cost totals.
/resetClear the conversation and start a new session id. Pinned files stay.
/loginOpen the sign-in menu.
/logout [provider]Remove a saved sign-in.
/clearClear the terminal screen.
/exitEnd the session. /quit does the same.

A short session

Pin a file, start the prompt, and describe the change. Then inspect it:

pari-cli --add src/app.py

At the prompt, ask for the fix. When the turn finishes:

/diff
/undo
/exit

Next

  • Models →

    Sign in and switch the model that answers the next turn.

  • Sandbox →

    How bash commands are contained.