Pochi LogoPochi Docs

CLI

Pochi offers a command-line interface (CLI) that allows you to run an AI agent directly from the command line.

Oneliner Install

curl -fsSL https://getpochi.com/install.sh | bash

To install a specific version, pass the version tag as an argument. For example:

curl -fsSL https://getpochi.com/install.sh | bash -s "pochi-v0.5.5"
brew install tabbyml/pochi/pochi
npm install -g @getpochi/cli

Authentication

The Pochi CLI uses the same authentication credentials as the VS Code extension for Pochi's cloud services. When you sign in through the VS Code extension, the CLI automatically reuses these credentials.

Credentials are stored in ~/.pochi/config.jsonc. To authenticate:

  1. Install and open the Pochi VS Code extension
  2. Follow the sign-in prompts in the extension
  3. The CLI will automatically use the same credentials

For non-Pochi models, first configure it in your Pochi configuration file (~/.pochi/config.jsonc). See Models documentation for details on how to configure custom providers.

Then you can use the model by specifying the provider and model ID separated by a slash:

pochi --model groq/llama3-8b-8192 -p "What is the time now?"

Usage

You can pass a prompt to run a task:

pochi -p "What is the time now?"

Or pipe input as a prompt:

echo "What is the time now?" | pochi

For detailed usage instructions, run pochi -h, below is the output fom version 0.5.3

Usage: pochi [options]

Pochi v0.5.5

Prompt:
  -p, --prompt <prompt>   Create a new task with the given prompt. You can also
                          pipe input to use as a prompt, for example: `cat
                          .pochi/workflows/create-pr.md | pochi`. To use a
                          workflow, use /workflow-name, for example: `pochi -p
                          /create-pr`. Workflows can be embedded in larger
                          prompts, for example: `pochi -p "please /create-pr
                          with feat semantic convention"`

Options:
  --max-steps <number>    Maximum number of stepsto run the task. If the task
                          cannot be completed in this number of rounds, the
                          runner will stop. (default: 24)
  --max-retries <number>  Maximum number of retries to run the task in a single
                          step. (default: 3)

Model:
  --model <model>         The model to use for the task. (default:
                          "qwen/qwen3-coder")

Others:
  -V, --version           Print the version string.
  -h, --help              Print this help message.

Debugging

To enable debug logging for the CLI, you can set the POCHI_LOG environment variable:

POCHI_LOG=debug pochi -p "What is the time now?"

This will output detailed logs about the CLI's operation, which can be helpful for troubleshooting issues.

For more granular control, you can specify log levels for specific components:

POCHI_LOG=Pochi=debug,TaskRunner=trace pochi -p "What is the time now?"