Create portable Markdown snapshots from Codex CLI and Claude Code sessions.
Project description
ctx2doc
ctx2doc creates compact, redacted Markdown snapshots from local coding-agent sessions and stores them in your project. It currently supports:
Codex CLIvia local Codex session logsClaude Codevia official MCP + hooks + project skill integration
Install
From PyPI after the first public release:
uv tool install ctx2doc
Or:
pipx install ctx2doc
Until PyPI is live, install from this repository:
uv tool install .
Quickstart
Codex
Inside the target project:
ctx2doc install codex
This will:
- register the
ctx2docMCP server in Codex - install a project-local Codex skill
- add a small
AGENTS.mdblock withctx2doc snapshot,ctx2doc resume, andctx2doc status - write
.ctx2doc/config.json
Then use it from Codex:
ctx2doc snapshot
Claude Code
Inside the target project:
ctx2doc install claude
This will:
- create or update
.mcp.json - create or update
.claude/settings.json - install a project-local Claude skill at
.claude/skills/ctx2doc/SKILL.md - enable hook-based logging for Claude sessions
Then use it from Claude Code:
/ctx2doc snapshot
Core commands
ctx2doc snapshot
ctx2doc status
ctx2doc resume
ctx2doc install codex
ctx2doc uninstall codex
ctx2doc install claude
ctx2doc uninstall claude
ctx2doc mcp
Useful flags:
--project-root /path/to/project--source auto|codex|claude--output-dir docs/ctx2doc--redaction-mode standard|off
What gets written
- Snapshots:
docs/ctx2doc/*.md - Project config:
.ctx2doc/config.json - Claude runtime event logs:
.ctx2doc/runtime/claude/*.jsonl
ctx2doc writes one full snapshot per invocation. It does not overwrite old snapshots.
Privacy and redaction
By default, ctx2doc redacts common secrets before writing snapshots:
- bearer tokens
- API keys and token-like assignments
- private key blocks
- common GitHub and
sk-*token formats
Redaction is configurable with --redaction-mode off if you explicitly want raw content.
Uninstall
ctx2doc uninstall codex
ctx2doc uninstall claude
Uninstall removes integration glue. It does not delete your existing snapshots.
Development
python -m unittest discover -s tests -v
python -m build
Publishing
This repository includes a GitHub Actions workflow for PyPI Trusted Publishing.
Before the first release:
- create the
ctx2docproject on TestPyPI and PyPI - add this GitHub repository as a Trusted Publisher on both services
- publish a tag like
v0.2.0
The workflow file is at .github/workflows/publish.yml.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ctx2doc-0.2.0.tar.gz.
File metadata
- Download URL: ctx2doc-0.2.0.tar.gz
- Upload date:
- Size: 20.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
351031940e6a09fb1daf1b3048a105e32d03bb8fc89678c075a5d305855d35b1
|
|
| MD5 |
b446e8049468be5c4cdb4f728e2eff06
|
|
| BLAKE2b-256 |
2b91de8a5508992547b1707658fdd3ad5d35c8e6beaa9baef0fda40fb519af5b
|
Provenance
The following attestation bundles were made for ctx2doc-0.2.0.tar.gz:
Publisher:
publish.yml on greenblat17/ctx2doc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ctx2doc-0.2.0.tar.gz -
Subject digest:
351031940e6a09fb1daf1b3048a105e32d03bb8fc89678c075a5d305855d35b1 - Sigstore transparency entry: 1358348560
- Sigstore integration time:
-
Permalink:
greenblat17/ctx2doc@2848bc5534b707cae906ae28374d63cdb98c984b -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/greenblat17
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2848bc5534b707cae906ae28374d63cdb98c984b -
Trigger Event:
push
-
Statement type:
File details
Details for the file ctx2doc-0.2.0-py3-none-any.whl.
File metadata
- Download URL: ctx2doc-0.2.0-py3-none-any.whl
- Upload date:
- Size: 20.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2444fb39a7445058aa742c11bbb146bcefccba2cbeebe65122701c77c438cff3
|
|
| MD5 |
0f5b3186a7adba511059a2ddc560eb89
|
|
| BLAKE2b-256 |
4571a4012841907500acf84985a172224e925e7a7453012a5b8506c0cbd2aa1b
|
Provenance
The following attestation bundles were made for ctx2doc-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on greenblat17/ctx2doc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ctx2doc-0.2.0-py3-none-any.whl -
Subject digest:
2444fb39a7445058aa742c11bbb146bcefccba2cbeebe65122701c77c438cff3 - Sigstore transparency entry: 1358348677
- Sigstore integration time:
-
Permalink:
greenblat17/ctx2doc@2848bc5534b707cae906ae28374d63cdb98c984b -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/greenblat17
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2848bc5534b707cae906ae28374d63cdb98c984b -
Trigger Event:
push
-
Statement type: