vekil

command module
v0.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2026 License: MIT Imports: 12 Imported by: 0

README

vekil

High-performance Go proxy that exposes Anthropic, Gemini, and OpenAI-compatible APIs, forwarding all requests to GitHub Copilot's backend (api.githubcopilot.com). This lets you use tools that speak the Anthropic, Gemini, or OpenAI protocol with your GitHub Copilot subscription.

What It Supports

  • Anthropic Messages API
  • Gemini Generate Content and Count Tokens APIs
  • OpenAI Chat Completions API
  • OpenAI Responses API, including Codex websocket bridging
  • Proxy-owned Codex compatibility endpoints for compaction and memory summarization
  • Streaming, tool use, parallel tool calls, compressed request bodies, and OAuth token caching

Quick Start

Download the latest binary for your platform from GitHub Releases, then run it locally.

Or with Docker from GHCR:

docker run -p 1337:1337 \
  -v ~/.config/vekil:/home/nonroot/.config/vekil \
  ghcr.io/sozercan/vekil:latest

On Apple Silicon Macs, you can also use the native menubar app.

brew install --cask sozercan/repo/vekil

Note: The app is not signed. Clear extended attributes, including quarantine, with:

xattr -cr /Applications/Vekil.app

Manual downloads still work through the vekil-macos-arm64.zip asset on GitHub Releases. See macOS Menubar App.

On first run, authenticate with GitHub's device code flow. Tokens are cached in ~/.config/vekil/.

Docs

The full documentation now lives under docs/ in smaller, topic-focused files:

Most Common Client Setup

Claude Code
env ANTHROPIC_BASE_URL=http://localhost:1337 \
  ANTHROPIC_API_KEY=dummy \
  claude --model claude-sonnet-4 --print --output-format text "Reply with exactly PROXY_OK"
OpenAI Codex CLI
env OPENAI_API_KEY=dummy \
  OPENAI_BASE_URL=http://localhost:1337/v1 \
  codex exec --skip-git-repo-check -m gpt-5.4 "Reply with exactly PROXY_OK"
Gemini CLI
env GEMINI_API_KEY=dummy \
  GOOGLE_GEMINI_BASE_URL=http://localhost:1337 \
  GOOGLE_GENAI_API_VERSION=v1beta \
  GEMINI_CLI_NO_RELAUNCH=true \
  gemini -m gemini-2.5-pro -p "Reply with exactly PROXY_OK" -o json

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package auth implements GitHub OAuth device code flow authentication and Copilot API token management with automatic caching and refresh.
Package auth implements GitHub OAuth device code flow authentication and Copilot API token management with automatic caching and refresh.
cmd
menubar command
Package logger provides structured JSON logging with level filtering.
Package logger provides structured JSON logging with level filtering.
Package models defines request and response types for both Anthropic and OpenAI APIs.
Package models defines request and response types for both Anthropic and OpenAI APIs.
Package proxy implements HTTP handlers that forward requests to GitHub Copilot's backend.
Package proxy implements HTTP handlers that forward requests to GitHub Copilot's backend.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL