Welcome! This document captures the context an automation or AI agent needs when
working on codex-status.
- Purpose: lightweight CLI that reads Codex rollout logs from
~/.codex/sessionsand prints a single status line (one-off or watch mode). - Tech stack: Node.js ≥ 20, CommonJS modules, standard library only (no runtime dependencies).
- Distribution target: npm package
codex-statusexposing thecodex-statusbinary. - Required tooling: Codex CLI
@openai/codexversion ≥ 0.41.0 available on the system, either via npm or the official installation instructions.
src/codex-status.js: core logic; exportsrunCli, helper utilities, and the Codex CLI requirement check.bin/codex-status.js: executable entry point that loads package metadata and invokesrunCli.test/codex-status.test.js: Node test suite (node:test) covering argument parsing, terminal truncation, version comparisons, and Codex CLI detection.README.md: user-facing instructions, including install, usage, maintenance, limited support policy, and Codex acknowledgement.LICENSE: MIT license.
codex-statusshould gracefully inform users when Codex CLI is missing or out of date, referencing the official OpenAI installation guide.- Output lines must fit within the user’s terminal width via
truncateToTerminal. - The working directory badge is placed last in the summary (unless
--minimalis used, which hides policy and directory fields). --versionprintscodex-status vX.Y.Z;--helpprints usage.
- Run tests with
npm test(Node’s built-in test runner). - The project avoids external dependencies; prefer adding small utilities in
src/codex-status.jswhen needed. - Keep documentation aligned with OpenAI Codex’s official guidance.
- Maintain acknowledgements that the tool was built with assistance from OpenAI Codex and provide limited-support messaging.
- Follow MIT license terms.
- Respect semantic versioning when modifying behaviour.
- Update README and tests when features or options change.
- Ensure any automated agents leave concise, well-scoped commits and describe modifications clearly in pull requests.