https://github.com/poe-platform/poe-code
Use Poe to power your favorite coding agents (Claude Code, Codex, OpenCode, etc). No need for multiple subscriptions.
https://github.com/poe-platform/poe-code
claude code codex opencode
Last synced: about 16 hours ago
JSON representation
Use Poe to power your favorite coding agents (Claude Code, Codex, OpenCode, etc). No need for multiple subscriptions.
- Host: GitHub
- URL: https://github.com/poe-platform/poe-code
- Owner: poe-platform
- Created: 2025-10-17T20:26:49.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2026-02-09T21:06:25.000Z (3 days ago)
- Last Synced: 2026-02-09T22:47:34.427Z (3 days ago)
- Topics: claude, code, codex, opencode
- Language: TypeScript
- Homepage:
- Size: 4.63 MB
- Stars: 32
- Watchers: 0
- Forks: 6
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Roadmap: ROADMAP.md
- Agents: AGENTS.md
Awesome Lists containing this project
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](https://poe.com/api) .
Use it on a single session (`poe-code 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
```bash
npx poe-code wrap claude
# Also available: codex, opencode, kimi
```
or
## Set it as your default (works with CLIs and desktop apps)
This updates the provider’s config files and continue using your tools normally.
```bash
# Start the interactive setup
npx poe-code configure
# Setup a specific agent
npx poe-code@latest configure codex # (or claude, opencode, kimi)
```
### Unconfigure (remove overrides)
```bash
npx poe-code unconfigure claude
```
### Logout (remove config + credentials)
```bash
npx poe-code logout
```
## Quick links
- [Utilities](#utilities)
- [Usage and Billing](#usage--billing)
- [MCP Server](#poe-mcp-server)
- [SDK](#sdk)
- [Poe API](https://poe.com/api)
## Utilities
Utilities are especially useful for scripting and CI/CD.
#### Spawn a one-off prompt
```bash
npx poe-code@latest spawn codex "Say hello"
```
#### Spawn a prompt via stdin
```bash
echo "Say hello" | npx poe-code@latest spawn codex
```
#### Test a configured service
```bash
npx poe-code@latest test codex
```
### Install agent CLIs
```bash
# 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 kimi
```
### Optional 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.
```bash
# 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 claude
```
## Poe MCP Server
Give any agent access to all Poe models including latest image, video, and audio models.
```bash
# 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-code
```
### Available tools
- `generate_text` – Query any bot on Poe.
- `generate_image` – Generate images
- `generate_video` – Generate videos
- `generate_audio` – Convert text to audio
## SDK
Use `poe-code` programmatically in your own code:
```typescript
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"
})
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 send
- `options.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 }`.
### `getPoeApiKey()`
Reads the Poe API key with the following priority:
1. `POE_API_KEY` environment variable
2. Credentials file (`~/.poe-code/credentials.json`)
Throws if no credentials found.