Skip to main content

Backup and manage Claude Code session history

Project description

claude-history-backup

Backup and manage Claude Code session history before automatic cleanup removes old sessions. As of December 8th, all Claude Code sessions more than 1 month old will be removed without this tool. Adds automatic zipping to session files so they don't take up too much storage.

Install

# From PyPI
pip install claude-history-backup

# Or with uv
uv tool install claude-history-backup

Usage

# Show sync status
claude-history status

# Sync new sessions to backup (auto-archives previous backup)
claude-history sync

# Manually create archive
claude-history archive

# List all archives
claude-history list-archives

# Install daily launchd scheduler (macOS, runs missed jobs on wake)
claude-history scheduler-install

# Check scheduler status
claude-history scheduler-status

# Remove scheduler
claude-history scheduler-remove

# View backup log
claude-history logs

How It Works

  1. Claude Code stores sessions in ~/.claude/projects/
  2. Claude periodically cleans up old sessions (appears to be ~1 month)
  3. This tool syncs sessions to a backup location before they're deleted
  4. Uses launchd (not cron) so missed jobs run when your Mac wakes up
  5. Auto-archives previous backups as zip files before each sync

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

claude_history_backup-0.2.0.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

claude_history_backup-0.2.0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file claude_history_backup-0.2.0.tar.gz.

File metadata

  • Download URL: claude_history_backup-0.2.0.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for claude_history_backup-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e81c2b65e90e9ae23d5e190f385d69ae4a2e61affbbfdee383ecd30a20298960
MD5 9771372a76b0ab981d32938825626f82
BLAKE2b-256 a3a0ca8eeb9e9cc811989e7f701f3b2ecb58b9a7d1a1edc4d14ab76e4190ce1e

See more details on using hashes here.

File details

Details for the file claude_history_backup-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for claude_history_backup-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7574f79b202695d69ad1210184c879665482c97af8a1a61f4426cb4daa2662fd
MD5 e64536ed694a801f7a30680a02c3f688
BLAKE2b-256 cbced64d29640e4732317ac9798b78eb8f12a6de9d82578f704bfdb474ff7e65

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page