Option 1
Connect Claude Code
- Open your project folder.
- Create
.claude/settings.jsonif it does not already exist. - Paste this setup into the new file:
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash|Edit|MultiEdit|Write|Read",
"hooks": [
{
"type": "command",
"command": "notatechbro"
}
]
}
]
}
}
If the file already contains settings, do not replace them. Add the hooks section alongside the existing settings or use the developer guide above.
Start a new Claude Code session, then ask it to run the project tests.
Option 2
Connect Codex CLI
- Open
~/.codex/config.toml. - Add the setup below. If the file already has a
[features]section, addhooks = trueinside that section instead of creating a second one.
[features]
hooks = true
[[hooks.PreToolUse]]
matcher = "Bash"
hooks = [{ type = "command", command = "notatechbro", timeout = 5 }]
Start a new Codex session. If Codex asks whether you trust the hook, review it and accept it before continuing.
What success looks like
Ask your connected agent to run npm test. Before the command runs, NotATechBro should print:
This will run this project's tests.
Your agent still controls its normal approval prompt. NotATechBro only adds the explanation.
Quick troubleshooting
- “Command not found”: run
notatechbro --check. If that fails, install the package again. - No preview: start a new agent session and confirm the setup is in the correct file.
- Codex does not run the hook: confirm
hooks = trueand accept the hook-trust prompt.
Advanced integrations: Hermes and custom tools
Hermes can call NotATechBro from a pre_tool_call hook:
hooks:
pre_tool_call:
- command: "notatechbro"
matcher: "terminal|bash|shell|write_file|read_file|patch"
Hermes configuration placement can differ by version. The developer guide includes supported payload shapes and verification notes for custom integrations.