codex-keysmith README

The project's README from github.com/Jia-Ethan/codex-keysmith. As one markdown file: README.md.

codex-keysmith

CI GitHub Stars Source version v0.6.0 Python 3.10+ MIT License Telegram

简体中文 · English · 使用说明 · License

codex-keysmith

给 Codex 装上一份可撤销的指令。先看计划,确认了再写入。

简体中文

Keysmith 给本机的 AI 编程工具装指令:先预览,再写入,能验证,能撤走。

codex-keysmith 面向 Codex。装上之后,新开的对话会按这份指令工作。不改 Codex 软件本身,也不读取账号和密钥。默认只装一份稿。

[!IMPORTANT] 这会改变该 Codex 配置下 之后新开的对话。默认只给你看计划,加上确认才会写入。装完后请开一个新任务。

使用方式

先看计划,确认后装上,新对话生效,随时可以撤走

  1. 先看计划。 确认之前什么都不会写入。
  2. 确认后装上。 指令交给本机 Codex,软件保持原样。
  3. 新开一轮对话。 关掉旧任务,开一个新的。
  4. 随时撤走。 同样先看计划,确认后恢复成原来的样子。

示意预览;实际路径与输出以本机 dry-run 为准

选哪个 Keysmith

你在用 用这个 怎么开始
Codex codex-keysmith 稳定版安装包
Claude Code claude-keysmith 源码
Grok Build grok-keysmith 稳定版安装包
ZCode zcode-keysmith 源码

每个工具一份安装器。也有未签名桌面版(Apple Silicon / Windows x64)。

开始使用

本机需要已经装好 Codex。稳妥路径是 最新稳定 Release 的单文件脚本(当前公开稳定脚本包括 codex-instruct-v0.6.0.py)。也有未签名桌面版。

# 把 vX.Y.Z 换成 Releases 页的最新稳定 tag
base='https://github.com/Jia-Ethan/codex-keysmith/releases/download/vX.Y.Z'
curl --fail --location --remote-name "$base/codex-instruct-vX.Y.Z.py"
curl --fail --location --remote-name "$base/SHA256SUMS"
awk '$2 == "codex-instruct-vX.Y.Z.py"' SHA256SUMS | shasum -a 256 -c -

python3 codex-instruct-vX.Y.Z.py --version
python3 codex-instruct-vX.Y.Z.py --codex-dir ~/.codex --status --lang zh-CN
python3 codex-instruct-vX.Y.Z.py --codex-dir ~/.codex --dry-run --lang zh-CN
# 确认目标目录、提示词来源和写入计划后:
python3 codex-instruct-vX.Y.Z.py --codex-dir ~/.codex --yes --lang zh-CN

源码路径:git clone https://github.com/Jia-Ethan/codex-keysmith.git && cd codex-keysmith,再把上述脚本名换成 codex-instruct.py。装完后关掉旧任务,开一个新 Codex 会话。Windows 把 python3 换成 python。也可以把 代装说明 交给你正在用的 AI 助手。细节见 使用说明。

怎么撤走

以下以 Release 单文件为例;源码 checkout 请把文件名换成 codex-instruct.py。

python3 codex-instruct-vX.Y.Z.py --codex-dir ~/.codex --restore-hooks --lang zh-CN
python3 codex-instruct-vX.Y.Z.py --codex-dir ~/.codex --uninstall --lang zh-CN
python3 codex-instruct-vX.Y.Z.py --codex-dir ~/.codex --uninstall --yes --lang zh-CN

--reactivate 从 v0.3.9 开始提供:

python3 codex-instruct-vX.Y.Z.py --codex-dir ~/.codex --reactivate
python3 codex-instruct-vX.Y.Z.py --codex-dir ~/.codex --reactivate --yes --lang zh-CN

先看计划,确认后再恢复。

适用环境

macOS 与 Linux 为主要支持。Windows 新鲜部署仍是测试通道。需要 Python 3.10+。本安装器不主动收集或上传用户数据。未签名桌面版会碰到 Gatekeeper / SmartScreen,不是 SignPath Foundation 签名;实体机验收见发布说明(physical-device acceptance)。

文档

系列

官方反馈:GitHub Discussions · 社区:LINUX DO · 交流群:Telegram

codex-keysmith (Jia-Ethan/codex-keysmith)

Searching Database…

What is this?A CLI tool that deploys a versioned Markdown instruction file into Codex's global config directory (usually ~/.codex), always previewing first and letting you undo the deployment later.
Is this a GUI app or a command-line tool?It's primarily a single-file Python CLI script; there is also an unsigned Desktop beta app (macOS Apple Silicon DMG, Windows x64 NSIS) that wraps the same CLI as a sidecar.
How do I install and run it?Download the verified single-file script (currently codex-instruct-v0.5.1.py) plus SHA256SUMS from the latest stable Release, check the hash, then run it with python3; alternatively clone the repo and run python3 codex-instruct.py directly.
Do I need pip or any package manager to use it?No, it's a dependency-free single-file script; you just need Python 3.10-3.14, there's no pip install and no auto-update mechanism.
Is the Windows build safe to use right now?Windows is marked as EXPLICITBETA for fresh deployments and the old v0.1.0 release should not be used; the Desktop beta app is unsigned and unnotarized, so it can trigger Gatekeeper or SmartScreen warnings.
Which platforms are actually fully supported?The CLI's main supported platforms are macOS and Linux, with Windows in beta; the separate Desktop beta app is only built for macOS Apple Silicon and Windows x64, and there's no Linux GUI.
Does it collect or upload any of my data?No, normal CLI and Desktop operation doesn't actively collect or upload user data.
What's the difference between the instruction channel and the scaffold channel?The instruction channel deploys a Markdown file into ~/.codex with default preset unrestricted; the separate --scaffold environment channel writes a fixture workspace to ~/.codex-fixture-workspace/ without touching ~/.codex. Both can be used together since they never write to each other's directories.
How do I undo a deployment if something breaks?Uninstall rolls back one layer at a time; --reactivate (since v0.3.9) restores just the top-level modelinstructionsfile reference without a full redeploy, and --recover handles interrupted deploy/uninstall transactions without manually touching the journal or manifest.
How does this relate to claude-keysmith or grok-keysmith?It's part of a 'Keysmith' family of tools that safely deploy and remove custom instructions for different AI assistants: codex-keysmith targets Codex's global ~/.codex instructions, while sibling projects target Claude Code, Grok Build, and ZCode App respectively.
Does it touch my hooks.json?Yes, by default it isolates Codex's hooks.json by renaming it to hooks.json.disabled; the --restore-hooks flag brings it back immediately and, unlike other operations, doesn't accept --yes.
Creator
Jia-Ethan
Size
24.3 MB
Stars
4.8K
Age
5mo
Commits · 90 Days