File Locations
Complete reference for all CCS file paths and data storage locations. Understand where CCS stores configuration, credentials, cache, logs, and runtime data. Base Directory:~/.ccs/ (override with CCS_DIR, or with legacy
CCS_HOME which appends .ccs)
Overview
Path precedence is
--config-dir → CCS_DIR → legacy CCS_HOME/.ccs →
default ~/.ccs/.Configuration Files
~/.ccs/config.yaml
Purpose: Main unified configuration file (v12)
Format: YAML
Created: First run, or via ccs setup
Delete: Only if resetting CCS completely
Contains:
- Default profile setting
- Account-based profiles
- API-based profiles
- CLIProxy configuration
- User preferences
- WebSearch settings
- Global environment variables
- Quota management (v7+)
- Thinking configuration (v8+)
- Dashboard authentication
- Image analysis configuration (v8+)
- Copilot integration settings
- Remote/local proxy configuration
~/.ccs/*.settings.json
Purpose: Profile-specific environment variables
Format: JSON
Created: Via ccs api create <name> or dashboard
Delete: Safe to delete (profile becomes unusable)
Naming Pattern: ~/.ccs/<profile-name>.settings.json
Contains:
~/.ccs/glm.settings.json- GLM profile~/.ccs/km.settings.json- Kimi for Coding profile~/.ccs/custom-api.settings.json- Custom API profile
CLIProxy Files
~/.ccs/cliproxy/sessions.json
Purpose: Global session tracking for CLIProxy
Format: JSON
Created: First CLIProxy session
Delete: Safe (sessions will reset)
Structure:
- Track concurrent sessions per provider
- Prevent proxy shutdown with active sessions
- Debug session leaks
~/.ccs/cliproxy/sessions-{port}.json for port-isolated variants
~/.ccs/cliproxy/sessions-{port}.json
Purpose: Port-specific session tracking for variants
Format: JSON
Created: First session on variant with custom port
Delete: Safe (variant sessions will reset)
Naming Pattern: ~/.ccs/cliproxy/sessions-8318.json
Structure:
- Variant has
portspecified inconfig.yaml - Port range: 8318-8417
- Port Isolation Pattern
cliproxy.variants.<name>.portconfig key
~/.ccs/cliproxy/accounts.json
Purpose: OAuth account registry for CLIProxy providers
Format: JSON
Created: First OAuth authentication
Delete: Removes all OAuth accounts (requires re-auth)
Structure:
- Add account:
ccs codex --auth --add - List accounts:
ccs codex --accounts - Switch account:
ccs codex --use <nickname> - Rename account:
ccs codex --nickname <new-name>
- Multi-Account Guide
cliproxy.oauth_accountsconfig key
~/.ccs/cliproxy/config-{port}.yaml
Purpose: Port-specific CLIProxy configuration
Format: YAML
Created: Automatically for variants with custom ports
Delete: Safe (will regenerate on next use)
Naming Pattern: ~/.ccs/cliproxy/config-8318.yaml
Contains:
- Provider-specific settings
- Port configuration
- Auth credentials (if variant-specific)
- Logging settings
- Variant has
port: 8318inconfig.yaml - Allows concurrent variants without config conflicts
- Variant Isolation
- Port range: 8318-8417
~/.ccs/cliproxy/bin/original/
Purpose: CLIProxyAPI (original) binary directory
Format: Directory containing executable + version file
Created: During CLIProxy installation (backend: original)
Delete: Safe (will reinstall on next use)
Files:
cli-proxy-api— CLIProxyAPI binaryversion.txt— Installed version string
- Standard providers: gemini, codex, agy, qwen, iflow, kimi
- Minimal install without Kiro/ghcp support
~/.ccs/cliproxy/bin/plus/
Purpose: CLIProxyAPIPlus binary directory
Format: Directory containing executable + version file
Created: During CLIProxy installation (backend: plus)
Delete: Safe (will reinstall on next use)
Files:
cli-proxy-api— CLIProxyAPIPlus binaryversion.txt— Installed version string
- All providers including Kiro and ghcp
- Recommended default (
backend: plus)
ccs cliproxy- Show current versionccs cliproxy --install <version>- Install specific versionccs cliproxy --latest- Update to latest
~/.ccs/model-catalog-cache.json
Purpose: Cached model catalog snapshot from CLIProxy management sync
Format: JSON
Created: Via ccs cliproxy catalog refresh
Delete: Safe (reverts to static catalog; regenerates on next refresh)
TTL: 24 hours
Contains:
- Model IDs and metadata per provider
- Remote-overridden fields merged with static fallback
- Last-synced timestamp
ccs cliproxy catalog- View cache statusccs cliproxy catalog refresh- Force refreshccs cliproxy catalog reset- Clear cache (revert to static)
Claude Channel Token Files
~/.claude/channels/telegram/.env
Purpose: Telegram bot token for Official Channels integration
Format: .env file with TELEGRAM_BOT_TOKEN=<token>
Created: Via ccs config channels --set-token telegram=<token>
Delete: Disables Telegram channel auto-enable
Content:
- Official Channels
channels.selectedconfig key
~/.claude/channels/discord/.env
Purpose: Discord bot token for Official Channels integration
Format: .env file with DISCORD_BOT_TOKEN=<token>
Created: Via ccs config channels --set-token discord=<token>
Delete: Disables Discord channel auto-enable
Content:
- Official Channels
channels.selectedconfig key
Cache Files
~/.ccs/cache/usage.json
Purpose: Usage analytics cache (in-memory format)
Format: JSON
Created: First Claude Code session
Delete: Safe (analytics will reset)
Structure:
- Track daily/monthly usage
- Model distribution analysis
- Cost estimation
- Dashboard Analytics page
/api/usage/*endpoints
~/.ccs/.cache/usage-cache.json
Purpose: Persistent usage cache (disk format)
Format: JSON
Created: On shutdown/periodic sync
Delete: Safe (will rebuild from sessions)
Difference from cache/usage.json:
cache/usage.json- In-memory, fast access.cache/usage-cache.json- Persistent, survives restarts
cache/usage.json
Sync Behavior:
- Write on graceful shutdown
- Periodic sync every 5 minutes (if dirty)
- Load on startup
~/.ccs/cache/update-check.json
Purpose: Update notification cache
Format: JSON
Created: First update check
Delete: Safe (will re-check immediately)
Structure:
ccs update- Manual update- Startup update notifications
Logs
~/.ccs/logs/
Purpose: CCS-owned structured runtime logs
Format: JSONL
Created: As CCS runtime events are written
Delete: Safe (though you lose local history)
Primary files:
current.jsonl- active structured log streamarchive/- rotated segments pruned bylogging.retain_days
~/.ccs/cliproxy/logs/
Purpose: CLIProxy runtime log files
Format: Plain text
Created: When cliproxy.logging.enabled: true
Delete: Safe (via ccs cleanup)
Configuration:
error.log- Error messages onlyrequest.log- HTTP request/response (ifrequest_log: true)debug.log- Verbose debug output
Legacy Files (Pre-v8)
~/.ccs/config.json (deprecated)
Status: Deprecated in v8
Migration: Automatically migrated to config.yaml
Delete: After successful migration
Related:
- Migration Guide
ccs migratecommand
~/.ccs/profiles.json (deprecated)
Status: Deprecated in v8
Migration: Merged into config.yaml under accounts section
Delete: After successful migration
Backup Files
~/.ccs/backup-v1-YYYY-MM-DD/
Purpose: Migration backups
Created: During config migration (v1 → v8)
Delete: Safe after verifying migration success
Contains:
config.json- Legacy configprofiles.json- Legacy profilesusage-cache.json- Pre-v8 cache
Shared Data
~/.ccs/shared/
Purpose: Shared resources across profiles
Format: Symlinks (macOS/Linux) or copies (Windows)
Created: First run, or via ccs sync
Delete: Breaks shared resources
Structure:
Instance Directories (Account Profiles)
~/.ccs/instances/<name>/
Purpose: Isolated Claude instances for account profiles
Created: Via ccs auth create <name>
Delete: Via ccs auth remove <name> --force
Structure:
- Each instance has independent
CLAUDE_CONFIG_DIR - No config sharing between instances
- Independent session management
Temporary Files
~/.ccs/tmp/
Purpose: Temporary files during operations
Format: Various
Created: During migrations, updates, etc.
Delete: Safe (auto-cleaned)
Auto-Cleanup:
- On successful operation completion
- Via
ccs cleanup - On startup (files older than 24h)
Quick Reference Table
| Path | Purpose | Format | Delete Safe? |
|---|---|---|---|
~/.ccs/config.yaml | Main config | YAML | No (reset CCS) |
~/.ccs/*.settings.json | API profile env vars | JSON | Yes (profile breaks) |
~/.ccs/cliproxy/sessions.json | Session tracking | JSON | Yes (sessions reset) |
~/.ccs/cliproxy/sessions-{port}.json | Port-specific sessions | JSON | Yes |
~/.ccs/cliproxy/accounts.json | OAuth accounts | JSON | No (re-auth needed) |
~/.ccs/cliproxy/config-{port}.yaml | Port configs | YAML | Yes (regenerates) |
~/.ccs/cliproxy/bin/original/ | CLIProxyAPI binary dir | Binary | Yes (reinstalls) |
~/.ccs/cliproxy/bin/plus/ | CLIProxyAPIPlus binary dir | Binary | Yes (reinstalls) |
~/.ccs/cache/usage.json | In-memory cache | JSON | Yes (rebuilds) |
~/.ccs/.cache/usage-cache.json | Persistent cache | JSON | Yes (rebuilds) |
~/.ccs/logs/ | Debug logs | Text | Yes |
~/.ccs/cliproxy/logs/ | CLIProxy logs | Text | Yes |
~/.ccs/backup-*/ | Migration backups | Mixed | Yes (after verify) |
~/.claude/channels/telegram/.env | Telegram bot token | .env | Yes (disables channel) |
~/.claude/channels/discord/.env | Discord bot token | .env | Yes (disables channel) |
Cleanup Strategy
Disk Space Estimates
| Component | Typical Size | Max Size |
|---|---|---|
config.yaml | 5-10 KB | 50 KB |
*.settings.json | 1-2 KB each | 10 KB |
sessions.json | 5-20 KB | 100 KB |
accounts.json | 2-10 KB | 50 KB |
cache/usage.json | 50-200 KB | 5 MB |
logs/ (disabled) | 0 KB | N/A |
logs/ (enabled) | 100 KB-10 MB | 50 MB |
cliproxy/logs/ (disabled) | 0 KB | N/A |
cliproxy/logs/ (enabled) | 1-100 MB | 500 MB |
| Total (typical) | 500 KB-1 MB | 5-10 MB |
| Total (debug enabled) | 100-500 MB | 1-2 GB |
Keep
cliproxy.logging.enabled: false (default) to prevent disk bloat.