Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By FarisHijaziv0.2.0MITIn 1 marketplace
Carries Claude Code conversation history to a renamed project path or another machine over SSH, so --resume and --continue keep working. Its skill also moves ~/.claude settings, skills and credentials, and it can keep two machines in sync.
Trending plugins
7-day copy clicks
Claude loads one when your task matches it, or you run it by name.
1 marketplace, most starred first
conversation-history, project-migration, ssh, backup, machine-sync, resume-session, migration, history ·
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.

You can finally take your claude code history with you when you move/rename projects folders!
Normally, your history is stored based on the project path, if you rename it you lose the ability to --resume or --continue.
This tool copies the history from claude's internal files in ~/.claude/projects/....

The repo is its own plugin marketplace. Inside Claude Code:
/plugin marketplace add FarisHijazi/claude-migrate
/plugin install claude-migrate@farishijazi
That installs the /migrate skill. Then, in the old location:
/migrate /new/path # same machine
/migrate user@host:/new/path # another machine
Create the new path (cp -r /old/path /new/path) either before or after.
# install `uv` and `uvx` if you haven't already
# curl -LsSf https://astral.sh/uv/install.sh | sh
uvx git+https://github.com/FarisHijazi/claude-migrate install-skill
Installs the same skill to ~/.claude/skills/migrate/. install-slash-command still
works as an alias. If you have an older ~/.claude/commands/migrate.md, delete it — two
things answering to /migrate drift apart.
# Preview a copy of the history (default behavior, keeps source)
uvx git+https://github.com/FarisHijazi/claude-migrate migrate /old/path /new/path --dry-run
# Move history (copy + delete source history)
uvx claude-migrate migrate /old/path /new/path --delete-history
# Move the project folder AND its history in one shot
uvx claude-migrate migrate /old/path /new/path \
--folder --delete-history --delete-dir
# Then continue at the new location
cd /new/path && claude --continue
Inside Claude Code with the ! prefix (no AI overhead):
! uvx claude-migrate migrate "$(pwd)" /new/path
| Command | Description |
|---|---|
migrate <old> <new> | Migrate history (and optionally the folder) between paths |
rm <path> | Remove history for a directory (add --folder to also delete the directory itself) |
export <project_path> | Export one project's history to a portable .tar.gz archive |
export-all | Export all project histories under ~/.claude/projects/ to one archive |
import <archive> [target] | Unpack and smart-merge into the target path (rewrites paths) |
import-all <archive> | Import an export-all archive into local ~/.claude/projects/ |
sync | Two-way sync with peers in ~/.claude/history-sync.json |
user-messages | Extract just the human-typed messages from the current session |
install-skill | Install the /migrate skill into ~/.claude/skills |
cp <old> <new> | Deprecated alias of migrate |
mv <old> <new> | Deprecated alias of migrate --delete-history |
install-slash-command | Install the /migrate slash command |
All commands support --dry-run / -n.
migrate flags| Flag | Effect |
|---|---|
--merge, -m | Smart-merge into existing history at the destination |
--folder | Also copy the actual project folder (errors if destination folder already exists) |
--delete-history | Delete the source history after copy (move semantics for history) |
--delete-dir | Delete the source project folder after copy (requires --folder) |
--replace-userpath [FROM:TO] | Rewrite /Users/<x>/ and /home/<x>/ in chat content. Bare flag auto-detects; pass --replace-userpath=alice:bob to override |
--replace-references | Walk every JSON/JSONL value in the history and rewrite absolute and relative path references inside chat content (see below) |
--replace-references — how path references are rewrittenWhen you migrate a project, the chat history is full of path strings inside tool calls and prose. With --replace-references, every string value in every JSON/JSONL line is scanned:
/old/cwd doesn't corrupt /old/cwdbar.-Users-alice-projects-foo) are also rewritten../foo, ../bar/baz) are resolved against the old CWD:
../other/file.py), they're pinned to the original absolute path, because the external file didn't move.Every unique before -> after replacement is printed before being applied. Use --dry-run to preview without writing.
# On the source machine
uvx claude-migrate export-all -o ~/backups/
# Copy the .tar.gz to the target machine, then
uvx claude-migrate import-all ~/backups/claude-history-ALL-*.tar.gz \
--replace-userpath --replace-references
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub farishijazi/claude-migrate --plugin claude-migratePlugins from other owners that cover similar ground