{"id":46355130,"url":"https://github.com/mysticaldevil/codexsm","last_synced_at":"2026-04-01T19:02:32.904Z","repository":{"id":341569148,"uuid":"1170630238","full_name":"MysticalDevil/codexsm","owner":"MysticalDevil","description":"Safety-first local Codex session manager in Go with CLI and TUI","archived":false,"fork":false,"pushed_at":"2026-03-20T02:28:38.000Z","size":766,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-20T16:14:49.476Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MysticalDevil.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":"audit/logger.go","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-03-02T10:40:36.000Z","updated_at":"2026-03-20T02:28:42.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/MysticalDevil/codexsm","commit_stats":null,"previous_names":["mysticaldevil/codex-sm","mysticaldevil/codexsm"],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/MysticalDevil/codexsm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MysticalDevil%2Fcodexsm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MysticalDevil%2Fcodexsm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MysticalDevil%2Fcodexsm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MysticalDevil%2Fcodexsm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MysticalDevil","download_url":"https://codeload.github.com/MysticalDevil/codexsm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MysticalDevil%2Fcodexsm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31291015,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-03-05T00:10:53.037Z","updated_at":"2026-04-01T19:02:32.896Z","avatar_url":"https://github.com/MysticalDevil.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# codexsm\n\n`codexsm` is a safety-first local Codex session manager written in Go.\n\n## Quick Links\n\n| Topic | Link |\n| --- | --- |\n| Architecture | [docs/ARCHITECTURE.md](./docs/ARCHITECTURE.md) |\n| Command Guide | [docs/COMMANDS.md](./docs/COMMANDS.md) |\n| Release Checklist | [docs/RELEASE.md](./docs/RELEASE.md) |\n| Changelog | [CHANGELOG.md](./CHANGELOG.md) |\n\n## Compatibility\n\n- Go: `1.26+`\n- Required experiment: `GOEXPERIMENT=jsonv2`\n- JSON packages: `encoding/json/v2`, `encoding/json/jsontext`\n\n\u003e [!IMPORTANT]\n\u003e `GOEXPERIMENT=jsonv2` is required for build, install, and test.\n\n```bash\nexport GOEXPERIMENT=jsonv2\n```\n\n## Install\n\n```bash\nGOEXPERIMENT=jsonv2 go install github.com/MysticalDevil/codexsm@v0.3.9\n```\n\nOr with `mise`:\n\n```bash\nGOEXPERIMENT=jsonv2 mise install go:github.com/MysticalDevil/codexsm@v0.3.9\n```\n\n## Quick Start\n\n```bash\n# List sessions\ncodexsm list\n\n# Open TUI\ncodexsm tui\n\n# Grouped TUI\ncodexsm tui --group-by host\n\n# Run health checks\ncodexsm doctor\n\n# Explain AGENTS.md rule sources and effective rules\ncodexsm agents explain\n\n# Lint AGENTS.md layering for shadowed/duplicate rules\ncodexsm agents lint --strict\n\n# Dry-run single session migration to a new cwd\ncodexsm session migrate --from /old/path --to /new/path\n\n# Dry-run batch migration from TOML mappings\ncodexsm session migrate --file ./migrate.toml\n\n# Dry-run delete\ncodexsm delete --id-prefix 019ca9\n\n# Dry-run restore from trash\ncodexsm restore --id-prefix 019ca9\n```\n\n\u003e [!TIP]\n\u003e For complete examples and command flags, use [docs/COMMANDS.md](./docs/COMMANDS.md).\n\n## At A Glance\n\n| Area | Summary |\n| --- | --- |\n| Browse | `list`, `group`, and `tui` for session discovery |\n| Safety | `dry-run` by default, explicit `--confirm` for real actions |\n| Recovery | `batch_id`-based rollback with `restore --batch-id` |\n| Migration | `session migrate` for Resume-compatible cwd/path moves |\n| Diagnostics | `doctor` and `config` validation tooling |\n| Rules Visibility | `agents explain` / `agents lint` for AGENTS.md traceability and policy checks |\n\n## Core Features\n\n- Session listing and grouping (`list`, `group`)\n- Interactive browser (`tui`) with theme support\n- Safe delete/restore workflow (`dry-run` by default)\n- TUI group delete from a selected group header with triple confirm for real execution\n- Resume-compatible session migration (`session migrate`)\n- TUI pending-action confirmation shown in bottom keybar (`Y/N`) with stronger visibility\n- TUI delete keeps navigation continuity by advancing selection to the next session\n- Batch rollback via `restore --batch-id`\n- Diagnostics and configuration (`doctor`, `config`)\n- AGENTS.md instruction visibility and lint checks (`agents explain`, `agents lint`)\n\n## Safety Model\n\n- Destructive actions default to simulation (`--dry-run=true`).\n- Real execution requires explicit opt-in (`--dry-run=false --confirm`).\n- Multi-target real execution requires additional approval (`--yes` or interactive confirmation).\n- TUI real delete from a group header requires three explicit confirms before execution.\n- Soft-delete is default; hard delete is explicit (`--hard`).\n- Operation logs include `batch_id` for audit and rollback.\n\n\u003e [!NOTE]\n\u003e Recommended flow: preview first, then real execution with explicit confirmation.\n\n## Configuration\n\nConfig path resolution:\n\n- `$CSM_CONFIG` when set\n- otherwise `~/.config/codexsm/config.json`\n\nExample:\n\n```json\n{\n  \"sessions_root\": \"~/.codex/sessions\",\n  \"trash_root\": \"~/.codex/trash\",\n  \"log_file\": \"~/.codex/codexsm/logs/actions.log\",\n  \"tui\": {\n    \"group_by\": \"host\",\n    \"source\": \"sessions\",\n    \"theme\": \"catppuccin\",\n    \"colors\": {\n      \"keys_label\": \"#ffffff\",\n      \"keys_key\": \"#89dceb\",\n      \"border_focus\": \"#f38ba8\"\n    }\n  }\n}\n```\n\nTUI note:\n\n- main panes follow the terminal's default background\n- theme colors still control borders, titles, selection, keybar, and preview roles\n- `bg` remains available for local emphasis, such as highlighted action prompts\n- semantic state tokens are available for status UI: `status_ok`, `status_warn`, `status_risk`, `status_info`, `accent_group`\n- group tree supports folding with `z` (toggle selected session group) and `Z` (expand all groups)\n- pressing `d` on a group header targets the whole group; real execution uses a dedicated `3/3` confirm flow\n- layout is adaptive by width tier: `full` (`\u003e=118`), `medium` (`96-117`), `compact` (`80-95`), `ultra` (`65-79`)\n- `ultra` mode switches to a single active pane (`tree`/`preview`) with `Tab` or `1`/`2`, while keeping shared selection state\n- minimum supported runtime size is `65x24`\n\n## Build And Dev\n\n```bash\nmise install\njust build\njust check\njust bench-session\njust bench-cli\njust bench-gate\njust bench-tui\njust stress-cli\ncodexsm doctor risk --sessions-root ./testdata/fixtures/risky-static/sessions --format json --sample-limit 5\njust gen-sessions-extreme\njust gen-sessions-large\njust check-release 0.3.9\n```\n\nFixture note:\n\n- `testdata/fixtures/rich/` keeps the general regression corpus.\n- `testdata/fixtures/risky-static/` keeps deterministic risk-oriented samples for `doctor risk`.\n- `testdata/fixtures/extreme-static/` keeps a small extreme corpus for oversized meta lines, long single messages, no-final-newline files, mixed corruption, and Unicode-heavy previews.\n- Larger stress files are intentionally generated on demand via `just gen-sessions-extreme` or `just gen-sessions-large` instead of being committed as multi-megabyte fixtures.\n- Lightweight benchmark suites are available through `just bench-session`, `just bench-cli`, and `just bench-tui`; `just stress-cli` is the heavier local-only smoke path for generated large datasets.\n\nRelease build example:\n\n```bash\nGOEXPERIMENT=jsonv2 go build -ldflags=\"-X main.version=0.3.9\" -o codexsm .\n```\n\n## License\n\nBSD 3-Clause. See [LICENSE](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmysticaldevil%2Fcodexsm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmysticaldevil%2Fcodexsm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmysticaldevil%2Fcodexsm/lists"}