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://app.getpochi.com/install.sh | bash

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/credentials.json. 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 (OpenAI, Google, etc.), you can provide API keys directly through the command line options rather than using account authentication.

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.3

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`

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")
  --model-type <modelType>            The type of model to use for the task. Available options: `pochi`, `openai`, `google-vertex-tuning`,
                                      `ai-gateway`  (default: "pochi")
  --model-base-url <baseURL>          The base URL to use for the model API. (default: "https://app.getpochi.com")
  --model-api-key <modelApiKey>       The API key to use for authentication. Used for all non-pochi models (e.g., `openai`).
  --model-max-output-tokens <number>  The maximum number of output tokens to use. Used for all non-pochi models (e.g., `openai`). (default: 4096)
  --model-context-window <number>     The maximum context window size in tokens. Used for all non-pochi models (e.g., `openai`). (default: 100000)

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