Getting Started

Install the P31 CLI, configure the router proxy, and run your first chat.

Prerequisites

Installation

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

Set Up the Router Proxy

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"}

Configuration

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.

Your First Chat

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.

MCP Servers: The chat automatically connects to PHOS Forge (26 tools) and Google Workspace on startup. You'll see connection status in the chat window.

Next Steps