Your first Belay decision
You do not need an agent or a live database to see how Belay evaluates a command. belay try runs a command through Belay's full decision process and shows you the result — without executing anything.
belay try is a dry-run. The command you pass is never run. No database connection is opened. You can safely test any command, including destructive ones.
Try a destructive command
This example shows Belay evaluating a command that would drop a production database table:
$ belay try 'psql -h db.prod.example.com -c "DROP TABLE users"'
Belay evaluates the command — resolving the target host, identifying the SQL operation, checking it against your configuration — and prints the verdict:
Target: db.prod.example.com (production) Operation: DROP TABLE users ✕ BLOCKED Dropping a table on a production target is catastrophic and cannot be approved. [nothing was executed]
What Belay evaluated
In this example, Belay:
- Identified that
db.prod.example.comis a production target (either declared in your configuration, or defaulting to production because it is a remote host). - Recognized the
DROP TABLEoperation as catastrophic on a production system. - Blocked the action outright. This is not a hold — it cannot be approved, even by you.
Try a lower-risk command
Not every command Belay evaluates is blocked. Try something that would be held for approval rather than refused outright:
$ belay try 'psql -h db.prod.example.com -c "DELETE FROM sessions WHERE created_at < NOW() - INTERVAL 30 DAYS"'
A filtered delete — where rows are identified by a condition — is consequential but potentially legitimate. Belay would hold it pending your approval rather than blocking it outright.
What happens in normal use
Once your agent is guarded by Belay, this evaluation happens automatically for every command the agent issues. You do not need to manually invoke belay try in day-to-day use — it is a tool for understanding and testing Belay's behavior.
When Belay holds an action during a real agent session, the agent stops and waits. You resolve it with belay approve from your terminal, or from your phone if you have set up a notification channel.
