npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ccode-sync

v0.4.1

Published

Sync Claude Code sessions between machines

Readme

ccode-sync

Sync Claude Code sessions between machines.

Claude Code stores sessions in ~/.claude/projects/ using encoded paths as folder names (/Users/me/code/app becomes -Users-me-code-app). When you switch machines, those paths don't match and sessions become orphaned.

ccode-sync exports your Claude data, rewrites all path references, and imports them on the destination machine — preserving original timestamps and merging history without duplicates.

Install

npm install -g ccode-sync

Usage

Export (on source machine)

ccode-sync export
# Creates ccode-sync-<hostname>-<date>.tar.gz

ccode-sync export my-backup.tar.gz
# Custom output filename

Import (on destination machine)

ccode-sync import backup.tar.gz
# Automatically rewrites paths if home directories differ

ccode-sync import --dry-run backup.tar.gz
# Preview what would be imported without making changes

ccode-sync import --merge-settings backup.tar.gz
# Also merge settings.json (skipped by default)

Path mapping

If a project lives in a different directory on each machine, use --map to remap it:

ccode-sync import backup.tar.gz --map "Projects/app:Code/app"

You can pass multiple --map flags for different projects:

ccode-sync import backup.tar.gz \
  --map "Projects/app:Code/app" \
  --map "Sites/web:Herd/web"

Paths are relative to the home directory by default. Use absolute paths if needed:

ccode-sync import backup.tar.gz --map "/opt/app:/home/me/app"

What gets synced

| Data | Synced | Notes | |------|--------|-------| | ~/.claude/projects/ | Yes | Session conversations per project | | ~/.claude/history.jsonl | Yes | Merged — new entries appended, no duplicates | | ~/.claude/settings.json | Opt-in | Use --merge-settings (local values take precedence) | | ~/.claude/sessions/ | No | Ephemeral process metadata, regenerated by Claude Code |

How path rewriting works

The export creates a manifest.json with the source machine's home directory. On import:

  1. Folder names are rewritten: -Users-me-Projects-app -> -Users-me-Code-app
  2. History entries (project field) are rewritten to the destination path
  3. Session logs get a global find-replace for all mapped paths
  4. Timestamps are preserved from the original files
  5. Existing files are never overwritten — only new data is imported

Roadmap

  • [x] Phase 1: Manual export/import via .tar.gz with path rewriting
  • [ ] Phase 2: Cloud sync via S3/Cloudflare R2 (ccode-sync push / ccode-sync pull)
  • [ ] Phase 3: Menubar app with one-click sync