Copy a Claude or Codex login to another machine
To copy Claude or Codex accounts to another machine, click ↗ in ccdeck's Accounts panel, copy the share, and paste it into the other machine's deck under + then Paste a share, within ten minutes for Claude; the accounts arrive with no new sign-in.
You will
- Share your Claude or Codex accounts as one line of text
- Paste that text into the deck on another machine
- Switch to a moved account there
- Choose whether the first machine keeps it
Before you start
- ccdeck on both machines (3.81.0 or newer for Codex), with Claude Code or Codex.
- At least one account on that side of the first machine's Accounts panel.
- Each deck open at the address it printed, or through the SSH tunnel
ccdeck openprints: a deck refuses changes from a page opened under another address.
Steps
-
Open Share accounts on the first machine
Press A, or click the Accounts icon at the top of the stripe on the left. With both CLIs installed, click Claude or Codex at the top of the panel. Click ↗ in the panel's header.
Every Claude account starts ticked. Click the row of any account that should not go, then click Share 3 accounts.
Codex: none starts ticked. Tick up to 20, then click Generate share code.
More about sharing one account
Click ⋯ on its row, then Share. On Claude the share is made straight away, and the menu turns into a form headed Share account: copy the text with its Copy button. On Codex the dialog opens with that account ticked.
Codex shares only ChatGPT logins stored in
auth.json, not one kept in a keyring or an API key. On Windows, if the dialog says Windows permissions prevent sharing, click Secure permissions and share: it gives only your Windows user access to that account's folder and login. -
Copy the share
The dialog now shows the share, starting
ccdeck2:, orccdeck-codex-v1.on Codex. Click copy all 3, or Copy share code.
Demo data The countdown is how long another deck will accept the text. The share was supplied to the page for this picture.
Demo data The code was supplied to the page for this picture. More about copying, expiry and a partial share
If the button does not change to copied (Copied on Codex), click the text once to select all of it. Then press Ctrl + C (Cmd + C on a Mac).
With under a minute left, Claude's countdown turns to seconds in amber, then to
expired
in red. The button becomes make a new share, which makes another from the same accounts. A Codex code has no countdown.If claude-swap could not export an account, a line under the button says
One account is not in this bundle:
and gives claude-swap's reason. The text carries the other accounts, and every count in the dialog is what it carries. -
Take the text to the other machine
A Claude share is accepted for ten minutes; a Codex code has no expiry. Both carry logins only: no projects, sessions or settings.
Treat the text as those passwords. It is not encrypted, and anyone who has it can use the accounts, even after a Claude share's ten minutes. If a copy ends up somewhere it should not, sign those accounts out and back in.
More about what the text holds
For each Claude account, it holds claude-swap's export: the address, the organization and the login tokens, compressed and base64-encoded. For each Codex account, its name and its
auth.jsonlogin, base64-encoded. Neither carries~/.claude.jsonor Codex's settings, so no projects or MCP servers.Nothing signs Claude's ten-minute limit: it only stops the dialog from importing an old copy. Copied text can stay in a clipboard history, or sync to your other devices.
-
Paste it into the other deck
On the second machine, open the Accounts panel on the same side and click + in its header. Click the Paste a share tab, paste the text, and click Import.
Demo data Each row says what happened to that account. The import result was supplied to the page for this picture. More about the result words
A Claude import can take up to a minute. Each row says:
- imported: this deck did not have it, and now does.
- already here: claude-swap left an account it already holds as it was.
- dead token replaced: claude-swap had marked the login it holds as dead, and replaced it with the one in the share.
- updated: you clicked update anyway on that row.
- not imported: it did not arrive. Make a new share of it and paste again.
On a Mac, if claude-swap finds this Mac cannot read what landed, the row says why, with no check mark.
On Codex the dialog reads
Added: 2. Already imported: 0.
Each added login becomes a new account here, with no settings or history; a login pasted before is skipped. -
Switch to the account on this machine
Click Done. The accounts that arrived have rows in the panel, behind Other accounts. To work as one of them here, click Switch on its row.
Use a moved account on one machine at a time. Both copies renew one login: whichever machine renews it second can be signed out.
More about the new rows
Slot numbers are each machine's own. claude-swap numbers each store separately, so an account in slot 1 on one machine can be in slot 3 on the other.
A new Claude row reads
no usage recorded yet
until claude-swap has read its usage. The deck asks it to read right after the import.Neither deck warns when both machines are on the same account, even when they are paired on Local network. If one is signed out, its row says
Login expired
. -
Decide whether the first machine keeps it
Making the share changed nothing on the first machine: every account is still there.
A paired deck can bring a removed account back. If the second deck shares it on Local network, the first takes it back within about a minute: untick it under Share these accounts on the second machine first, or unpair the decks.
To keep an account only on the second machine, click ⋯ on its row on the first, then Remove, then Confirm within four seconds; switch the first machine off it first. On Claude it cannot be undone and does not sign Claude Code out. On Codex, only accounts added in ccdeck have Remove, and the login is kept aside.
More about Local network
The ticks are under Share these accounts, in a deck's This deck on the network dialog, Codex logins beside Claude's. From a deck you paired by invite, or accepted yourself, every account ticked there comes over, and one that arrives over the local network is ticked on arrival.
Between paired decks, Local network also repairs an expired login without a paste. See Repair Claude and Codex logins across machines.
If something goes wrong
The other deck refuses the paste
The red line under the field says why. If the share is over ten minutes old or was cut short, make a new share and copy it with its button. If a fresh share is refused as expired, check that both machines' clocks are right.
A red line under the list, and no share
The line says why. If it names the Keychain, start ccdeck from a Terminal window on the Mac, and share again. If it names Windows permissions, on Codex, click Secure permissions and share.
Sharing or importing says “cswap could not be run”
The deck cannot find claude-swap's command on that machine. Let the deck install claude-swap, or start it with AGENTS_DECK_CSWAP set to the full path of cswap.
A row says already here, but the account does not work here
Click update anyway on that row while the result is open. If the share has expired by then, make a new one and paste it first.
Later, a row says “Login expired” on one of the machines
Make a new share where it still works and paste it here; on Codex, click Sign in again in its ⋯ instead. If the row says “Login expired on all online decks”, click Sign in on any one machine that shares it.
Something else? See Troubleshoot ccdeck: status, logs, port and hooks.