Your first run
One command records a small sample shop on your computer and replays it, so you see a changed response get caught. Then you do the same with your own app.
Run the sample
Open Terminal on Mac or Linux, or PowerShell on Windows. The command is the same everywhere. Install Crumbtrail first if crumbtrail is not found.
crumbtrail try
Crumbtrail starts a small shop, records three requests to it and replays them. It then changes the shop's price and replays again, so you see both verdicts.
3. Replayed those 3 requests against the same shop. Replay verdict: ...replay-result.json (pass). 3 of 3 recorded requests matched. Result: PASS. Every answer matched what was recorded. 4. Changed the shop's price from 4 to 5 and replayed the same requests. Result: DIFFERENT. Replay found the change, so a real change to your app shows up the same way.
Done when you see PASS and then DIFFERENT.
Record your own app
Start your app as usual on this computer. If it listens on port 8080, run this in another window. Replace 8080 with your app's port.
crumbtrail record --target-port 8080 --output ./recording
It prints a web address such as http://127.0.0.1:63038. Use your app through that address instead of its own. Press Ctrl+C when you are done. Crumbtrail saves the recording and prints Saved ./recording.
Replay and read the verdict
Run the recorded requests against your app again, for example after you change its code.
crumbtrail trials run --input ./recording --target http://127.0.0.1:8080 --output ./replay
pass means every response came back the same as in the recording. new-mismatch means a response changed, and every changed response is listed. Free shows the change and exits 0. Stopping a build when a response changes is in Team.
See the recording
Open the console in your browser. The Recordings page lists recording and shows each call.
crumbtrail desk serve --input .
Press Ctrl+C in that window when you are done.
Questions
Which systems and databases does Free support?
Run crumbtrail support to see the list, or open Protocols and versions.
How do I record a database?
Add a route and point your app at the address it prints.
crumbtrail record --route 0=postgres://127.0.0.1:5432 --output ./recording
How do I record my app's calls to other services?
Add --egress-port 0 to the record command and point your app's outgoing web requests at the Outgoing proxy address it prints. Later, respond to those calls from the recording:
crumbtrail replies serve --input ./recording --egress-port 8090
Where are my recordings saved?
Where you say: --output ./recording saves to that folder. Without --output, they go in a .crumbtrail folder inside the folder you ran the command in.
How do I connect a coding agent on this computer?
Run crumbtrail assistants setup --all in your project folder, then run local checks with crumbtrail check. The first three saved checks never expire. Every change is listed with exit 0, and failing CI on a changed response is in Team.