Skip to main content

ChatArch: AI Conversation Archiver

ChatArch is a utility designed to migrate local AI chat histories to AWS S3, freeing up local disk space while preserving conversations in a human-readable, summarized, and searchable format.

Features

  • Multi-Platform Support: Automatically discovers chats from Gemini CLI, Roo Code (Cline), and Aider.
  • Smart Cleanup: Identifies and deletes "commit-only" chats (short messages used solely for git commits) before archiving.
  • Markdown Conversion: Converts complex JSON chat schemas into clean, readable Markdown files within the archive.
  • AI-Powered Summarization: Uses Gemini 2.5 Flash to generate 1-2 sentence summaries for every archived conversation.
  • Safe Archival:
    • Retention Policy: Only archives chats older than 20 days.
    • Verification: Local files are only deleted after a successful S3 upload.
    • Rate Limit Handling: Includes configurable delays and exponential backoff for API calls.
  • Space Reporting: Reports the total disk space reclaimed at the end of each run.

Prerequisites

  • Python & uv: Managed via uv.
  • AWS CLI: Must be configured with credentials that have s3:PutObject permissions.
  • 1Password CLI (op): Used to securely retrieve the Gemini API key.
  • Google Gemini API Key: Stored in 1Password at op://Private/GEMINI_API_KEY/credential.

Usage

Commands are managed via the Makefile for convenience.

Verify which files will be deleted or archived without actually performing any actions:

make dry-run

2. Actual Archive

Perform the cleanup and migration:

make archive

3. Using Limits

To test the full process on a small sample (e.g., 5 files):

make archive ARGS="--limit 5"

4. Maintenance

Run linting and auto-fixes:

make lint

Configuration

Settings like S3 bucket names, local search paths, and API delays are managed in config.yaml.

Logging

All detailed operations and API responses are logged to .logs/archiver.log, rotated daily and kept for 180 days. Progress is displayed in the terminal via a status bar.

Development

The package publishes two equivalent commands, chatarch and its short alias cax (pip install agent-chat-archiver / uv tool install agent-chat-archiver).

Inside this repo, bin/ (added to PATH via mise.toml's [env] when you cd in, since this repo's dev environment is managed with mise) shadows the globally installed commands with a shim that runs this repo's live source via uv run. Outside the repo, chatarch/cax resolve back to whatever version is installed globally. Run mise trust once after cloning to enable it.

Metadata

Release files for agent-chat-archiver 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agent-chat-archiver 0.1.4
File Size Uploaded
agent_chat_archiver-0.1.4.tar.gz 50.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for agent-chat-archiver 0.1.4
File Interpreter ABI Platform
agent_chat_archiver-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 62.5 kB

Release files / agent_chat_archiver-0.1.4.tar.gz

Download URL agent_chat_archiver-0.1.4.tar.gz
Size 50.4 kB
Tags Source
SHA-256 checksum
How to use checksums
cddb4bcf91851cc68917a6f2bec530b7ca2312f8d1d1e8280566a7a6b3551846
BLAKE2b-256 checksum
How to use checksums
fa32381ffd5721cf5db15c7938d0a7c7730a3c2e00b79be464df6906b55aaaad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 1, 2026.

Transparency log

Release files / agent_chat_archiver-0.1.4-py3-none-any.whl

Download URL agent_chat_archiver-0.1.4-py3-none-any.whl
Size 12.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e2db38143d88223f763e04f55b14b841b7744af27f65d76592ed2986dad52c31
BLAKE2b-256 checksum
How to use checksums
570e34eac73922c5cf332bfb1c31ad341908f2863f6040c55caeffe861cc9217
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 1, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page