Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

better-ccflare

Latest version: v3.6.15

Overview

Last scanned
30 Nov 2026
Published
30 Nov 2026
npm package Publisher: tombii
284 Stars
55 Forks
75 Versions
7.9K Downloads
TypeScript Repo language

Scan summary

better-ccflare was last scanned on 30 Nov 2026 at version 3.6.15. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 75 versions; the latest 3 were published within 5 days (26–30 Nov 2026).
  • Findings: No rules fired in version 3.6.15.
  • Downloads: 7,855 downloads.

Versions

75 versions published
Versions and the rules that fired in each
VersionPublishedStatus
3.6.15 LATEST 30 Nov 2026 No rules fired
3.6.14 26 Nov 2026 No rules fired
3.6.13 26 Nov 2026 No rules fired
3.6.12 23 Nov 2026 Not shown
3.6.11 20 Nov 2026 Not shown

No rules fired in 3.6.15

Findings

Findings for v3.6.15. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 3.6.15; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

better-ccflare 🛡️

Track Every Request. Go Low-Level. Never Hit Rate Limits Again.

The ultimate Claude API proxy with intelligent load balancing across multiple accounts. Full visibility into every request, response, and rate limit.

https://github.com/user-attachments/assets/c859872f-ca5e-4f8b-b6a0-7cc7461fe62a

Why better-ccflare?

  • 🚀 Zero Rate Limit Errors - Automatically distribute requests across multiple accounts
  • 🤖 Multi-Provider Support - Claude OAuth, Claude API console, Vertex AI, AWS Bedrock, NanoGPT, z.ai, Minimax, DeepSeek, TokenHarbor, Meta, OpenRouter, Kilo, Codex (OpenAI OAuth), xAI/Grok, OpenCode Go, Sail Research, Mistral, Anthropic-compatible, and OpenAI-compatible providers
  • 🔒 OAuth Token Health - Real-time monitoring of OAuth token status with automatic refresh and health indicators
  • 🔗 Custom API Endpoints - Configure custom endpoints for Anthropic accounts for enterprise deployments
  • ☁️ OpenAI-Compatible Support - Use OpenAI-compatible providers like OpenRouter, Together AI, and more with Claude API format
  • 🧩 Codex / Responses API Compatibility - POST /v1/responses and POST /v1/responses/compact are translated to Anthropic /v1/messages
  • 🔄 Smart Auto-Fallback - Automatically switch back to preferred accounts when their rate limits reset
  • ⚡ Auto-Refresh - Automatically start new usage windows when rate limits reset with 30-minute buffer
  • 📊 Request-Level Analytics - Track latency, token usage, and costs in real-time with optimized batch processing
  • 🔍 Deep Debugging - Full request/response logging and error traces
  • 🔐 API Authentication - Optional API key authentication with secure key management
  • ⚡ \<10ms Overhead - Minimal performance impact with lazy loading and request deduplication
  • 🛡️ Security Hardened - Critical security fixes for authentication bypass, command injection, and credential leakage
  • 💸 Free & Open Source - Run it yourself, modify it, own your infrastructure
Why this fork?

This project builds upon the excellent foundation of snipeship/ccflare with significant enhancements:

🎯 Core Improvements (v3.0.0):

  • Enhanced Security - Critical fixes for authentication bypass, command injection, and PKCE implementation
  • OAuth Token Health Monitoring - Real-time status indicators and automatic token refresh with 30-minute buffer
  • Extended Provider Support - AWS Bedrock, NanoGPT (with dynamic pricing), Minimax, DeepSeek, TokenHarbor, Meta, OpenRouter, Kilo, Codex (OpenAI OAuth), xAI/Grok, OpenCode Go, Sail Research, Mistral, Anthropic-compatible, and OpenAI-compatible providers
  • Simplified Load Balancing - Removed tier system for O(1) priority-based selection
  • Real-time Analytics Dashboard - Beautiful web UI with fixed request history (no disappearing requests)
  • Package Distribution - Available via npm and bun for easy installation

