JSPM

ashibalt

0.3.11
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q67562F
  • License UNLICENSED

Claude Code proxy — route requests to OpenRouter, OpenAI, Gemini, xAI, and other AI providers

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ashibalt) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    Ashibalt

    ashibalt is a Node.js/TypeScript CLI that lets you use Claude Code with third-party AI providers (OpenRouter, OpenAI, CometAPI, Gemini, xAI).

    Features

    • Interactive CLI — add providers, configure models, manage profiles
    • Local proxy — translates Claude Code's Anthropic API into OpenAI-compatible calls
    • Ashibalt provider — built-in provider with free and premium tiers
    • Reasoning/Thinking — configurable per-profile reasoning effort
    • Auto-configuration — syncs ~/.claude/settings.json automatically

    Install

    npm (requires Node.js ≥ 20)

    npm install -g ashibalt

    Quick Start

    # Interactive mode — guides you through setup
    ashibalt
    
    # Start proxy with a specific profile
    ashibalt run --profile openai

    How It Works

    1. Start the proxy (ashibalt run)
    2. The CLI writes Claude Code env settings to ~/.claude/settings.json
    3. Start/restart Claude Code — it connects to the local proxy
    4. The proxy translates Anthropic API calls to your chosen provider

    Env Variables Set

    • ANTHROPIC_BASE_URL — points to local proxy
    • ANTHROPIC_AUTH_TOKEN — local auth token
    • ANTHROPIC_DEFAULT_OPUS_MODEL — real model ID for the Opus slot
    • ANTHROPIC_DEFAULT_SONNET_MODEL — real model ID for the Sonnet slot
    • ANTHROPIC_DEFAULT_HAIKU_MODEL — real model ID for the Haiku slot
    • ANTHROPIC_SMALL_FAST_MODEL — model for context compression (always Haiku slot)

    Claude Code still shows "Sonnet", "Opus", "Haiku" in the UI — but requests route to your configured models. The proxy shows the exact mapping on startup.

    Supported Providers

    Provider Default Base URL
    OpenRouter https://openrouter.ai/api/v1
    OpenAI https://api.openai.com/v1
    CometAPI https://api.cometapi.com/v1
    Gemini https://generativelanguage.googleapis.com/v1beta/openai
    xAI (Grok) https://api.x.ai/v1
    Ashibalt Built-in (auth required)

    Configuration

    The proxy binds to 127.0.0.1:4020 by default. Override with --host and --port.

    Settings and profiles are stored in OS-specific app directories via env-paths.