Jia-Ethan/grok-keysmith
Preview-first Grok Build instruction deployment with compat and hook isolation, durable recovery, and layered uninstall.
What it solves
grok-keysmith is a deployment tool designed to safely manage custom instructions (home rules) for Grok Build. It allows users to deploy, verify, and undo changes to their global configuration without manually editing critical files like AGENTS.md.
How it works
The tool operates by managing specific files within the ~/.grok directory. It deploys a Markdown file as ~/.grok/rules/99-keysmith.md so that new Grok sessions load these rules. To ensure stability, it injects a compatibility isolation block into config.toml and disables existing hooks by renaming the ~/.grok/hooks/*.json directory to .json.disabled.
It follows a "preview-first" approach, requiring an explicit --yes flag to commit any changes to the disk. It also provides mechanisms to reconcile configuration drift, restore hooks, and perform a full uninstallation of the deployed rules.
Who it’s for
Developers and power users of Grok Build who want to customize their AI agent's global behavior through custom instructions while maintaining a backup and safe rollback mechanism.
Highlights
- Safe Deployment: Uses a dry-run preview before writing to disk.
- Non-Destructive: Does not modify
AGENTS.mdand creates backups of replaced files. - Configuration Management: Handles
config.tomlisolation and hook disabling to prevent conflicts. - Reversible: Provides dedicated commands to restore hooks and fully uninstall the deployment.
- Cross-Platform: Supports macOS, Linux, and Windows (Python 3.8+).
- Session Scripting: Includes a
run --session-scriptfeature to feed multi-turn conversations into a single Grok session.
Related
- Project
- Project
- Dispatch
- Dispatch
- Dispatch