Install the P31 CLI, configure the router proxy, and run your first chat.
One-line install:
curl -fsSL https://p31-cli.pages.dev/install | bash
Or via npm:
npm install -g @p31/cli
Verify the installation:
p31 version
p31 help
The router proxy (:4001) forwards AI requests to your model provider. Start it alongside the CLI:
p31 router start
Verify it's running:
curl http://localhost:4001/health
# Expected: {"status":"ok"}
The CLI reads from ~/.p31/config.yaml:
proxy_url: http://localhost:4001/v1
proxy_model: flash
ollama_url: http://localhost:11434
Edit this file to change your model (flash, premium, scavenger) or proxy URL.
Start the interactive chat TUI:
p31 chat
Type a message and press Enter. The agent will respond using the router proxy.
Press Ctrl+P to open the command palette with 28+ commands. Press Esc or Ctrl+C to quit.