{"id":50919353,"url":"https://github.com/guinhx/ai-context-migration","last_synced_at":"2026-06-16T18:03:44.660Z","repository":{"id":363682474,"uuid":"1264418328","full_name":"guinhx/ai-context-migration","owner":"guinhx","description":"CLI to export and migrate AI conversation context between coding agents with a pluggable provider architecture.","archived":false,"fork":false,"pushed_at":"2026-06-09T23:26:29.000Z","size":57,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-10T00:12:54.643Z","etag":null,"topics":["agents-md","ai-agents","ai-tools","bun","cli","context-migration","cursor","llm","openai-codex","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/guinhx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-09T21:40:16.000Z","updated_at":"2026-06-09T23:26:33.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/guinhx/ai-context-migration","commit_stats":null,"previous_names":["guinhx/ai-context-migration"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/guinhx/ai-context-migration","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guinhx%2Fai-context-migration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guinhx%2Fai-context-migration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guinhx%2Fai-context-migration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guinhx%2Fai-context-migration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guinhx","download_url":"https://codeload.github.com/guinhx/ai-context-migration/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guinhx%2Fai-context-migration/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34417416,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-16T02:00:06.860Z","response_time":126,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agents-md","ai-agents","ai-tools","bun","cli","context-migration","cursor","llm","openai-codex","typescript"],"created_at":"2026-06-16T18:03:43.509Z","updated_at":"2026-06-16T18:03:44.652Z","avatar_url":"https://github.com/guinhx.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ctx — AI Context Migration CLI\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n[![Bun](https://img.shields.io/badge/runtime-Bun-f9f1e1)](https://bun.sh)\n\n**AI Context Migration — thread history export and handoff between coding agents.**\n\nRead context from one agent (like OpenAI Codex) and export it in a format another agent (like Cursor) can use to continue the work.\n\n\u003e **Not [ai-context-bridge](https://github.com/himanshuskukla/ai-context-bridge)** — that project is a git-hook tool that also ships a `ctx` binary. This repo migrates **conversation threads** to AGENTS.md / Markdown / JSON. Primary command: `ctx`. Alias: `ctx-migrate` (same binary, clearer name on PATH).\n\n```\nCodex  →  canonical thread  →  AGENTS.md / Markdown / JSON  →  Cursor\n```\n\n## Why ctx?\n\nSwitching AI coding agents usually means losing conversation history — project context, decisions, file changes, and where you left off. **ctx** extracts that history and converts it into portable, useful context files.\n\n## Compare\n\n| Tool | Focus | Overlap with ctx |\n|------|--------|------------------|\n| **ctx** (this repo) | Export/migrate **thread history** → AGENTS.md, Markdown, JSON | — |\n| [agent-migrator](https://github.com/softaworks/agent-migrator) | Move agent **config \u0026 rules** between IDEs | Complementary — use after ctx for rules/skills |\n| [ai-context-bridge](https://github.com/himanshuskukla/ai-context-bridge) | Git-hook **context sync** via `ctx` CLI | Different problem — hooks, not thread export |\n| [ai-sync](https://github.com/johnlindquist/ai-sync) | Sync **AGENTS.md / rules** across repos | Complementary — keeps files in sync; ctx creates them from threads |\n\n## Quick start\n\n**Requirements:** [Bun](https://bun.sh) ≥ 1.0 · [OpenAI Codex](https://openai.com/codex) installed (for the Codex provider)\n\n```sh\ngit clone https://github.com/guinhx/ai-context-migration.git\ncd ai-context-migration\nbun install\nbun run link        # global `ctx` and `ctx-migrate` (dev)\n# or: bun run build # standalone binary → dist/ctx\n```\n\n```sh\nctx setup                              # first-time wizard\nctx list                               # see your Codex threads\nctx migrate \u003cthread-id\u003e --to=cursor    # export as AGENTS.md\n```\n\nPlace the generated `AGENTS-\u003cid\u003e.md` in your project as `AGENTS.md` and start a new Cursor chat — the agent picks up where Codex left off.\n\n→ Full walkthrough: [Getting started](docs/getting-started.md)\n\n## Commands\n\n| Command | Description |\n|---------|-------------|\n| `ctx setup` | Interactive configuration wizard |\n| `ctx list` | List threads from an input provider |\n| `ctx read \u003cid\u003e` | Display a thread in the terminal |\n| `ctx export \u003cid\u003e` | Export canonical JSON |\n| `ctx migrate \u003cid\u003e` | Convert thread to another format |\n| `ctx migrate --all` | Batch migrate all threads |\n| `ctx validate` | Check AGENTS.md commands/paths against the repo |\n\n```sh\nctx migrate \u003cid\u003e --format=agents-md   # Cursor context (default)\nctx migrate \u003cid\u003e --format=markdown    # full conversation log\nctx migrate \u003cid\u003e --format=json        # portable JSON\nctx validate                          # drift-check AGENTS.md vs package.json/Makefile\nctx validate --file=HANDOFF.md\n```\n\n→ All options: [Usage guide](docs/usage.md)\n\n## Output formats\n\n| Format | File | Best for |\n|--------|------|----------|\n| `agents-md` | `AGENTS-\u003cid\u003e.md` | Continue work in Cursor |\n| `markdown` | `thread-\u003cid\u003e.md` | Human-readable archive |\n| `json` | `thread-\u003cid\u003e.json` | Custom integrations |\n\n→ Details: [Output formats](docs/output-formats.md)\n\n## Documentation\n\n| Guide | |\n|-------|---|\n| [Getting started](docs/getting-started.md) | 5-minute setup |\n| [Installation](docs/installation.md) | Global install, PATH, binary build |\n| [Configuration](docs/configuration.md) | Config file and env vars |\n| [Architecture](docs/architecture.md) | How it works under the hood |\n| [Providers](docs/providers.md) | Add support for new AI tools |\n| [Troubleshooting](docs/troubleshooting.md) | Common errors |\n| [Contributing](docs/contributing.md) | Development guide |\n\n## Providers\n\n| Role | Provider | Status |\n|------|----------|--------|\n| Input | OpenAI Codex | ✅ Stable |\n| Input | Claude Code | 🧪 Experimental |\n| Input | Cursor (JSONL / SQLite) | ✅ Stable |\n| Output | Cursor (AGENTS.md / Markdown / JSON) | ✅ |\n\nThe provider architecture makes it straightforward to add ChatGPT, Windsurf, and others. See [Providers](docs/providers.md).\n\n## Project structure\n\n```\npackages/\n├── core/              @ctx/core           — canonical types + interfaces\n├── cli/               @ctx/cli            — CLI commands\n├── provider-codex/    @ctx/provider-codex — Codex input\n├── provider-claude/   @ctx/provider-claude — Claude Code input\n├── provider-cursor-input/ @ctx/provider-cursor-input — Cursor input\n└── provider-cursor/   @ctx/provider-cursor — Cursor output\n```\n\n## Contributing\n\nContributions are welcome — bug reports, new providers, docs improvements.\n\n1. Read [Contributing](docs/contributing.md)\n2. Open an issue using the [templates](.github/ISSUE_TEMPLATE/)\n3. Submit a PR\n\n## License\n\n[MIT](LICENSE) © 2026 [guinhx](https://github.com/guinhx)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguinhx%2Fai-context-migration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguinhx%2Fai-context-migration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguinhx%2Fai-context-migration/lists"}