Skip to content

Multi-backend AI CLI & OpenAI-compatible API server (Claude, Codex, Gemini)

License

Notifications You must be signed in to change notification settings

signalridge/clinvoker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

header

CI  Go Report Card  Release  License

Typing SVG

Homebrew Scoop AUR Nix Docker deb rpm apk Go

English | 简体中文 | 日本語 | Documentation


✨ Highlights

  • Multi-Backend — Seamlessly switch between Claude Code, Codex CLI, and Gemini CLI
  • OpenAI-Compatible API — Drop-in replacement for OpenAI/Anthropic API endpoints
  • MCP Server — Built-in Model Context Protocol server with stdio and HTTP/SSE transports
  • Session Management — Persist and resume conversations across sessions with cross-process locking
  • Parallel Execution — Run tasks concurrently across multiple backends
  • Security — Rate limiting, request size limiting, and trusted proxy support
  • Observability — Distributed tracing, Prometheus metrics, and structured logging
  • Cross-Platform — Native binaries for Linux, macOS, and Windows

📑 Table of Contents


🚀 Quick Start

# Install via Homebrew
brew install signalridge/tap/clinvk

# Run with default backend
clinvk "fix the bug in auth.go"

# Start HTTP API server
clinvk serve --port 8080

# Start MCP server (stdio)
clinvk mcp --transport stdio

📦 Installation

Platform Method Command
macOS/Linux Homebrew brew install signalridge/tap/clinvk
Windows Scoop scoop bucket add signalridge https://github.com/signalridge/scoop-bucket && scoop install clinvk
Arch Linux AUR yay -S clinvk-bin
NixOS Flake nix run github:signalridge/clinvoker
Docker GHCR docker run ghcr.io/signalridge/clinvk:latest
Debian/Ubuntu deb Download from Releases
Fedora/RHEL rpm Download from Releases
Alpine apk Download from Releases
Go go install go install github.com/signalridge/clinvoker/cmd/clinvk@latest

See Getting Started for detailed setup steps.


💡 Usage

Basic Commands

# Run with default backend
clinvk "explain this code"

# Use specific backend
clinvk -b codex "implement user registration"
clinvk -b gemini "review this PR"

# Resume last session
clinvk resume --last "continue where we left off"

# Compare responses across backends
clinvk compare --all-backends "explain this algorithm"

Session Management

# List all sessions
clinvk sessions list

# Show session details
clinvk sessions show <session-id>

# Resume a specific session
clinvk resume <session-id>

# Clean up old sessions
clinvk sessions clean --older-than 30d

🔌 MCP Server

Expose clinvk tools to MCP clients via stdio or HTTP transport:

# Local MCP clients (stdio)
clinvk mcp --transport stdio

# HTTP transport with SSE notifications
clinvk mcp --transport http --host 0.0.0.0 --port 8081 --path /mcp

See MCP Server Integration for tool list, auth, and streaming behavior.


🌐 HTTP API Server

Start an OpenAI/Anthropic-compatible API server:

# Start server on port 8080
clinvk serve --port 8080

# Bind to all interfaces
clinvk serve --host 0.0.0.0 --port 8080

API Endpoints

Endpoint Description
POST /openai/v1/chat/completions OpenAI-compatible chat completions
POST /anthropic/v1/messages Anthropic-compatible messages
GET /openai/v1/models List available models
POST /api/v1/prompt Custom REST API for prompts
GET /health Health check

⚙️ Configuration

# Show current configuration
clinvk config show

# Set default backend
clinvk config set default_backend claude

# Configure API keys
export ANTHROPIC_API_KEY="sk-..."
export OPENAI_API_KEY="sk-..."
export GOOGLE_API_KEY="..."

📖 Documentation

Full documentation: signalridge.github.io/clinvoker

Section Description
Getting Started Installation and first steps
Guides Detailed usage instructions
MCP Guide MCP server setup and transport modes
HTTP API API server documentation
Reference CLI reference and configuration

🤝 Contributing

Contributions welcome! See Contributing Guide.

# Clone the repo
git clone https://github.com/signalridge/clinvoker.git
cd clinvoker

# Run tests
go test ./...

# Build
go build ./cmd/clinvk

📊 Stats

Alt


🙏 Acknowledgments

This project is inspired by the following amazing projects:

  • AgentAPI — Pioneered HTTP API control for coding agents. clinvoker adds cross-backend comparison, parallel execution, and session persistence.
  • CCG-Workflow — Demonstrated Claude + Codex + Gemini collaboration with task routing. clinvoker enables standalone operation with built-in compare/parallel/chain commands.
  • CLIProxyAPI — Established OpenAI/Anthropic-compatible API for CLI tools. clinvoker combines this with CLI wrapper, session management, and multi-backend orchestration.
  • MyClaude — Created codeagent-wrapper for multi-backend execution. clinvoker extends this with response comparison, parallel runs, and persistent sessions.

📝 License

MIT License - see LICENSE.


About

Multi-backend AI CLI & OpenAI-compatible API server (Claude, Codex, Gemini)

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors 4

  •  
  •  
  •  
  •  

Languages