{"id":50344588,"url":"https://github.com/amalshaji/agent-thread","last_synced_at":"2026-05-29T19:01:56.755Z","repository":{"id":358936077,"uuid":"1215163622","full_name":"amalshaji/agent-thread","owner":"amalshaji","description":"Share and convert Claude Code and Codex chat sessions","archived":false,"fork":false,"pushed_at":"2026-05-19T17:08:58.000Z","size":450,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-19T20:39:48.360Z","etag":null,"topics":["agent-tools","bun","chat-transcripts","claude","claude-code","cloudflare-workers","codex","codex-cli","nextjs","openai"],"latest_commit_sha":null,"homepage":"https://agent-thread.com","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/amalshaji.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":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-04-19T15:07:21.000Z","updated_at":"2026-05-19T17:02:49.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/amalshaji/agent-thread","commit_stats":null,"previous_names":["amalshaji/agent-thread"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/amalshaji/agent-thread","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amalshaji%2Fagent-thread","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amalshaji%2Fagent-thread/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amalshaji%2Fagent-thread/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amalshaji%2Fagent-thread/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amalshaji","download_url":"https://codeload.github.com/amalshaji/agent-thread/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amalshaji%2Fagent-thread/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33666290,"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-05-29T02:00:06.066Z","response_time":107,"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":["agent-tools","bun","chat-transcripts","claude","claude-code","cloudflare-workers","codex","codex-cli","nextjs","openai"],"created_at":"2026-05-29T19:01:54.924Z","updated_at":"2026-05-29T19:01:56.749Z","avatar_url":"https://github.com/amalshaji.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# agent-thread\n\nShare and inspect Claude Code and Codex chat sessions.\n\nagent-thread is a TypeScript CLI and Next.js share viewer for exporting local agent chats to public links. It uses Bun for development, tests, and builds, while the published CLI is Node-compatible.\n\n## Features\n\n- Claude Code session discovery from `~/.claude/projects`\n- Codex thread discovery from `~/.codex/sessions`\n- Interactive session picker scoped to the current project\n- Public share pages backed by Cloudflare D1 and R2\n- Same-app imports for shared Claude Code and Codex sessions\n- `bunx agent-thread` CLI entrypoint through the `agent-thread` binary\n\n## CLI Usage\n\nExport the latest Claude Code session to the default hosted service:\n\n```bash\nbunx agent-thread --latest\n```\n\nExport Codex threads instead:\n\n```bash\nbunx agent-thread --codex\n```\n\nPoint the CLI at a local Cloudflare preview or self-hosted server:\n\n```bash\nAGENT_THREAD_SERVER_URL=http://127.0.0.1:\u003cpreview-port\u003e bunx agent-thread\nAGENT_THREAD_SERVER_URL=https://your-domain.example bunx agent-thread --codex\n```\n\nImport a shared session back into the same app it came from:\n\n```bash\nbunx agent-thread --import 0c5a0y4a406r\nbunx agent-thread --import https://agent-thread.com/t/0c5a0y4a406r --workspace /path/to/project\n```\n\nClaude Code exports import into Claude Code. Codex exports import into Codex. Use `--dry-run` to inspect target paths without writing files and `--force` to overwrite an existing local import.\n\nUse `--yes` to confirm uploads in non-interactive scripts after you have reviewed the session content:\n\n```bash\nbunx agent-thread --latest --yes\n```\n\n## Privacy and Safety\n\nagent-thread uploads the raw Claude Code or Codex transcript files for the selected session, plus a normalized transcript used by the web viewer. These files can include prompts, tool outputs, local file paths, repository names, branch names, environment details, code snippets, and secrets that appeared in the conversation.\n\nAnyone with a public thread link can view the rendered transcript. Anyone with the link can also fetch the export bundle and import it back into the source app. Review sessions before uploading and avoid sharing links publicly unless the transcript is safe to disclose.\n\n## Requirements\n\n- Bun\n- A local Claude Code or Codex history if you want to export chats\n- Cloudflare account, D1 database, and R2 bucket if you want to self-host the web app\n\n## Local Setup\n\nInstall dependencies:\n\n```bash\nbun install\n```\n\nRun type checks and tests:\n\n```bash\nbun run check\nbun test\n```\n\nStart the Next.js dev server:\n\n```bash\nbun run dev\n```\n\nThe dev server is useful for UI work. Export and share APIs require Cloudflare bindings for D1 and R2, so use `bun run preview` or a deployed Worker when you need the full hosted flow.\n\n## Self-Hosting\n\nagent-thread deploys to Cloudflare Workers through OpenNext. The hosted app needs:\n\n- D1 binding named `DB`\n- R2 binding named `SESSIONS_BUCKET`\n- `PUBLIC_BASE_URL` set to your public app URL\n- `AGENT_THREAD_SERVER_URL` set to the same URL for CLI defaults in the deployed app\n\nCreate Cloudflare resources:\n\n```bash\nbunx wrangler d1 create agent-thread\nbunx wrangler r2 bucket create agent-thread-sessions\n```\n\nUse `wrangler.example.toml` as a reference when configuring your deployment. Copy the values into your own `wrangler.toml` and update:\n\n- `database_id` from the D1 create output\n- `bucket_name` for your R2 bucket\n- `routes` for your domain, or remove the `[[routes]]` block if you deploy to a workers.dev subdomain\n- `PUBLIC_BASE_URL` and `AGENT_THREAD_SERVER_URL`\n\nApply the D1 migration:\n\n```bash\nbunx wrangler d1 migrations apply agent-thread\n```\n\nBuild and test the Worker locally with Cloudflare bindings:\n\n```bash\nbun run preview\n```\n\nDeploy:\n\n```bash\nbun run deploy\n```\n\nAfter deployment, point the CLI at your instance:\n\n```bash\nAGENT_THREAD_SERVER_URL=https://your-domain.example bunx agent-thread --latest\n```\n\n## Project Scripts\n\n```bash\nbun run cli        # run the TypeScript CLI locally\nbun run dev        # run Next.js dev server\nbun run preview    # build and preview the Cloudflare Worker\nbun run deploy     # build and deploy to Cloudflare\nbun run build      # production build plus CLI bundle\nbun run check      # TypeScript check\nbun test           # test suite\n```\n\n## Data Model\n\nExports store metadata in D1 and session JSONL payloads in R2. The first migration creates the `uploads` table and indexes public IDs and source session IDs.\n\nThe app stores raw source files alongside a normalized transcript representation. Public share pages render from the normalized transcript representation, and same-app imports restore from the raw source files.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famalshaji%2Fagent-thread","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famalshaji%2Fagent-thread","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famalshaji%2Fagent-thread/lists"}