Metadata-Version: 2.5
Name: session-migrate
Version: 0.5.1
Summary: Convert Claude, Codex, and Pi sessions to supported native agent targets
Project-URL: Homepage, https://session-migrate.team-reddy-mila.chatgpt.site
Project-URL: Repository, https://github.com/xhluca/session-migrate
Project-URL: Documentation, https://github.com/xhluca/session-migrate/tree/main/docs
Project-URL: Issues, https://github.com/xhluca/session-migrate/issues
Author: xhluca
License-Expression: MIT
License-File: LICENSE
Keywords: claude,codex,copilot,opencode,pi,session-migration
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Requires-Python: >=3.11
Description-Content-Type: text/markdown

<h1 align="center"><a href="https://session-migrate.team-reddy-mila.chatgpt.site">↝ session-migrate</a></h1>

<p align="center"><strong>Carry the conversation forward.</strong></p>

<p align="center">
  <a href="https://pypi.org/project/session-migrate/"><img src="https://img.shields.io/pypi/v/session-migrate?style=flat-square&color=b8f94a&label=PyPI" alt="PyPI version"></a>
  <a href="https://pypi.org/project/session-migrate/"><img src="https://img.shields.io/pypi/pyversions/session-migrate?style=flat-square" alt="Python versions"></a>
  <a href="https://github.com/xhluca/session-migrate/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-8dbdff?style=flat-square" alt="MIT license"></a>
  <a href="https://session-migrate.team-reddy-mila.chatgpt.site"><img src="https://img.shields.io/badge/website-live-b8f94a?style=flat-square" alt="Project website"></a>
</p>

<p align="center">
  <img src="https://raw.githubusercontent.com/xhluca/session-migrate/main/docs/assets/demo.gif" alt="session-migrate converting a Claude Code session into a native Codex session" width="860">
</p>

<p align="center">
  Move local coding-agent sessions between <strong>Claude Code</strong>,
  <strong>Codex</strong>, <strong>Pi</strong>, <strong>OpenCode</strong>, and
  <strong>GitHub Copilot CLI</strong>.
</p>

## Install

```bash
uv tool install session-migrate
```

No `uv`? Use the standalone installer:

```bash
curl -LsSf https://raw.githubusercontent.com/xhluca/session-migrate/main/install.sh | sh
```

`pipx install session-migrate` works too. Python 3.11+ and Linux are currently
supported. The full command is `session-migrate`; `smigrate` is the shorthand.

## Quick start

Inspect any native transcript without printing its conversation:

```bash
smigrate inspect ~/.claude/projects/-work/SESSION.jsonl
```

Move a Claude session into Codex and resume it from the same project directory:

```bash
smigrate transfer SESSION_UUID --from claude --to codex --cwd "$PWD"
codex resume NEW_SESSION_UUID
```

Or find an older session by title first:

```bash
smigrate catalog refresh
smigrate catalog search "authentication refactor"
smigrate transfer --catalog-id RESULT_ID --to pi
```

## Compatibility

| Source ↓ / Target → | Claude | Codex | Pi | OpenCode | Copilot |
| --- | :---: | :---: | :---: | :---: | :---: |
| Claude Code | — | ✓ | ✓ | ✓ | ✓ |
| Codex | ✓ | — | ✓ | ✓ | ✓ |
| Pi | ✓ | ✓ | — | ✓ | ✓ |

Claude, Codex, and Pi are sources and targets. OpenCode and Copilot are
currently target-only. Same-format migration is intentionally rejected.
Antigravity and Cursor remain fail-closed until they expose supported transcript
import APIs.

## What survives

- User and assistant messages, in order
- Tool calls and their linked results
- Supported inline images
- Portable compaction summaries
- Native session identity, discovery, and resume metadata

Anything target-specific is counted in a content-free migration manifest. The
source session is never modified.

## How it works

```text
native session → validated event timeline → native target → resume
```

Each reader projects a versioned native transcript into a small ordered model.
Each writer then emits only structures verified against the target CLI. This is
session migration, not text export: the target receives a discoverable,
resumable native session.

## More

- [CLI reference](https://github.com/xhluca/session-migrate/blob/main/docs/cli-reference.md)
- [Session catalog](https://github.com/xhluca/session-migrate/blob/main/docs/session-catalog.md)
- [Compatibility details](https://github.com/xhluca/session-migrate/blob/main/docs/format-compatibility.md)
- [Troubleshooting](https://github.com/xhluca/session-migrate/blob/main/docs/troubleshooting.md)
- [Format research and validation](https://github.com/xhluca/session-migrate/blob/main/docs/validation-report.md)
- [Data handling and architecture](https://github.com/xhluca/session-migrate/blob/main/docs/architecture.md)

The demo above is generated by the real CLI from synthetic, credential-free
fixtures. [Watch the MP4](https://github.com/xhluca/session-migrate/raw/main/docs/assets/demo.mp4)
or [reproduce it](https://github.com/xhluca/session-migrate/blob/main/scripts/render-demo.sh).

<a href="https://session-migrate.team-reddy-mila.chatgpt.site">
  <img src="https://raw.githubusercontent.com/xhluca/session-migrate/main/docs/assets/landing.png" alt="session-migrate project website" width="860">
</a>

## Contributing

```bash
git clone https://github.com/xhluca/session-migrate.git
cd session-migrate
uv sync --dev
uv run pytest
```

See [the development guide](https://github.com/xhluca/session-migrate/blob/main/docs/development.md)
before changing a native
adapter. New formats need sanitized fixtures and a real native-resume oracle.

## License

[MIT](https://github.com/xhluca/session-migrate/blob/main/LICENSE)
