Claude Code session

Claudepath

Move Claude Code projects without losing session history — CLI tool to update all path references after renaming or relocating a project directory

25 stars 7 forksSessions & history Source

Install

Install
pipx install claudepath

Found in the project README. Check it for setup steps after installing.

From source
git clone https://github.com/Mahiler1909/claudepath.git

From the README

claudepath

Move or rename Claude Code projects without losing session history, memory, and context.

The Problem

When you move or rename a project directory, Claude Code loses all your session history because sessions are keyed to the absolute path of your project. You end up with orphaned data in ~/.claude/projects/ and a fresh start.

claudepath fixes this by updating all path references in Claude Code's data files after a move.

Installation

Homebrew (macOS/Linux)

Usage

Move a project

Moves the directory on disk and updates all Claude Code references:

Remap after a manual move

If you already moved the directory yourself, just update Claude's references:

Preview changes (dry run)

See exactly what would change without modifying anything:

List tracked projects

Update claudepath

Update to the latest version — auto-detects whether you installed via Homebrew or pipx:

You can also force a specific method:

Restore from backup

List and restore from automatic backups:

Merge sessions when destination already has Claude data

If you opened Claude Code at the new location before running claudepath remap, Claude Code will have already created a new project directory there. Use --merge to combine the sessions from both directories:

Without --merge, claudepath will fail with a clear error suggesting you add the flag.

Full help

What it updates

Note: file-history/, todos/, tasks/, and shell-snapshots/ are keyed by session UUID, not by project path — they don't need updating.

Options

Environment Variables

Backup & Rollback

By default, claudepath creates a backup before making any changes:

The backup includes:
- The full project data directory (~/.claude/projects/{encoded}/)
- ~/.claude/history.jsonl
- Affected usage-data/session-meta/*.json files (token usage…
Read the full README on GitHub

Details

Language
Python
License
MIT
Last updated
3 July 2026
Topics
anthropicclaudeclaude-codeclideveloper-toolshomebrewpipxproject-managementpythonsession-history

FAQ

What is Claudepath?

Move Claude Code projects without losing session history — CLI tool to update all path references after renaming or relocating a project directory It is a session for Claude Code, from Mahiler1909/claudepath on GitHub.

How do I install Claudepath?

Run pipx install claudepath, then follow the setup in the README.

Is Claudepath popular?

Mahiler1909/claudepath has 25 GitHub stars and 7 forks. It was last updated on 3 July 2026.

More sessions & history

Browse the most popular Claude Code mods, all sessions & history, or the skills and MCP server directories.