Summary
Export environment configuration as JSON for backup or cross-machine sync. Import on another machine to recreate the environment.
Proposed API
cac env export <name> [--config-only] > work.json
cac env import <name> --from work.json
JSON format
{
"name": "work",
"proxy": "socks5://u:p@host:port",
"version": "2.1.83",
"tz": "Asia/Shanghai",
"lang": "en_US.UTF-8",
"settings": { "permissions": { "defaultMode": "bypassPermissions" }, ... },
"claude_md": "# My CLAUDE.md content..."
}
Design decisions
- Identity info (uuid, stable_id, mac, hostname, machine_id) is never exported — each machine generates its own
--config-only: export only config (proxy, version, tz, settings) — no sessions or credentials
- Without
--config-only: include .claude/ directory content (sessions, memory) for full backup
- On import: auto-generate identity, auto-install Claude Code version if not present
Use cases
- Backup: export full environment before system reinstall
- Multi-machine: share proxy + settings config across machines
- Team onboarding: share a standard config file
Summary
Export environment configuration as JSON for backup or cross-machine sync. Import on another machine to recreate the environment.
Proposed API
JSON format
{ "name": "work", "proxy": "socks5://u:p@host:port", "version": "2.1.83", "tz": "Asia/Shanghai", "lang": "en_US.UTF-8", "settings": { "permissions": { "defaultMode": "bypassPermissions" }, ... }, "claude_md": "# My CLAUDE.md content..." }Design decisions
--config-only: export only config (proxy, version, tz, settings) — no sessions or credentials--config-only: include.claude/directory content (sessions, memory) for full backupUse cases