SessionSync
SessionSync exports AI coding agent sessions to standardized file formats. It reads session data from Claude Code, OpenCode, and Pi, then converts them to Markdown, JSON, or TOON format.
Problem
AI coding agents store session data in different formats and locations. This makes it difficult to:
- Review past conversations across multiple agents
- Search and organize session history
- Share, back up or archive coding sessions
- Analyze tool usage patterns
Long sessions also cause agents to enter the "DUMB ZONE". Short sessions avoid this but lose context. SessionSync exports sessions to files so agents can read them back, giving them memory through the filesystem.
Supported Agents
- Claude Code
- OpenCode
- Pi
Export Formats
| Format | Description |
|---|---|
| Markdown | Human-readable with YAML frontmatter containing session metadata |
| JSON | Structured data for programmatic access and analysis |
| TOON | Binary format for compact storage |
Installation
PyPI
pip install sessionsync
Or with uv:
uv tool install sessionsync --prerelease=allow
Usage
Export all sessions from the current workspace:
sessionsync
Export sessions from a specific agent:
sessionsync --agent claude
sessionsync --agent opencode
sessionsync --agent pi
Export to a specific format:
sessionsync --format json
sessionsync --format toon
Filter by git branch:
sessionsync --branch main
Watch mode for continuous export:
sessionsync --watch
Options
| Option | Short | Description |
|---|---|---|
--agent |
-a |
Agent to sync: claude, opencode, pi, or all (default: all) |
--output |
-o |
Output directory (default: .sessions) |
--format |
-f |
Export format: markdown, json, or toon (default: markdown) |
--workspace |
-w |
Filter by workspace path (default: current directory) |
--branch |
-b |
Filter by git branch |
--no-subagents |
Exclude subagent sessions | |
--no-tools |
Exclude tool use and result messages | |
--no-thinking |
Exclude assistant thinking messages | |
--no-attachments |
Exclude file attachments | |
--watch |
Watch for changes and sync continuously | |
--verbose |
-v |
Enable debug logging |
Examples
Export only main sessions without subagents:
sessionsync --no-subagents
Export without tool calls and thinking blocks:
sessionsync --no-tools --no-thinking
Export all Claude Code sessions to JSON:
sessionsync --agent claude --format json
License
Metadata
Release files for sessionsync 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| sessionsync-0.1.2.tar.gz | 42.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sessionsync-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 67.2 kB
Release files / sessionsync-0.1.2.tar.gz
| Download URL | sessionsync-0.1.2.tar.gz |
|---|---|
| Size | 42.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
343b8928b0a8d7b4787f3a97cf5f64d2ca0260031cb7337140d74f5f32e266fc
|
|
BLAKE2b-256 checksum How to use checksums |
a35cefc56769860c255b228c0fa1266a98262b75c7fd81e5978ff7ba756b6921
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.9.25 {"installer":{"name":"uv","version":"0.9.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / sessionsync-0.1.2-py3-none-any.whl
| Download URL | sessionsync-0.1.2-py3-none-any.whl |
|---|---|
| Size | 24.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
132712e6c895377c50783a85f8a90e2e8d81e2a82f43d3114383a10420fe947d
|
|
BLAKE2b-256 checksum How to use checksums |
8e008e3639aa5689b3bfbbe0eea1b3fcc79063f450769a0b66ccf3071db37e20
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.9.25 {"installer":{"name":"uv","version":"0.9.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for sessionsync 0.1.2
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.