Move your Claude Code sessions between computers (Mac/Windows, any direction)

feattzen1 pts0 comments

GitHub - ZenKhalil/session-porter: Move your Claude Code conversations between computers. Mac and Windows, any direction. One file, no dependencies. · GitHub

/" data-turbo-transient="true" />

Skip to content

Type / to search

Sign in<br>Sign upAppearance settings

You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.

Dismiss alert

{{ message }}

ZenKhalil

session-porter

Public

Notifications<br>You must be signed in to change notification settings

Fork

Star

main

BranchesTags

Go to file

CodeOpen more actions menu

Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit

History<br>2 Commits<br>2 Commits

.gitignore

.gitignore

LICENSE

LICENSE

README.md

README.md

Session Porter.bat

Session Porter.bat

Session Porter.command

Session Porter.command

session_porter.py

session_porter.py

View all files

Repository files navigation

Session Porter

Moves your Claude Code conversations between computers: Mac to Mac, Mac to Windows,<br>Windows to Mac, or Windows to Windows. One file, no installation, and nothing ever<br>leaves your machines.

Use it

On the old computer

Mac: double-click Session Porter.command (or run python3 session_porter.py)

Windows: double-click Session Porter.bat (or run py session_porter.py)

Click Pack this computer . You get one bundle zip on the desktop, with a copy of<br>the app saved next to it.

Copy both files to the new computer using a USB stick, AirDrop, a network drive,<br>or anything else.

On the new computer , run the app the same way and click Unpack a bundle .<br>Porter finds the bundle on the desktop, in downloads, or on an attached drive by<br>itself, or you can paste the path. Check the summary, click Unpack here , then<br>quit the Claude app completely and reopen it. Your chats are there.

Windows needs Python 3.9+ from python.org (tick "Add to PATH"<br>during install). Macs already have it.

What it handles for you

A plain zip of the .claude folder is not enough to move sessions. Porter covers<br>the gaps:

The app's chat list lives outside .claude (Mac:<br>~/Library/Application Support/Claude/claude-code-sessions, Windows:<br>%APPDATA%\Claude\claude-code-sessions). Without it, imported sessions exist on<br>disk but appear nowhere in the app. Porter packs it, and rebuilds it from the<br>transcripts when it is missing, so it can also ingest a plain .claude zip made<br>without Porter.

Every path is rewritten for the new home folder, at all four JSON escape<br>depths, anchored on the old home prefix with boundaries on both sides. A username<br>that is also an ordinary word never corrupts your text, and a longer username<br>sharing the same prefix is never mistaken for the home.

Project folder names are encoded paths (C--Users-Name-...,<br>-Users-name-...) and are renamed to match the new home.

Merge only, never overwrite. Whatever already exists on the target computer<br>wins. Every import writes a log, and python3 session_porter.py undo removes<br>exactly what an import added.

Fragmented conversations are reunited. Auto-compaction and forks split one<br>chat across many transcript files. Porter follows the recorded links so the app<br>shows one chat per conversation.

Credentials never travel. You sign in normally on the new computer, and<br>account identity fields are stripped from the bundle.

Notes

After unpacking on a computer where the Claude app has never signed in, open the<br>app once, then click Finish setup in Porter.

Bundles moved to Windows use forward-slash paths (C:/Users/Name/...). These are<br>valid on Windows and produce identical encoded folder names, and they cannot be<br>corrupted by nested JSON escaping.

Everything also works from the command line: export DIR, inspect ZIP,<br>import ZIP, register, undo, and selftest (the built-in test suite,<br>covering every direction).

Session Porter is an independent tool and is not affiliated with Anthropic.

About<br>Move your Claude Code conversations between computers. Mac and Windows, any direction. One file, no dependencies.<br>Resources<br>Readme<br>MIT license<br>Activity<br>Stars<br>0 stars<br>Watchers<br>0 watching<br>Forks<br>0 forks<br>Report repository

Releases

Packages

Contributors

Languages

You can’t perform that action at this time.

porter claude session windows computer code

Related Articles