🛠️ Developer Experience:

  • Powerful CLI - Complete command-line interface for account management and configuration
  • REST API - Complete API for automation and integration
  • Cross-Platform Binary - Pre-compiled binary works with Node.js or Bun
  • Comprehensive Logging - Request/response tracking with searchable history
  • Database Integration - SQLite (default) or PostgreSQL for persistent storage and analytics, supporting Kubernetes multi-pod deployments

📦 Distribution & Updates:

  • npm/bun Registry - Install with npm install -g better-ccflare or bun install -g better-ccflare
  • npx/bunx Support - Run without installation: npx better-ccflare or bunx better-ccflare
  • Smart Update Detection - Web UI detects package manager and shows appropriate update commands
  • Version Management - Semantic versioning with automatic update notifications

🏢 Production Ready:

  • Enterprise Features - Custom API endpoints, session management, advanced analytics
  • Performance Optimized - \<10ms overhead with request deduplication and caching
  • Reliability - Automatic error recovery, circuit breakers, and health monitoring
  • Scalability - Built for high-throughput production environments
  • PostgreSQL Support - Set DATABASE_URL=postgresql://... to use PostgreSQL for Kubernetes multi-pod deployments where SQLite file-sharing is not feasible

Quick Start

Install via npm (Linux x86_64)
npm install -g better-ccflare

# Start better-ccflare (Server + Dashboard)
better-ccflare

Continue to Configure Claude SDK.

⚠️ Windows npm Installation Issue: If you installed via npm on Windows and encounter a path error like "C:\\Program Files\\nodejs\\\\node_modules\\better-ccflare\\dist\\better-ccflare" is either misspelled or could not be found, this is a known npm bug on Windows affecting how npm generates wrapper scripts. See Windows Troubleshooting for workarounds.

Install via bun
bun install -g better-ccflare

# Start better-ccflare (Server + Dashboard)
better-ccflare

Continue to Configure Claude SDK.

Install Pre-compiled Binary (All Architectures)

Download the appropriate binary for your platform from GitHub Releases:

Linux x86_64
wget https://github.com/tombii/better-ccflare/releases/latest/download/better-ccflare-linux-amd64
chmod +x better-ccflare-linux-amd64
./better-ccflare-linux-amd64

Continue to Configure Claude SDK.

Linux ARM64 (Raspberry Pi 3/4/5, Oracle Cloud ARM, AWS Graviton)
wget https://github.com/tombii/better-ccflare/releases/latest/download/better-ccflare-linux-arm64
chmod +x better-ccflare-linux-arm64
./better-ccflare-linux-arm64

Continue to Configure Claude SDK.

macOS Intel
curl -L -o better-ccflare-macos-x86_64 https://github.com/tombii/better-ccflare/releases/latest/download/better-ccflare-macos-x86_64
chmod +x better-ccflare-macos-x86_64

# Remove quarantine attribute (required on macOS to run unsigned binaries)
xattr -d com.apple.quarantine better-ccflare-macos-x86_64

./better-ccflare-macos-x86_64

Continue to Configure Claude SDK.

macOS Apple Silicon
curl -L -o better-ccflare-macos-arm64 https://github.com/tombii/better-ccflare/releases/latest/download/better-ccflare-macos-arm64
chmod +x better-ccflare-macos-arm64

# Remove quarantine attribute (required on macOS to run unsigned binaries)
xattr -d com.apple.quarantine better-ccflare-macos-arm64

./better-ccflare-macos-arm64

Continue to Configure Claude SDK.

macOS Gatekeeper Notice: Our macOS binaries are not notarized by Apple as this requires a paid Apple Developer subscription. After downloading, you must remove the quarantine attribute using the xattr command shown above to run the binary. If you prefer not to run unsigned binaries, you can install from source instead.

Windows x86_64

Download better-ccflare-windows-x64.exe and run it. Continue to Configure Claude SDK.

Run without installation (npx/bunx)
# Run with npx (downloads and executes latest version)
npx better-ccflare@latest

# Run with bunx (faster for bun users)
bunx better-ccflare@latest

Continue to Configure Claude SDK.

Install from source
# Clone and install
git clone https://github.com/tombii/better-ccflare
cd better-ccflare
bun install

# Build dashboard (required before first run)
bun run build

