Install
The Nanny CLI is a system tool, install it once and usenanny run --serve from any project.
- macOS
- Linux
- Windows
nanny run --serve owns the process lifecycle and enforces limits; @tool, @rule, and @agent report tool calls and activate named limit sets from inside your agent code.
Initialise a config
Run this in the root of your project:nanny.toml with safe defaults:
[start].cmd to your agent’s entry point, then list the tools it is allowed to call.
nanny init also writes .nanny/app.json, a permanent, one-time identity for this app (an app_id plus a name you’ll be prompted for). It’s meant to be committed alongside nanny.toml.
Run your agent
[start].cmd from nanny.toml, spawns the process, and stops it the moment it tries something outside what you declared.
Label your tools
Labels say what a tool is, so a rule can govern it without knowing its name:Add rules
Install a pack and pin it:nanny.toml and vendors the pack into
.nanny/rules/, both committed:
Read the event log
Every run emits structured NDJSON to stdout:nanny.toml:
.nanny/logs/log.ndjson, auto-created, gitignored. Set file = "..." only
if you want a different filename, see Event Log for details.