- This is an unofficial tool, not affiliated with OpenAI.
- Use at your own risk !
- Codex may change its behavior at any time, breaking this tool.
- Always backup your prompts before using this tool.
- This tool have only been tested on Linux.
Use custom prompts from each project's .codex/prompts/ without manually copying them to ~/.codex/prompts/.
Codex only looks for prompts in ~/.codex/prompts/ (home directory).
This script creates automatic hardlinks from your projects to this global directory.
# Install as global tool with uv (recommended)
uv tool install git+https://github.com/Hotion13/cx-prompts
# Or use directly with uvx (no installation)
uvx --from git+https://github.com/Hotion13/cx-prompts cx-prompts --help
# Local installation (development)
uv tool install .# From project directory
cd /my/project
cx-prompts link
# Or from anywhere
cx-prompts link -p /my/projectEffect: All *.md files from /my/project/.codex/prompts/ are linked to ~/.codex/prompts/
cx-prompts unlinkEffect: Removes only hardlinks created by this project (keeps others)
cx-prompts statusOutput:
Active overlays (2):
• /home/user/projects/web-app
5 linked prompts
• /home/user/projects/api
3 linked prompts
Index: /home/user/.codex/prompts/.cx_overlay.json
cx-prompts shellEffect:
- Activates overlay
- Launches bash sub-shell
- Automatically cleans up on exit
my-project/
├── .codex/
│ └── prompts/
│ ├── review.md
│ ├── test.md
│ └── deploy.md
└── ...
After cx-prompts link:
~/.codex/prompts/
├── review.md → /my-project/.codex/prompts/review.md
├── test.md → /my-project/.codex/prompts/test.md
└── deploy.md → /my-project/.codex/prompts/deploy.md
✅ Hardlinks (Codex-compatible, no copying, no duplication)
✅ Idempotent (can run link multiple times safely)
✅ Smart index (tracks overlays per project)
✅ Automatic detection of project root (searches for .codex/)
✅ Safe cleanup (removes ONLY this project's hardlinks)
✅ Python 3.14+ (uses suggest_on_error, modern Path)
# Clone the repo
git clone https://github.com/Hotion13/cx-prompts
cd cx-prompts
# Install in dev mode with uv
uv tool install .
# Lint
uv run ruff check cx_prompts/
# Format
uv run ruff format cx_prompts/Codex only supports hardlinks, not symlinks. Hardlinks provide:
- ✅ Automatic synchronization (same inode = same file)
- ✅ Compatible with Codex restrictions
⚠️ Requires source and destination to be on the same filesystem
- Automatic cd hook (fish/bash/zsh)
- Name conflict detection between projects
- Support subdirectories in
.codex/prompts/ -
cx-prompts doctorcommand (integrity check)
MIT