# Start better-ccflare (TUI + Server)
bun run better-ccflare

Continue to Configure Claude SDK.

Note: You must run bun run build at least once to build the dashboard files before starting the server. This can also be done by running bun run better-ccflare which includes the build step.

Environment Variables

better-ccflare supports several environment variables for configuration. The most commonly used ones:

# Server Configuration
PORT=8080                              # Server port (default: 8080)
BETTER_CCFLARE_HOST=0.0.0.0           # Server binding host (default: 0.0.0.0, use 127.0.0.1 for localhost-only)
CLIENT_ID=your-client-id              # OAuth client ID
BETTER_CCFLARE_CONFIG_PATH=/path/to/config.json  # Custom config location
BETTER_CCFLARE_DB_PATH=/path/to/database.db  # Custom database path (default: ~/.config/better-ccflare/better-ccflare.db)
                                       # Use this for development/testing with a separate database

# Logging and Debugging
LOG_LEVEL=INFO                         # Log level (ERROR, WARN, INFO, DEBUG)
LOG_FORMAT=json                        # Log format (json or text)
better-ccflare_DEBUG=0                  # Enable debug mode (1 for enabled)

# SSL/TLS Configuration
SSL_KEY_PATH=/path/to/key.pem          # SSL private key path (for HTTPS)
SSL_CERT_PATH=/path/to/cert.pem        # SSL certificate path (for HTTPS)

# Load Balancing
LB_STRATEGY=session                    # Load balancing strategy (default: session)
SESSION_DURATION_MS=18000000           # Session duration in milliseconds (5 hours)

# Retry Configuration
RETRY_ATTEMPTS=3                       # Number of retry attempts
RETRY_DELAY_MS=1000                   # Initial retry delay in milliseconds
RETRY_BACKOFF=2                        # Retry backoff multiplier

# Storage
STORE_PAYLOADS=false                   # Disable storing request/response bodies (reduces DB size and memory usage)
                                       # Token counts, costs, model, status and timing are still recorded

# Night Window (cheaper completion tier for enabled accounts during these hours)
NIGHT_WINDOW=22:00-08:00               # HH:MM-HH:MM, may wrap past midnight (unset = off)
NIGHT_TZ=Europe/Berlin                 # IANA zone the window is written in (default: UTC)

Security Notes:

  • Use BETTER_CCFLARE_HOST=127.0.0.1 to bind only to localhost for better security
  • Never commit .env files containing sensitive values to version control
  • Use environment-specific configuration for production deployments

📖 See docs/configuration.md for the complete list — overload/rate-limit retry tuning, stream read timeout, health endpoint detail, agent discovery, payload encryption at rest, model catalog refresh, PostgreSQL pooling, Codex prompt-cache keys, and more.

Using .env Files

better-ccflare automatically supports .env files for easy configuration management. You can create a .env file in your project directory:

# Copy the example .env file
cp .env.example .env
# Edit with your configuration
nano .env

Supported across all deployment methods:

  • CLI Binary: Automatically loads .env from current working directory
  • Docker Compose: Automatically loads .env from the same directory as docker-compose.yml
  • Docker: Mount your .env file or pass variables directly

Example .env file:

# Server Configuration
PORT=8080

# SSL/TLS Configuration (optional)
SSL_KEY_PATH=/path/to/ssl/key.pem
SSL_CERT_PATH=/path/to/ssl/cert.pem

# Load Balancing
LB_STRATEGY=session

# Logging and Debugging
LOG_LEVEL=INFO
LOG_FORMAT=pretty

# Database configuration
DATA_RETENTION_DAYS=3
REQUEST_RETENTION_DAYS=90

# Storage (set to false to skip storing request/response bodies, reducing DB size and memory pressure)
STORE_PAYLOADS=true

Usage with different deployment methods:

# CLI (binary or local development)
better-ccflare --serve

# Docker Compose (place .env alongside docker-compose.yml)
docker-compose up

# Docker (mount .env file)
docker run -v $(pwd)/.env:/app/.env:ro -p 8080:8080 ghcr.io/tombii/better-ccflare:latest
Docker (Multi-Platform: linux/amd64, linux/arm64)
# Quick start with docker-compose
curl -O https://raw.githubusercontent.com/tombii/better-ccflare/main/docker-compose.yml

