Skip to main content

Backup and manage Claude Code session history

Project description

claude-history-backup

Backup Claude Code session history before automatic cleanup removes old sessions. As of December 2025, Claude Code removes sessions older than ~1 month.

Install

pip install claude-history-backup
# or
uv tool install claude-history-backup

Quick Start

claude-history sync              # Create a backup archive
claude-history scheduler-install # Install daily scheduler (macOS)
claude-history status            # Check status

How It Works

~/.claude/projects/           →  sync  →   ~/claude_code_history/
                                           ├── backup_20251208_180825.zip
                                           ├── backup_20251210_100000.zip
                                           └── ...

Each sync creates a new timestamped zip archive of all sessions. Archives accumulate - manage them manually when needed.

Commands

claude-history status         # Show sync status
claude-history sync           # Create new backup archive
claude-history list           # List all archives
claude-history config         # View/set backup location
claude-history logs           # View scheduler log

# Scheduler (macOS launchd - runs missed jobs on wake)
claude-history scheduler-install
claude-history scheduler-status
claude-history scheduler-remove

Configuration

# View current config
claude-history config

# Change backup location
claude-history config --backup-root ~/Dropbox/claude-backups

Default: ~/claude_code_history Config file: ~/.config/claude-history/config.json

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.3.0.tar.gz (6.4 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.3.0-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: claude_history_backup-0.3.0.tar.gz
  • Upload date:
  • Size: 6.4 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.3.0.tar.gz
Algorithm Hash digest
SHA256 22ba537b2115d24f0a1ebf229f48d4f2bf2f8285c12f3d38af9335f3b7f6ba1f
MD5 df90641ca12ad60e759a5a5e3845f9f8
BLAKE2b-256 950d5b46821b0a5a46b89bde454efedd08ec90d8429b49745db5e9ae8b3578ea

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for claude_history_backup-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fb346e78d61911d0d2619c02c524f2c38f0297246407dd22fdca0381023b20c5
MD5 940da009f43b57a66a802ae2bbcf3bb6
BLAKE2b-256 3fd809d9790051aa755c370089f4032d23661a679678cad7128f10c471fde932

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