Quick Start
1. Run something and watch it fail
Section titled “1. Run something and watch it fail”wardcell run -- curl -sS https://example.comwardcell: run 0192f0a1 · backend seatbeltwardcell: logs → ~/Library/Logs/wardcell/runs/0192f0a1….jsonlwardcell: live tail → wardcell logs show 0192f0a1 -fcurl: (56) Recv failurewardcell: run 0192f0a1 exited 56 in 0swardcell: 1 network request(s) blocked, 1 destination(s): example.com:443 ×1 allow with: net allow_http "example.com"wardcell: full log → wardcell logs show 0192f0a1Nothing is granted by default, so the connection is refused. The summary names what was blocked and the rule that would allow it; every request and decision is in the run’s log.
2. Find out what it wanted
Section titled “2. Find out what it wanted”wardcell policy draft -- curl -sS https://example.comdraft runs the same command in learn mode — every rule still evaluates, but
a refusal is recorded and passed through instead of blocking — then prints a
fragment built from what it observed:
fragment "curl-draft" { schema_version = 1
net { allow_http "example.com" { allow_requests [ "GET /", ] } }}3. Grant it
Section titled “3. Grant it”Save that as a fragment in your policy root, tightening it as you go:
fragment "curl-example" { selects_on = { commands = ["curl"] }
net { allow_http "example.com" { allow_requests ["GET /**"] # narrowed by hand from the observed "GET /" } }}selects_on means this fragment applies whenever the command is curl.
4. Run it again
Section titled “4. Run it again”wardcell run -- curl -sS https://example.com # workswardcell run -- curl -sS https://evil.example # still refusedThe three commands
Section titled “The three commands”wardcell run | run a command under the policy |
wardcell policy draft | run in learn mode, get a fragment back |
wardcell policy explain | show every effective rule and where it came from |
- Policy Model — the rules the language obeys
- Drafting — the full learn loop