Skip to content

Sixzero/OpenRouterCLIProxyAPI.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenRouterCLIProxyAPI.jl

Dev Build Status

Unofficial OAuth session support for Claude, OpenAI, and Gemini models via CLIProxyAPI.

This package extends OpenRouter.jl to route requests through CLIProxyAPI, a local proxy that provides API endpoints using OAuth authentication from your existing subscriptions.

Installation

using Pkg
Pkg.add(url="https://github.com/sixzero/OpenRouterCLIProxyAPI.jl")

Prerequisites

  1. Install (or update) CLIProxyAPI:
    curl -fsSL https://raw.githubusercontent.com/brokechubb/cliproxyapi-installer/refs/heads/master/cliproxyapi-installer | bash
    Re-run the same command to upgrade to the latest version (config is preserved). After upgrading, restart the service:
    systemctl --user restart cliproxyapi.service
  2. Authenticate with your provider (Claude, OpenAI, Gemini, etc.)

Usage

using OpenRouter
using OpenRouterCLIProxyAPI

# One-time setup (registers provider + injects endpoints)
setup_cli_proxy!()

response = aigen("Hello!", "cli_proxy_api:anthropic/claude-opus-4.6")

Custom Configuration

setup_cli_proxy!(
    base_url = "http://localhost:8317/v1",
    api_key_env_var = "CLIPROXYAPI_API_KEY",
    provider_name = "cli_proxy_api",
    mutate = false  # true = overwrite existing endpoints
)

CLIProxyAPI Management

Check running version

~/cliproxyapi/cli-proxy-api --version 2>&1 | head -1

Update

# Re-run installer (preserves config, upgrades binary)
curl -fsSL https://raw.githubusercontent.com/brokechubb/cliproxyapi-installer/refs/heads/master/cliproxyapi-installer | bash

# Then restart
systemctl --user restart cliproxyapi.service

Restart (e.g. after update, or if stale process running old binary)

systemctl --user restart cliproxyapi.service
systemctl --user status cliproxyapi.service

Note: Models are hardcoded in the binary — new models only appear after updating to a release that includes them. Models also only show if your logged-in account has access.

Supported Models

Anthropic: claude-opus-4.6, claude-sonnet-4.6, claude-opus-4.5, claude-sonnet-4.5, claude-haiku-4.5, claude-opus-4.1, claude-sonnet-4

OpenAI: gpt-5.4, gpt-5.3-codex, gpt-5.3-codex-spark, gpt-5.2-codex, and older models

Related

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages