Skip to main content

Idempotent conversation exporter for Codex, Claude, and Cursor.

Project description

Conversation Exporter

Export AI conversation sessions into a Git repository using a readable, time-based structure.

What it does

  • Scans source session files (Codex JSONL, Claude projects, Cursor workspaceStorage).
  • Normalizes each session into a common model.
  • Writes two artifacts per session:
    • readable Markdown transcript: YYYY-MM-DD-HHMM-slug.md
    • hidden normalized JSON: .YYYY-MM-DD-HHMM-slug.json
  • Organizes history by user and source system:
    • sync: .ai/history/<user>/<source-system>/ (flat — sessions directly inside)
    • backup: history/<user>/<source-system>/<system-name>/<path-relative-to-home>/...
  • Runs idempotently (only reprocesses changed or new sessions).
  • Cursor: supports both single-folder and multi-root (.code-workspace) windows — sessions are attributed to the matching repo folder.

TL;DR

No install needed — just run from any project folder:

uvx --from convx-ai convx sync

Install and run

uv add convx-ai
# or: pip install convx-ai
convx --help

From source:

uv sync
uv run convx --help

sync — project-scoped command

Run from inside any Git repo. Syncs only the conversations that took place in that repo (or its subfolders) and writes them into the repo itself:

cd /path/to/your/project
uv run convx sync

By default syncs Codex, Claude, and Cursor. Use --source-system codex, --source-system claude, or --source-system cursor to sync a single source. No --output-path needed — the current directory is used as both the filter and the destination. Sessions are written flat under .ai/history/<user>/<source-system>/ with no machine name or path nesting.

backup — full backup command

Exports all conversations into a dedicated backup Git repo:

uv run convx backup \
  --output-path /path/to/your/backup-git-repo \
  --source-system codex

Common options

  • --source-system: source(s) to sync: all (default), codex, claude, cursor, or comma-separated.
  • --input-path: source sessions directory override (per source).
    • default for Codex: ~/.codex/sessions
    • default for Claude: ~/.claude/projects
    • default for Cursor: ~/Library/Application Support/Cursor/User/workspaceStorage (macOS) Supports both single-folder and multi-root (.code-workspace) Cursor windows.
  • --user: user namespace for history path (default: current OS user).
  • --system-name: system namespace for history path (default: hostname).
  • --dry-run: discover and plan without writing files.
  • --history-subpath: folder inside output repo where history is stored (default: sync = .ai/history, backup = history).
  • --output-path (backup only): target Git repository (must already contain .git).

Configuration defaults

Set repo-level defaults in .convx/config.toml. CLI flags override config values.

[sync]
history_subpath = ".ai/history"
skip_if_contains = "CONVX_NO_SYNC"
redact = true

[backup]
history_subpath = "history"
redact = true

[sanitize]
keywords = ["work", "client-x"]

Example output

convx sync (inside a project repo):

history/
  pascal/
    codex/
      2026-02-15-1155-conversation-backup-plan.md
      .2026-02-15-1155-conversation-backup-plan.json
    claude/
      2026-01-15-1000-api-auth-migration-plan/
        index.md
        agent-abc1234.md
        .index.json

convx backup (dedicated backup repo):

history/
  pascal/
    codex/
      macbook-pro/
        Code/
          my-project/
            prototypes/
              matrix-heatmap-test/
                2026-02-15-1155-conversation-backup-plan.md
                .2026-02-15-1155-conversation-backup-plan.json

Idempotency behavior

  • Export state is stored at .convx/index.json in the output repo.
  • A session is skipped when both:
    • session_key already exists, and
    • source fingerprint (SHA-256 of source file) is unchanged.
  • If source content changes, that session is re-rendered in place.

Other commands

stats — index totals and last update time:

uv run convx stats --output-path /path/to/your/backup-git-repo

explore — browse and search exported conversations in a TUI:

uv run convx explore --output-path /path/to/your/repo

hooks — install or remove a pre-commit hook that runs sync before each commit:

uv run convx hooks install
uv run convx hooks uninstall

Secrets

Exports are redacted by default (API keys, tokens, passwords → [REDACTED]). Be mindful of secrets in your history repo. See docs/secrets.md for details and pre-commit scanner options (Gitleaks, TruffleHog, detect-secrets, semgrep).

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

convx_ai-0.2.5.tar.gz (3.2 MB view details)

Uploaded Source

Built Distribution

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

convx_ai-0.2.5-py3-none-any.whl (291.7 kB view details)

Uploaded Python 3

File details

Details for the file convx_ai-0.2.5.tar.gz.

File metadata

  • Download URL: convx_ai-0.2.5.tar.gz
  • Upload date:
  • Size: 3.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","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}

File hashes

Hashes for convx_ai-0.2.5.tar.gz
Algorithm Hash digest
SHA256 f47ebd70a5101de38f582491980880560794ebb9d4e335124105b5b564522e54
MD5 04470a135a770bb4cff1b85f76bd733b
BLAKE2b-256 7940a69ecd8b883ddefdffe1be2bee2af9e1d7df6457cdd22c4bd7820a7af6a3

See more details on using hashes here.

File details

Details for the file convx_ai-0.2.5-py3-none-any.whl.

File metadata

  • Download URL: convx_ai-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 291.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","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}

File hashes

Hashes for convx_ai-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 3ca031d37f05e492aba56d091dc986a883e5b458d5ae9ec07788348e3d8f805d
MD5 bd9e44a8f3c522629d5e00dde5e898f3
BLAKE2b-256 a8578fbdde160ac80d9ef44832b0c8404a78cc5cfa87d617cdd41abbf45b7ba4

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