Repository navigation
Backup
Move accounts between machines, or keep a file you can restore.
openswap export backup.openswap # all Claude accounts
openswap export backup.openswap --account 2 # one slot
openswap export backup.openswap --full # include full ~/.claude.json (same Mac)
openswap import backup.openswap # skip slots that already exist
openswap import backup.openswap --force # overwrite
openswap codex export backup.codex.json # Codex auth.json envelopes
openswap codex import backup.codex.json
openswap codex import backup.codex.json --forceThe export is plaintext JSON. By default it carries each account’s own login only. Machine-shared MCP/plugin OAuth and the device token stay on the source Mac. --full keeps everything, for same-machine backups.
Encrypt if you need to: openswap export - | gpg -c > backup.gpg.
If you import the account you are currently logged in as, activate it with openswap switch N --force. A plain openswap switch to the current account is a no-op and will not apply the import.
A plain openswap import backup.openswap replaces slots whose refresh token is already dead. --force is still required to replace healthy existing accounts. A stale export can carry a token that has already been superseded.
Export first if you might come back, then:
openswap uninstall # keeps saved accounts
openswap uninstall --zap # also deletes saved accounts, settings and logsopenswap purge removes all OpenSwap data (backups, settings, sessions) but leaves the app. Neither logs you out of Claude Code. More: Getting started.
mar3co/openswap · MIT · OpenSoft · descendant of claude-swap
Using OpenSwap
macOS
Reference