poe-code
v3.0.129
Published
CLI tool to configure Poe API for developer workflows.
Readme

Power your favorite coding agents (Claude Code, Codex, OpenCode, and more) with your Poe subscription—no need to handle multiple providers/accounts. Poe Code routes everything through the Poe API .
Use it on a single session (npx poe-code@latest wrap claude) or configure it as your default and use your tools normally.
Quickstart
Start a coding session routing all your claude calls to Poe
npx poe-code@latest wrap claude
# Also available: codex, opencode, kimior
Set it as your default (works with CLIs and desktop apps)
This updates the provider’s config files and continue using your tools normally.
# Start the interactive setup
npx poe-code@latest configure
# Setup a specific agent
npx poe-code@latest configure codex # (or claude, opencode, kimi)Unconfigure (remove overrides)
npx poe-code@latest unconfigure claudeLogout (remove config + credentials)
npx poe-code@latest logoutQuick links
Utilities
Utilities are especially useful for scripting and CI/CD.
Spawn a one-off prompt
npx poe-code@latest spawn codex "Say hello"Spawn a prompt via stdin
echo "Say hello" | npx poe-code@latest spawn codexTest a configured service
npx poe-code@latest test codexInstall agent CLIs
# Claude Code
npx poe-code@latest install claude-code
# Codex
npx poe-code@latest install codex
# OpenCode
npx poe-code@latest install opencode
# Kimi
npx poe-code@latest install kimiOptional flags
--dry-run– show every mutation without touching disk.--yes– accept defaults for prompts.
Usage & Billing
Check your compute points balance and review usage history.
# Show current balance
poe-code usage
# Show usage history (paginated, 20 entries per page)
poe-code usage list
# Auto-load multiple pages
poe-code usage list --pages 5
# Filter by model name
poe-code usage list --filter claudeModels
List available Poe API models and filter them by provider, capabilities, modalities, and supported API endpoint.
# List all models
poe-code models
# Show only models that support the Responses API
poe-code models --endpoint /v1/responses
# Show only models that support Chat Completions
poe-code models --endpoint /v1/chat/completions
# Search by provider or model id
poe-code models --search claudePoe MCP Server
Give any agent access to all Poe models including latest image, video, and audio models.
# Show configuration JSON and available tools
npx poe-code@latest mcp --help
# Configure an MCP client to use poe-code
npx poe-code@latest mcp configure claude-code
# Remove poe-code from an MCP client
npx poe-code@latest mcp unconfigure claude-codeAvailable tools
generate_text– Query any bot on Poe.generate_image– Generate imagesgenerate_video– Generate videosgenerate_audio– Convert text to audio
SDK
Use poe-code programmatically in your own code:
import { spawn, getPoeApiKey } from "poe-code";
// Get stored API key
const apiKey = await getPoeApiKey();
// Run a prompt through a provider
const result = await spawn("claude-code", {
prompt: "Fix the bug in auth.ts",
cwd: "/path/to/project",
model: "claude-sonnet-4-6"
});
console.log(result.stdout);spawn(service, options)
Runs a single prompt through a configured service CLI.
service– Service identifier (claude-code,codex,opencode)options.prompt– The prompt to sendoptions.cwd– Working directory for the service CLI (optional)options.model– Model identifier override (optional)options.args– Additional arguments forwarded to the CLI (optional)
Returns { stdout, stderr, exitCode }.
spawn.pretty(service, options)
Same as spawn(), but renders the ACP event stream to stdout with colored, formatted output — matching the CLI's visual style.
import { spawn } from "poe-code"
const result = await spawn.pretty("codex", "Fix the bug in auth.ts")
console.log(result.exitCode)Returns Promise<{ stdout, stderr, exitCode }>.
getPoeApiKey()
Reads the Poe API key with the following priority:
POE_API_KEYenvironment variable- Credentials file (
~/.poe-code/credentials.json)
Throws if no credentials found.
Research Preview
These features are available but subject to breaking changes.
- Pipeline — Run YAML task plans through agents with configurable steps
- Ralph — Agentic build loop that iterates on a markdown doc
- Experiment loop — Karpathy-style optimize loop: agent changes code, eval script scores it, keep or discard via git, repeat.
- Poe Agent — Composable agent runtime
