codex-keysmith CLI

A CLI for reversible instruction deployment into Codex: preview the plan, confirm, and fully roll back

  • 4,801 ★ on the repository
  • Last commit
  • MIT
CLI

Extended access

Why this level

  • Writes to the local Codex configuration, affecting the behavior of all new conversations
All reasons and checks

jia-ethan/codex-keysmith

Install

Works in

Manual install

python3 codex-instruct-vX.Y.Z.py --codex-dir ~/.codex --dry-run --lang zh-CN

Replace vX.Y.Z with the current release tag from the Releases page; download the file first. Drop --lang zh-CN for English output.

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • Writes to the local Codex configuration, affecting the behavior of all new conversations

This is third-party code. Review the repository files before installing.

What it does

The tool installs a system instruction on top of the local Codex configuration without touching the program itself and without reading account credentials or keys. Before any write it shows a plan of exactly which files it will touch, and the write happens only after explicit confirmation. The change applies to new Codex conversations started after installation; existing sessions are left alone. The installation can be rolled back at any time with uninstall, using the same preview-then-confirm cycle, and a reactivate flag restores a previously disabled instruction.

Who it is for. For Codex CLI users who want a reproducible, reversible way to set a system instruction instead of hand-editing config files.

Good fit when

  • You want to set one instruction for all new Codex conversations on the machine
  • You want a safe way to roll back the change if the instruction does not work out
  • You want to preview the write plan before anything in the config actually changes

Not a fit when

  • Codex CLI is not installed on the machine
  • A manual edit of one config file is enough, without versioning or rollback

Example request

Show me what would change if I install my instruction into Codex here, but do not write anything yet

Limitations

Primary support is macOS and Linux; a fresh deployment on Windows is marked as a beta channel by the author. Needs Python 3.10 or newer. Unsigned desktop builds exist for Apple Silicon and Windows x64, not signed by SignPath Foundation, which may trigger Gatekeeper or SmartScreen warnings.

How to disable. Run codex-instruct-vX.Y.Z.py --codex-dir ~/.codex --uninstall, the plan of changes is shown before anything is written, confirm with the --yes flag.

FAQ

Does it modify Codex itself or read account data?

No, the author states plainly that the program is not modified and account credentials are not read, only config files are touched.

Are there versions for other agents?

Yes, the author maintains separate repositories: claude-keysmith for Claude Code, grok-keysmith for Grok Build, and zcode-keysmith for ZCode.

How is codex-keysmith different from editing the Codex config by hand?

The CLI installs a system instruction on top of the local Codex config without changing the program itself or reading keys or accounts. Before writing it shows a plan of the files it will touch, and after confirmation writes with full rollback.

How do I install codex-instruct.py?

Download the release file and run python3 codex-instruct-vX.Y.Z.py --codex-dir ~/.codex --dry-run. Dry-run shows the plan without writing. To apply, run without that flag and confirm the changes.

Discussion

No questions or reviews yet.

CLI tools

An unofficial Codex CLI build with rewind: /rewind returns the conversation and project files to a chosen prompt, /redo undoes it.

CLIBroad access59Repository stars

Codex Settings skills

Codex CLI Skills & Profiles

A Codex CLI plugin with twelve skills: deep research, pull request review, image generation and session handoff

PluginBroad access249Repository stars
Needs a VPN

An MCP server that sends tasks to Codex CLI from Claude Code and Cursor: code review via @ refs, a sandbox, patch edits, ideas

MCP serverBroad access176Repository stars

A layer on top of OpenAI Codex that adds project memory, planning and completion checks before a task counts as done

CLIExtended access3.9KRepository stars
Needs a VPN

A CLI that saves Codex accounts under labels and switches between them with one command, skipping repeated codex login.

CLIBroad access94Repository stars

Statusline HUD for Codex CLI inside tmux: context fill, tokens, branch, MCP servers and subagents stay visible in the session.

CLIExtended access80Repository stars

README in short

The bilingual README describes a four-step cycle: preview the plan first, write only after confirmation, start a new Codex conversation to apply the change, and roll back at any time through the same preview cycle. The main install path is a single script from the latest stable release with a SHA256SUMS checksum check; unsigned desktop builds also exist. It states the tool does not collect or upload user data.

README badge

Report a problem