Quickstart
This walk-through uses the demo workspace that recon init --demo writes and the offline sandbox API that recon ui serves. You need no network access and no API of your own. It takes about five minutes.
You need the recon binary on your PATH. See Installation.
1. Create the demo workspace
Section titled “1. Create the demo workspace”mkdir recon-demo && cd recon-demorecon init --demo✓ Initialized Recon workspace at . → Demo collections + mask.toml + host-scoped secret rules written. Run `recon ui --port 8787` to explore live Twin-Run, PII Airlock, and Firewall protection.init --demo writes these files:
| Path | What it is for |
|---|---|
.recon.toml |
Workspace config: name, default_env = "local", collections_dir, environments_dir, mask_config = "mask.toml", flight_db = ".recon/flight.db", the default volatile_paths ($.request_id, $.timestamp, $.trace_id) and an [agent_policy] table. The demo sets require_approval_for_mutations = true. |
.gitignore |
Gets .recon/flight.db*, .recon/secrets.local.toml, .recon/tokens.json and .recon/vault.key appended, each only if not already present. |
collections/campus-demo.http |
Three saved requests: List Students (GET with two assertions), Create Enrollment (POST asserting status == 201) and Stripe Prod Key Leak Check (a POST that deliberately sends a production secret to localhost). |
environments/local.toml |
base_url = "http://127.0.0.1:8787/_sandbox/local", a secret DEV_API_TOKEN allowed only for 127.0.0.1 and localhost, and a secret PROD_STRIPE_KEY allowed only for api.stripe.com. |
environments/staging.toml |
base_url = "http://127.0.0.1:8787/_sandbox/staging" and a staging DEV_API_TOKEN with the same host allow-list. |
mask.toml |
PII Airlock rules: email_domain = "example.edu", date_shift_days = 30, and a [columns] table mapping email, full_name, ssn, phone, student_id and studentId to masking kinds. |
.recon/ |
Empty directory. The Flight Recorder database .recon/flight.db is created here on the first recorded run. |
Plain recon init (without --demo) creates only .recon.toml (with no mask_config), the .gitignore lines, and empty collections/, environments/ and .recon/ directories.
When you run init in the current directory, the workspace name is recon-demo. With --workspace <dir>, it is the last component of <dir>. init overwrites .recon.toml every time you run it, and --demo also overwrites the demo files listed above.
For the file formats, see Configuration (.recon.toml) and .http Request Files.
2. Start the sandbox
Section titled “2. Start the sandbox”The demo environments point at 127.0.0.1:8787, where recon ui serves offline sandbox routes such as /_sandbox/local/v1/students. Start it in a second terminal from the same directory:
recon ui --port 8787Recon UI listening at http://127.0.0.1:8787Open in your browser: http://127.0.0.1:8787http://127.0.0.1:8787The first two lines go to stderr and the bare URL goes to stdout. recon ui does not open a browser itself; open the URL yourself to use the Web Studio. --no-open only drops the “Open in your browser” line. The server binds 127.0.0.1 only and runs until you press Ctrl-C. --port 0 (the default) picks a free port, but then the demo base_url values no longer match.
See Offline Sandboxes for every sandbox route.
3. Send a saved request
Section titled “3. Send a saved request”Back in the first terminal, send a request by its name:
recon send "List Students"GET http://127.0.0.1:8787/_sandbox/local/v1/students 200 0.7ms 669B -> 669B (HTTP/1.1) ✓ status == 200 ✓ jsonpath $.students[0].program == MDiv{"environment":"local","request_id":"req_5c78bf92fb314d029be55ab937fe9156","session_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJzdGFmZl8wMSIsInNjb3BlIjoic2lzOnJlYWQiLCJleHAiOjE4OTM0NTYwMDB9.demo_sig","students":[{"email":"elena.original@westminster.edu","full_name":"Elena Vance-Original","gpa":3.92,"notes":"Advisor note: email elena.original@westminster.edu before Friday","phone":"503-555-0182","program":"MDiv","ssn":"123-45-6789","student_id":"001001"},{"email":"marcus.real@westminster.edu","full_name":"Marcus Realman","gpa":3.74,"notes":"Transfer credits verified","phone":"(503) 555-0199","program":"MA","ssn":"987-65-4321","student_id":"001042"}]}The first line shows the method, final URL, status, total time, bytes on the wire and decoded bytes, and the protocol. Each assertion follows with a check mark or a cross. The raw body comes last. The run is recorded in the Flight Recorder.
4. Send it through the PII Airlock
Section titled “4. Send it through the PII Airlock”Add --airlock to print the masked, AI-safe body instead of the raw one:
recon send "List Students" --airlockGET http://127.0.0.1:8787/_sandbox/local/v1/students 200 1.0ms 669B -> 669B (HTTP/1.1) ✓ status == 200 ✓ jsonpath $.students[0].program == MDiv{ "environment": "local", "request_id": "req_a87829b2e88a4c4c863d06b5fafbec3e", "session_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJzdGFmZl8wMSIsInNjb3BlIjoic2lzOnJlYWQiLCJleHAiOjE4OTM0NTYwMDB9.demo_sig", "students": [ { "email": "micah.vaughn.9383@example.edu", "full_name": "Eli Bennett", "gpa": 3.92, "notes": "Advisor note: email micah.vaughn.9383@example.edu before Friday", "phone": "(555) 190-8612", "program": "MDiv", "ssn": "923-95-3372", "student_id": "007218" },... ]}Names, emails, phones, SSNs and student IDs are replaced with deterministic fake values, and the email inside notes is replaced too. In human mode --airlock changes only the body; the compliance receipt is part of the JSON output (compliance_receipt). How masking works is covered in PII Airlock & Receipts.
5. Watch the firewall block a leak
Section titled “5. Watch the firewall block a leak”The third demo request puts PROD_STRIPE_KEY, which is only allowed for api.stripe.com, into a request to 127.0.0.1:
recon send "Stripe Prod Key Leak Check"error E_FIREWALL_BLOCKED: Blocked secret `PROD_STRIPE_KEY` bound for `api.stripe.com` from being sent to unauthorized host `127.0.0.1`. hint: Switch environment or update secret allowed_hosts.The request never leaves the machine, nothing is recorded, and recon exits with status 1. See Outbound Secret Firewall.
6. Run a Twin-Run
Section titled “6. Run a Twin-Run”Fire the same request at local and staging at once and compare the responses:
recon twin "List Students"Twin-Run: List Students (local vs staging) local: HTTP 200 in 0.5ms | staging: HTTP 200 in 0.4ms (Δ -0.1ms) ! $.environment: "local" -> "staging" ! $.students[0].gpa: 3.92 -> "3.92" ! $.students[0].studentId: ∅ -> "001001" ! $.students[0].student_id: "001001" -> ∅ ! $.students[1].gpa: 3.74 -> "3.74" ! $.students[1].studentId: ∅ -> "001042" ! $.students[1].student_id: "001042" -> ∅The staging sandbox returns gpa as a string and renames student_id to studentId. The changed request_id is not listed because $.request_id is in volatile_paths. See Twin-Run & Diff.
7. Run the whole collection as tests
Section titled “7. Run the whole collection as tests”recon test[PASS] List Students[PASS] Create Enrollment[FAIL] Stripe Prod Key Leak Check2 passed, 1 failedThe firewall drill fails by design, so the exit status is 1. Add --junit or --markdown-summary for CI reports. See Send & Test.
8. Look at the history
Section titled “8. Look at the history”Completed send and test runs are in the Flight Recorder. Firewall-blocked requests and Twin-Runs are not recorded.
recon history01a22d25-38eb-74f0-bccb-19e515085d7f [ci] POST http://127.0.0.1:8787/_sandbox/local/v1/enrollments -> 201 (0.3ms)01a22d25-38e9-77fa-a5bc-510e2b701298 [ci] GET http://127.0.0.1:8787/_sandbox/local/v1/students -> 200 (0.4ms)01a22d25-38d4-73bf-a534-45f82e709ce4 [cli] GET http://127.0.0.1:8787/_sandbox/local/v1/students -> 200 (1.0ms)01a22d25-38c6-7455-b1f4-1ae8eb01f70d [cli] GET http://127.0.0.1:8787/_sandbox/local/v1/students -> 200 (0.7ms)Runs from recon send carry the label cli; runs from recon test carry ci. Pass two run IDs to recon diff to compare them. See Flight Recorder.
Next steps
Section titled “Next steps”- Point Recon at your own API: write requests in .http Request Files or bring them in with Importers.
- Learn the model behind workspaces, environments and runs in Core Concepts.
- Connect an AI coding agent with MCP Server and Setup, Skill & Doctor.
- Gate pull requests with the GitHub Action.