{"id":50375897,"url":"https://github.com/morlay/codex-cleanup","last_synced_at":"2026-05-30T09:30:55.360Z","repository":{"id":353485370,"uuid":"1219622892","full_name":"morlay/codex-cleanup","owner":"morlay","description":null,"archived":false,"fork":false,"pushed_at":"2026-04-24T04:05:15.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-24T06:12:59.253Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/morlay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-04-24T04:00:52.000Z","updated_at":"2026-04-24T04:05:19.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/morlay/codex-cleanup","commit_stats":null,"previous_names":["morlay/codex-cleanup"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/morlay/codex-cleanup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morlay%2Fcodex-cleanup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morlay%2Fcodex-cleanup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morlay%2Fcodex-cleanup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morlay%2Fcodex-cleanup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/morlay","download_url":"https://codeload.github.com/morlay/codex-cleanup/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morlay%2Fcodex-cleanup/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33687717,"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-30T02:00:06.278Z","response_time":92,"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":[],"created_at":"2026-05-30T09:30:54.971Z","updated_at":"2026-05-30T09:30:55.352Z","avatar_url":"https://github.com/morlay.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# codex-cleanup\n\n一个基于 Bun 的本地维护工具，用于检查并清理 `~/.codex` 下过期或不一致的本地状态。\n\n仓库当前只暴露一个可安装的 CLI：`codex-cleanup`。它会读取线程与日志相关的本地 SQLite 状态，先报告差异，再在显式要求时执行清理。\n\n## 为什么存在\n\n当本地 Codex 状态和日志索引出现残留、错位或失配时，手工排查成本高且容易误删。这个仓库的职责是把检查和清理流程收敛成一个稳定、可重复执行的命令入口。\n\n## 职责边界\n\n本仓库负责：\n\n- 检查与线程、日志相关的本地 Codex SQLite 状态\n- 提供稳定的 dry-run 和 apply 清理入口\n- 保持仓库级协作约束和执行入口清晰分离\n\n本仓库不负责：\n\n- 承担 `~/.codex` 之外的通用数据迁移或清理框架\n- 接管 Codex 的长期配置管理或其他无关运维职责\n\n## 先看哪里\n\n- [src/bin/codex-cleanup.ts](/Users/morlay/src/github.com/morlay/codex-cleanup/src/bin/codex-cleanup.ts): CLI 主入口，适合先确认程序从哪里启动\n- [justfile](/Users/morlay/src/github.com/morlay/codex-cleanup/justfile): 仓库稳定执行入口，包含 dry-run 和 apply 命令\n- [AGENTS.md](/Users/morlay/src/github.com/morlay/codex-cleanup/AGENTS.md): 仓库级协作约束和高风险操作护栏\n\n## 最小开始方式\n\n先安装依赖并使用只读检查入口确认当前状态：\n\n```bash\nbun install\njust dry-run\n```\n\n确认输出符合预期后，再按需执行：\n\n```bash\njust apply\njust apply-verbose\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorlay%2Fcodex-cleanup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmorlay%2Fcodex-cleanup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorlay%2Fcodex-cleanup/lists"}