# Optional: Create and configure .env file
cp .env.example .env
# Edit .env with your settings (SSL, port, etc.)
nano .env

# Start with docker-compose (automatically loads .env file)
docker-compose up -d

# Or use docker run with environment variables
docker run -d \
  --name better-ccflare \
  -p 8080:8080 \
  -v better-ccflare-data:/data \
  -e SSL_KEY_PATH=/path/to/ssl/key.pem \
  -e SSL_CERT_PATH=/path/to/ssl/cert.pem \
  ghcr.io/tombii/better-ccflare:latest

# View logs
docker logs -f better-ccflare

Once the container is running, open http://localhost:8080 in your browser to add and manage accounts through the Web UI. This is the recommended way — using docker exec to run CLI commands inside the container won't work for OAuth-based account modes since the container has no browser.

🆕 Environment Variable Support: Docker Compose now automatically loads .env files from the same directory as docker-compose.yml. Simply create a .env file alongside your docker-compose.yml file and the container will use those settings.

Available Docker tags:

  • latest - Latest stable release
  • main - Latest build from main branch
  • 1.2.28, 1.2, 1 - Specific version tags
  • sha-abc123 - Commit-specific tags

See DOCKER.md for detailed Docker documentation.

Systemd Deployment

For running better-ccflare as a native systemd service on Linux (without Docker), see the Systemd Deployment Guide. It covers unit file configuration, memory management with --smol, restart policies, and a preflight script that prevents BUN_JSC_* environment variable crashes.

Configure Claude SDK

Option 1: Using Claude CLI with OAuth (Recommended if you have Claude Pro/Team)

If you have a Claude Pro or Team subscription and are logged into Claude CLI:

# Set only the base URL - no API key needed!
export ANTHROPIC_BASE_URL=http://localhost:8080

# Make sure to configure your accounts in the better-ccflare dashboard

# Start Claude CLI (uses your existing login)
claude

Important: When using Claude CLI with an active OAuth login, do NOT set ANTHROPIC_AUTH_TOKEN. Setting both will trigger a warning from Claude CLI about conflicting authentication methods.

Option 2: Using API Key Authentication

If you're NOT using Claude CLI's OAuth login, or prefer API key authentication:

# First, logout from Claude CLI if you're currently logged in
claude /logout

# Then set both the base URL and API key
export ANTHROPIC_BASE_URL=http://localhost:8080

# If better-ccflare has NO API keys configured (open access):
export ANTHROPIC_AUTH_TOKEN=dummy-key

# If better-ccflare HAS API keys configured (protected):
# Generate a key first: better-ccflare --generate-api-key "My VPS"
export ANTHROPIC_AUTH_TOKEN=btr-abcdef1234567890...  # Use your real better-ccflare API key

# Make sure to configure your accounts in the better-ccflare dashboard

# Start Claude CLI
claude
Option 3: Remote/Headless VPS Setup (Secure Proxy)

Use better-ccflare on a trusted server to avoid storing OAuth credentials on untrusted/temporary machines:

On your trusted server (running better-ccflare):

# Add your Claude account with OAuth
better-ccflare --add-account myaccount --mode claude-oauth --priority 0

# Generate an API key for remote access
better-ccflare --generate-api-key "Remote VPS"
# Save the generated key: btr-abcdef1234567890...

# Start the server (ensure it's accessible remotely)
better-ccflare --serve

On your untrusted/temporary VPS:

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm better-ccflare

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

PolinRider Returns
Research

PolinRider Returns: Hijacked npm Packages Use Ethereum Blockchain to Conceal Malware Infrastructure

Plug and Pray: Your AI Agents Are Taking Orders From Strangers
Research

Plug and Pray: Your AI Agents Are Taking Orders From Strangers

Microsoft's Official agent framework Hijacked
AI & VibeSec

BREAKING: Hijacked Releases of Microsoft’s Official agent-framework Steals Azure and CI Credentials

Frame 2085668439 (1)
Group 1261154229