WebSocket broker for AI CLI tools with session management and real-time streaming.
- Multi-provider support (Claude, Codex, Copilot, Gemini, OpenCode)
- WebSocket API for real-time communication
- Session persistence and resume
- Concurrent client handling
- JSON streaming output
# Clone the repository
git clone <repository-url>
cd OpenPal
# Build
make build
# Or install to /usr/local/bin
make install# Basic usage
./openpal --quest-id my-task --provider claude --work-dir /path/to/project
# With specific port
./openpal --quest-id my-task --provider claude --port :8080
# Show version
./openpal --versionPAL_PROVIDER- Default AI provider (claude, codex, copilot, gemini, opencode)PAL_WORK_DIR- Working directory for AI CLIPAL_<PROVIDER>_PATH- Custom path to CLI executablePAL_CAPABILITIES- Comma-separated list of capabilitiesANTHROPIC_API_KEY- API key for ClaudeOPENAI_API_KEY- API key for CodexGITHUB_TOKEN- Token for Copilot
Connect to ws://localhost:<port>/ws?device=<device-id> to stream AI responses.
# Run tests
make test
# Run tests with coverage
make coverage
# Format code
make fmt
# Run linter
make lint
# Build for all platforms
make build-allCreate a .env file in your working directory:
ANTHROPIC_API_KEY=your-key-here
PAL_PROVIDER=claude
See LICENSE file.