CLIProxy Sync
CCS can automatically sync your API profiles (GLM, Kimi for Coding, etc.) to a local or remote CLIProxy configuration. This enables centralized management of all your API keys and models.Overview
CLIProxy Sync transforms CCS settings-based profiles into CLIProxyClaudeKey format and writes them to config.yaml. Changes to profiles automatically trigger a sync when auto_sync is enabled.
Use Cases:
- Centralized API key management across devices
- Remote CLIProxy deployment with synced profiles
- Dashboard-managed profiles available to all providers
Quick Start
Enable Auto-Sync
Auto-sync is enabled by default. It watches for changes to~/.ccs/*.settings.json and syncs to local CLIProxy config.
Configure Profiles
Profiles with valid API keys are automatically synced:Auto-Sync Behavior
Watcher
Whencliproxy.auto_sync is enabled, CCS watches for file changes:
Watch Pattern: ~/.ccs/*.settings.json
Trigger Events:
- File created (new profile)
- File modified (API key/model changed)
- File deleted (profile removed)
Sync Target
Local Sync: Writes to~/.ccs/cliproxy/config.yaml
Profile Mapping:
- Profile name →
prefix(e.g.,glm→glm-) ANTHROPIC_AUTH_TOKEN→api-keyANTHROPIC_BASE_URL→base-url(optional)ANTHROPIC_MODEL→models[0].name
Example
CCS Profile (glm.settings.json):
config.yaml):
CLI Commands
ccs cliproxy sync
Sync profiles to CLIProxy config and show status.
ccs cliproxy sync --dry-run
Preview sync changes without writing to config.
ccs cliproxy sync --verbose
Show detailed sync information.
Configuration
Enable/Disable Auto-Sync
Config location:~/.ccs/config.yaml
Profile Filtering
Only profiles with valid API keys are synced. Profiles are skipped if:ANTHROPIC_AUTH_TOKENis missing- API key contains placeholder text (
YOUR_,your-) settings.jsonis unreadable- Profile name is invalid (non-alphanumeric, too long)
Target-Aware Filtering
Available since v7.48.0
target: claude (or no target, which defaults to claude). Profiles with target: droid are excluded because Droid uses a different configuration format (~/.factory/settings.json).
This means:
- API profiles with
target: droidare not synced to CLIProxy config - CLIProxy variants with
target: droidare still managed but their settings path differs - Use the Droid dashboard page to manage Droid-targeted profiles
Dashboard Integration
Sync Status Card
Dashboard shows real-time sync status: Location: Settings → CLIProxy Sync Displays:- Auto-sync enabled/disabled
- Watcher status (running/stopped)
- Syncable profile count
- Last sync timestamp
- Toggle auto-sync
- Manual sync trigger
- View profile list
Profile Management
Profiles managed via Dashboard are automatically synced:- Go to Dashboard → API Profiles
- Add/edit GLM, Kimi for Coding, or custom profile
- Auto-sync triggers within 3 seconds
- Profile available via
ccs <prefix>-
Troubleshooting
Auto-Sync Not Working
Check watcher status:- Auto-sync disabled → Enable in
~/.ccs/config.yaml(cliproxy.auto_sync: true) - Watcher crashed → Restart Dashboard or run
ccs cliproxy sync - Invalid profile → Check
settings.jsonfor syntax errors
Profile Not Syncing
Verify profile is syncable:- API key placeholder not replaced
ANTHROPIC_AUTH_TOKENmissing fromsettings.json- Profile name contains invalid characters
Manual Sync Fails
Error: “Failed to sync:<error>”
Solutions:
Remote Proxy Sync
For remote CLIProxy deployments, sync profiles to remote server. Coming Soon: Remote sync via Management API Current Workaround:- Sync locally:
ccs cliproxy sync - Copy
~/.ccs/cliproxy/config.yamlto remote server - Restart remote CLIProxy instance
Security Considerations
API Key Storage:- Keys stored in
~/.ccs/*.settings.json(plain text) - Synced to
~/.ccs/cliproxy/config.yaml(plain text) - File permissions:
600(owner read/write only)
- Never commit
*.settings.jsonorconfig.yamlto git - Use environment variables for sensitive keys
- Rotate API keys regularly
- Encrypt home directory on shared machines
Hybrid Model Catalog Sync
Available since v7.39.0
Overview
Catalog sync prefers a live CLIProxy management catalog, then an unexpired local cache, then the bundled static catalog. Static metadata can enrich matching live models, but static-only models are not re-added to a successful live catalog. Syncable Providers:agy(Antigravity)claude(Claude via CLIProxy)codex(OpenAI Codex)gemini(Google Gemini)iflow(iFlow)kimi(Moonshot Kimi)kiro(Kiro)qoder(Qoder)qwen(Qwen; catalog only, no bundled account linking)xai(xAI Grok)ghcp(deprecated GitHub Copilot compatibility)
How It Works
Live Catalog Behavior:- Live models are authoritative when available.
- Matching static metadata is overlaid where the live definition omits it.
- Models present only in the live catalog are added.
- Static-only models are not re-added to a successful live catalog.
- The complete static catalog is used only when neither live data nor an unexpired cache is usable.
- Location:
~/.ccs/model-catalog-cache.json - TTL: 24 hours
- Auto-refresh on cache expiry
CLI Commands
Dashboard Integration
Dashboard fetches synced catalog via/api/cliproxy/catalog endpoint. Model selection dropdowns automatically show latest available models.
Troubleshooting
Catalog out of date:- Uses an unexpired cache when one exists; otherwise uses the static catalog
- A failed refresh does not delete the cache file, but an expired cache is ignored
- The 24-hour value is the cache TTL, not a refresh retry interval
Related
- CLIProxy API - OAuth provider integration
- API Profiles - Profile configuration
- Dashboard - Visual management
- CLI Commands - Full command reference
