agentreflex
Reference

CLI Reference

Every agentreflex command — init, add, new, install, uninstall, doctor, and dev.

The CLI is agentreflex, aliased to arx. Both names work.

agentreflex <command> [options]
arx <command> [options]

init

Scaffold .reflex/, detect installed agents, wire each one's native hook, and optionally drop in a starter reflex. Interactive.

npx agentreflex init

add

Add a reflex from the commons (by name), a GitHub path, a URL, or a local file. Writes it into .reflex/ and records it in config.json.

arx add no-force-push
arx add github:you/reflexes/no-secrets.mjs
arx add https://example.com/no-secrets.mjs
arx add ./no-force-push.mjs

new

Scaffold a new reflex file in .reflex/ and register it.

arx new my-reflex

install

Wire (or re-wire) the dispatcher into your agents — run it after cloning a repo that already has reflexes.

arx install                 # all detected agents
arx install --agent claude  # just one

uninstall

Remove agentreflex's hooks from your agents. Your reflex files stay.

arx uninstall

doctor

Show which agents are wired and what each can enforce.

arx doctor

dev

Run your reflexes against a command and print the verdict — no agent needed.

arx dev "git push --force origin main"

Flags

FlagApplies toMeaning
--dir <path>allRun as if in another directory.
--agent <name>install, uninstallTarget specific agents (comma-separated).
--scope <project|global>install, uninstallWire the project or your whole machine.
--globalinstall, uninstallShorthand for --scope global.
--registry <url>addResolve names against a different catalog.

arx hook --agent <name> also exists, but it's the machine-facing dispatcher each agent calls — you won't run it by hand.

On this page