codex-s installs the cx CLI, a small tool for listing and deleting local Codex sessions.
It reads sessions from a local Codex home, supports interactive multi-select deletion, and requires typing DELETE before it removes matching session files or index entries.
- Node.js
>=24or Bun>=1.1.0
codex-s can be installed with npm or Bun. The default cx binary runs on Node.js. A Bun-specific binary is also exposed as cx-bun for users who want to run the same CLI under Bun.
From npm:
npm install -g codex-sFrom Bun:
bun add -g codex-sFor local development from this repository:
bun install
bun linkYou can also run the built CLI directly:
bun run build
node ./dist/cli/index.js list
bun ./dist/cli/index.js listcx <command>
Commands:
list, ls List local Codex sessions
delete, d, rm [session..]
Delete Codex sessions after confirmation
config <action> [value] Read or write codex-s configuration
help Show CLI help
completion Print a fish completion script
When cx delete is run without arguments, it opens an interactive multi-select picker:
type to filter, Space toggles, ↑/↓ moves, Enter confirms, Ctrl+C cancels
In non-TTY mode, enter numbers and ranges like 1,3,5-8.
To delete explicit sessions:
cx delete 550e8400 "session title"Codex home is resolved in this order:
--home <path>CODEX_S_HOMECODEX_HOMEcodex-s.config.jsonin the current directory~/.config/codex-s/config.json- Auto-detected
.codexhome
To point WSL at a Windows host Codex home for the current repo, write an ignored local config:
cx config set-home /mnt/c/Users/Dylan/.codex --local
cx listYou can also use an explicit one-off path:
cx --home /mnt/c/Users/Dylan/.codex listcodex-s.config.json is gitignored so local host paths are not committed.
If you use Fish, install a completion file into Fish's user completion directory:
mkdir -p ~/.config/fish/completions
cx completion fish > ~/.config/fish/completions/cx.fish- Close Codex before deleting sessions manually.
- The CLI backs up
session_index.jsonlbefore editing it. - No sync, archive, rename, or export features are included yet.