Flyfree: A CLI Tool for Elegant LLM Provider Management
What is Flyfree?
Flyfree is a CLI tool that makes it easy to manage and switch LLM provider configurations for AI coding tools like Claude Code and Codex.
Instead of manually editing configuration files for each tool, Flyfree provides a unified interface to:
- Subscribe to different LLM providers (Zhipu AI, OpenRouter, etc.)
- Switch between providers instantly
- Keep automatic backups of your configurations
- Manage everything through simple commands
The Problem It Solves
Let’s say you want to use MiniMax with the Codex CLI. Normally you would need to:
- Know where Codex stores its config
- Manually create and edit
~/.codex/config.toml - Set environment variables
- Repeat this for every tool you use
With Flyfree, you just run:
npm i -g @llmapis/flyfreeff sub 'ff://minimax?key={YOUR_API_KEY}' --autocodexThat’s it! Flyfree handles the rest.
How to Use Flyfree
Installation
npm install -g flyfree# ornpm i -g @llmapis/flyfreeQuick Start
1. Subscribe to a Provider
For Zhipu AI:
ff sub 'ff://z.ai?key=YOUR_API_KEY' -a zhipu --autoFor OpenRouter:
ff sub 'ff://openrouter?key=YOUR_API_KEY' -a openrouter --auto2. Switch Between Providers
# List all subscribed providersff list
# Interactive switchingff switch
# Direct switchingff set claude-code zhipuff set claude-code openrouterCommon Commands
| Command | Description |
|---|---|
ff sub <url> | Subscribe to a provider |
ff list | Show all subscribed providers |
ff set <agent> <provider> | Switch provider for an agent |
ff switch | Interactive provider switching |
ff reset | Reset configuration |
ff restore | Restore from backup |
ff unsub <provider> | Unsubscribe from a provider |
Built-in Providers
Flyfree supports these providers out of the box:
Zhipu AI
ff sub 'ff://z.ai?key=YOUR_API_KEY' -a zhipu --autoSupports: Claude Code, Codex
OpenRouter
ff sub 'ff://openrouter?key=YOUR_API_KEY' -a openrouter --autoSupports: Claude Code
Safe Backup System
Flyfree automatically backs up your original configurations:
- Up to 10 historical versions
- One-command restore:
ff restore - List backups:
ff restore --list
Example Workflows
Cost Optimization:
# Daily development (lower cost)ff set claude-code zhipu
# Important tasks (higher quality)ff set claude-code openrouterTeam Standardization:
# Subscribe to team configff sub https://team-config.company.com/llm -a team-standard --auto
# Everyone uses the same setupff set claude-code team-standardTroubleshooting
Subscription failed?
DEBUG=1 ff sub https://example.com/configInvalid API key?
ff sub 'ff://z.ai?key=YOUR_ACTUAL_KEY' -a testWant to start fresh?
rm -rf ~/.ff/ff sub 'ff://z.ai?key=KEY' -a zhipu --autoConclusion
Flyfree simplifies LLM provider management for AI coding tools. With a unified CLI interface, automatic backups, and built-in providers, it gives you flexibility without the configuration hassle.
Ready to try it?
npm i -g @llmapis/flyfreeff --helpLinks: