https://github.com/skydiver/claude-code-project-mover
Bash script to update Claude Code's project references after moving a folder to a new path
https://github.com/skydiver/claude-code-project-mover
anthropic bash claude claude-code cli developer-tools utility
Last synced: about 9 hours ago
JSON representation
Bash script to update Claude Code's project references after moving a folder to a new path
- Host: GitHub
- URL: https://github.com/skydiver/claude-code-project-mover
- Owner: skydiver
- License: mit
- Created: 2025-12-26T16:03:36.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2026-05-14T00:46:44.000Z (about 2 months ago)
- Last Synced: 2026-05-14T02:21:24.429Z (about 2 months ago)
- Topics: anthropic, bash, claude, claude-code, cli, developer-tools, utility
- Language: Shell
- Homepage:
- Size: 20.5 KB
- Stars: 16
- Watchers: 0
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Claude Code Project Mover
A bash script to update Claude Code's project references after moving a folder to a new path.
## Why?
Claude Code stores project data in `~/.claude/projects/` using folder names derived from the project path. When you move a project to a different location, Claude Code loses track of it. This script updates the project metadata to match the new path.
## Usage
**Important:** This script only updates Claude Code's metadata. You must move your project folder first, then run this script to update the reference.
1. Move your project folder to the new location
2. Run the script:
```bash
./claude-project-mover.sh
```
3. Select the project and enter the new path
4. The script validates the destination folder exists before proceeding
If [`fzf`](https://github.com/junegunn/fzf) is installed, project selection switches to a fuzzy finder; otherwise a numbered list prompt is used.
## What it does
- Renames the project folder in `~/.claude/projects/`
- Replaces all path references in `.jsonl` session files
- Optionally creates a compressed backup in the same folder:
```
BACKUP__-Users-jdoe-Desktop-myproject__20251225_123130.tar.gz
```
## Installation
```bash
chmod +x claude-project-mover.sh
```
## Requirements
- macOS or Linux with Bash
- Claude Code installed (`~/.claude/projects/` must exist)
- Optional: [`fzf`](https://github.com/junegunn/fzf) for fuzzy project selection