Command Reference
All 17 commands available through the DevSnoop HTTP API. Send JSON to localhost:9400 and get structured results back.
Base Request
Every command is a POST request to the same endpoint. Use tabID to target a specific tab (recommended), or omit it to use the active tab.
bash
curl -s -X POST http://127.0.0.1:9400/ \
-H 'Content-Type: application/json' \
-d '{"command":"<command>","params":{...},"tabID":<optional>}'Tab Management
Page Inspection
Page Interactions
Debugging
Change Detection
Health Check
Workflows
Common multi-step patterns.
Inspect a page you're building
bash
# 1. Find the tab
curl -s -X POST http://127.0.0.1:9400/ \
-d '{"command":"list_tabs","params":{}}'
# 2. Get page structure (use tabID from step 1)
curl -s -X POST http://127.0.0.1:9400/ \
-d '{"command":"page_summary","params":{},"tabID":123}'
# 3. Check for errors
curl -s -X POST http://127.0.0.1:9400/ \
-d '{"command":"get_logs","params":{"level":"error"},"tabID":123}'Test a form interaction
bash
# 1. Find the input
curl -s -X POST http://127.0.0.1:9400/ \
-d '{"command":"find","params":{"selector":"input"},"tabID":123}'
# 2. Fill it
curl -s -X POST http://127.0.0.1:9400/ \
-d '{"command":"fill","params":{"selector":"#email","value":"test@test.com"},"tabID":123}'
# 3. Submit
curl -s -X POST http://127.0.0.1:9400/ \
-d '{"command":"click","params":{"selector":"button[type=submit]"},"tabID":123}'
# 4. Check for errors
curl -s -X POST http://127.0.0.1:9400/ \
-d '{"command":"get_logs","params":{"level":"error"},"tabID":123}'Verify visual changes after code edits
bash
# 1. Take baseline snapshot
curl -s -X POST http://127.0.0.1:9400/ \
-d '{"command":"diff","params":{},"tabID":123}'
# 2. Make code changes — page hot-reloads
# 3. Compare against baseline
curl -s -X POST http://127.0.0.1:9400/ \
-d '{"command":"diff","params":{},"tabID":123}'Tips
- - Always use
tabIDwhen you know it — avoids depending on which tab is focused. - -
page_summaryis your starting point — it gives you selectors you can pass directly toclick,fill,inspect_element, etc. - - Responses are intentionally compact and token-efficient. No raw HTML — just structured data.
- -
get_logsandget_networkauto-attach the debugger on first call. Logs are buffered (200 entries max), so call early if you need to capture events. - -
diffis useful after hot-reload — take a baseline, make changes, then compare. - - When you get a "Permission needed" error, the user needs to click the DevSnoop extension icon and grant access for that site. One-time per origin.