| name | cli-reference |
| description | Use when you need to inspect, test, validate, or audit UI (web or native) via IBR CLI. Reference for scan, sessions, native testing, design memory commands. |
| user_invocable | true |
IBR CLI Reference
Use these commands via Bash. IBR runs in the project directory — all state is stored in .ibr/.
Quick Reference
| Command | Purpose |
|---|
npx ibr scan <url> | Scan page: elements, handlers, a11y, console errors |
npx ibr scan <url> --json | Same but structured JSON (for programmatic use) |
npx ibr audit <url> | Full audit: functional + visual + semantic |
npx ibr start <url> | Capture baseline screenshot |
npx ibr check | Compare current state vs baseline |
npx ibr auto | Zero-config: detect server, scan all pages |
Page Scanning
npx ibr scan http://localhost:3000
npx ibr scan http://localhost:3000 --json
npx ibr audit http://localhost:3000
npx ibr discover http://localhost:3000
npx ibr consistency http://localhost:3000
npx ibr diagnose http://localhost:3000
Scan output includes:
- Page intent (auth, form, listing, detail, dashboard, error, landing)
- All interactive elements with handler wiring
- Accessibility audit (roles, labels, touch targets)
- Console errors and warnings
- Verdict: PASS / ISSUES / FAIL
Baseline & Comparison
npx ibr start http://localhost:3000
npx ibr start http://localhost:3000 --name "feature-x"
npx ibr check
npx ibr check sess_abc123
npx ibr list
npx ibr list --format json
npx ibr status
npx ibr update sess_abc123
npx ibr delete sess_abc123
npx ibr clean
npx ibr clean --older-than 7d
Comparison verdicts:
MATCH — no visual changes detected
EXPECTED_CHANGE — changes within threshold
UNEXPECTED_CHANGE — visual differences found
LAYOUT_BROKEN — significant structural changes
Interactive Sessions
For multi-step flows (forms, login, navigation). Browser persists across commands.
npx ibr session:start http://localhost:3000
npx ibr session:start http://localhost:3000 --name "login-test"
npx ibr session:click live_abc123 "button.submit"
npx ibr session:type live_abc123 "input[name=email]" "user@example.com"
npx ibr session:press live_abc123 Enter
npx ibr session:scroll live_abc123 down 500
npx ibr session:wait live_abc123 ".results"
npx ibr session:wait live_abc123 2000
npx ibr session:navigate live_abc123 http://localhost:3000/dashboard
npx ibr session:screenshot live_abc123
npx ibr session:scan live_abc123
npx ibr session:capture live_abc123
npx ibr session:html live_abc123
npx ibr session:text live_abc123 "h1"
npx ibr session:eval live_abc123 "document.title"
npx ibr session:actions live_abc123
npx ibr session:modal live_abc123
npx ibr session:modal live_abc123 --dismiss
npx ibr session:list
npx ibr session:pending
npx ibr session:close live_abc123
npx ibr session:close all
Session workflow example:
npx ibr session:start http://localhost:3000/login --name "login-flow"
npx ibr session:type live_xyz789 "#email" "test@example.com"
npx ibr session:type live_xyz789 "#password" "password123"
npx ibr session:click live_xyz789 "button[type=submit]"
npx ibr session:wait live_xyz789 ".dashboard"
npx ibr session:screenshot live_xyz789
npx ibr session:scan live_xyz789
npx ibr session:close live_xyz789
Native Apps (iOS/watchOS/macOS)
npx ibr native:devices
npx ibr native:devices --platform ios
npx ibr native:devices --platform watchos
npx ibr native:scan
npx ibr native:scan "iPhone 16 Pro"
npx ibr native:start
npx ibr native:start --name "home-screen"
npx ibr native:check
npx ibr scan:macos
npx ibr scan:macos --app "Local Smartz"
Design Memory
Persistent UI/UX preferences the agent can reference across sessions.
npx ibr memory add "Primary button uses gradient teal-to-indigo"
npx ibr memory list
npx ibr memory show mem_abc123
npx ibr memory remove mem_abc123
npx ibr memory summary
npx ibr memory learned
npx ibr memory promote learn_abc123
Scan-While-Building
Continuous validation during development. Captures baselines for all discovered pages, then checks for regressions.
npx ibr scan-start http://localhost:3000
npx ibr scan-check
Screenshots
npx ibr screenshots:list
npx ibr screenshots:list sess_abc123
npx ibr screenshots:cleanup
npx ibr screenshots:cleanup --older-than 30d
npx ibr screenshots:view .ibr/screenshots/abc.png
Search Testing
AI-powered search testing with validation context.
npx ibr search-test http://localhost:3000
npx ibr search-test http://localhost:3000 --query "login"
Configuration & Setup
npx ibr init
npx ibr init --register-plugin
npx ibr login http://localhost:3000
npx ibr logout
npx ibr serve
npx ibr serve --port 4300
Global Options
All commands accept these:
--viewport <name> — desktop (default), mobile, tablet
--output <dir> — output directory (default: .ibr/)
--threshold <percent> — diff threshold (default: 1.0)
--json — JSON output (where supported)
--format <type> — text (default), json, minimal
Common Workflows
Validate after editing UI
npx ibr scan http://localhost:3000/page-i-edited
Regression check before shipping
npx ibr start http://localhost:3000
npx ibr check
Test a form flow
npx ibr session:start http://localhost:3000/form --name "form-test"
npx ibr session:type live_XYZ "input[name=email]" "test@test.com"
npx ibr session:click live_XYZ "button[type=submit]"
npx ibr session:wait live_XYZ ".success-message"
npx ibr session:screenshot live_XYZ
npx ibr session:close live_XYZ
Full audit before release
npx ibr audit http://localhost:3000