Jia-EthanDeveloper tools

Codex Keysmith

codex-keysmith

A Codex CLI deployment tool for managing custom instructions with preview, backup, hook isolation, and rollback capabilities.

  • DevOps
  • Backend
  • Automation
  • Productivity
  • CLI
  • Desktop
  • macOS
  • Linux
  • Windows
  • Runs locally
  • Needs API key
codex-keysmith screenshot
Popularity
3.6k Stars
GitHub stars
Recent activity
8/17/2026
Updated in the last 30 days
License
MIT
Permissive

Why it matters

We look beyond stars: what problem it solves, whether it creates real utility, and what makes its approach worth noticing.

Problem

Addresses the difficulty of versioning, previewing, and safely rolling back global Codex behaviors, instructions, and hooks across multiple sessions.

Practical value

Provides a zero-dependency Python script and Tauri desktop client featuring previews, ownership manifests, hook isolation, and layered uninstallation to reliably manage deployments and recovery.

Innovation / differentiation

Transforms configuration changes into traceable, auditable transactions through explicit previews, dry-runs, ownership manifests, and orthogonal target-local scenario deployments.

Leverage potential

Integrates with configuration switchers like CCSwitch to isolate On/Off states via separate Provider replicas, while supporting offline scenario validation and evaluation via scripts or bundles.

Why now

As local and global configurations for large models shift frequently, the demand for control, isolation, and auditability in instruction deployment is steadily increasing.

Key highlights

  • Deploy Codex instruction files via CLI with automated configuration updates
  • Support dry-run previews, file backups, and one-click rollback
  • Isolate hooks.json to manage global behavior changes

Quick start

How it is installed, how hard it is, and where to start.

Where it runs

Runs locally

Difficulty

Medium — some setup needed

Runs locally
  1. 01Download the script and verify its SHA256 checksum.
  2. 02Run the preview command to inspect the intended configuration changes.
  3. 03Execute the deployment command to apply the configuration once verified.
  4. 04Restart your Codex session to load the new instruction configuration.

Best for

  • Developers who want to try it on their machine

More about it

codex-keysmith is a single-file Python script designed to provide versioned instruction deployment for Codex CLI. It forces all new sessions to load specified Markdown instruction files by modifying the model_instructions_file field in ~/.codex/config.toml. The tool includes a transactional mechanism that offers dry-run previews before execution and supports full rollbacks or hook restoration.

Sources

Each field shows its status and source — expand to review.

15 · Expand
  • capability tags

    Verified

    automation, productivity

    Source: admin_cms · cms editor · 8/21/2026

  • editor note

    Verified

    {"en":"This tool injects instructions by modifying global Codex configuration files and provides hook isolation. It is suitable for developers requiring granular control over Codex session behavior; always use dry-run to preview changes before deployment.","zh":"该工具通过修改 Codex 的全局配置文件实现指令注入,并提供钩子隔离功能。适合需要对 Codex 会话行为进行精细化控制的开发者使用,部署前务必通过 dry-run 预览变更。"}

    Source: admin_cms · cms editor · 8/21/2026

  • how to use

    Verified

    {"steps":[{"en":"Download the script and verify its SHA256 checksum.","zh":"下载并校验脚本文件的 SHA256 摘要。"},{"en":"Run the preview command to inspect the intended configuration changes.","zh":"运行预览命令查看将要进行的配置变更。"},{"en":"Execute the deployment command to apply the configuration once verified.","zh":"确认无误后,执行部署命令写入配置。"},{"en":"Restart your Codex session to load the new instruction configuration.","zh":"重启 Codex 会话以加载新的指令配置。"}],"installAt":"local","difficulty":"medium"}

    Source: admin_cms · cms editor · 8/21/2026

  • intro

    Verified

    {"en":"codex-keysmith is a single-file Python script designed to provide versioned instruction deployment for Codex CLI. It forces all new sessions to load specified Markdown instruction files by modifying the `model_instructions_file` field in `~/.codex/config.toml`. The tool includes a transactional mechanism that offers dry-run previews before execution and supports full rollbacks or hook restoration.","zh":"codex-keysmith 是一个单文件 Python 脚本,为 Codex CLI 提供版本化的指令部署方案。它通过修改 `~/.codex/config.toml` 中的 `model_instructions_file` 字段,强制所有新会话加载指定的 Markdown 指令文件。工具内置了事务处理机制,在写入前提供 dry-run 预览,并支持随时撤销变更或恢复原始钩子状态。"}

    Source: admin_cms · cms editor · 8/21/2026

  • Latest release

    Verified

    v0.3.5

    Source: GitHub API · latest_release=v0.3.5 · 8/17/2026

  • License

    Verified

    MIT

    Source: GitHub API · license.spdx_id=MIT · 8/17/2026

  • needs api key

    Verified

    Yes

    Source: admin_cms · cms editor · 8/21/2026

  • One-liner

    Verified

    {"en":"A Codex CLI deployment tool for managing custom instructions with preview, backup, hook isolation, and rollback capabilities.","zh":"Codex CLI 指令部署工具,支持自定义提示词预览、备份、钩子隔离及一键撤销。"}

    Source: admin_cms · cms editor · 8/21/2026

  • Platforms

    Verified

    macos, linux, windows

    Source: admin_cms · cms editor · 8/21/2026

  • Category hint

    Inferred from materials

    ai-apps

    Source: Project README · hint=ai-apps · 8/15/2026

  • product forms

    Verified

    cli, desktop

    Source: admin_cms · cms editor · 8/21/2026

  • role tags

    Verified

    devops, backend

    Source: admin_cms · cms editor · 8/21/2026

  • supports docker

    Verified

    No

    Source: admin_cms · cms editor · 8/21/2026

  • supports local

    Verified

    Yes

    Source: admin_cms · cms editor · 8/21/2026

  • supports self host

    Verified

    No

    Source: admin_cms · cms editor · 8/21/2026

Other verified projects matched by category, capabilities, and intended roles.