check
Check a deployed or localhost URL in a real browser and read the verdict.
check
monito check <url> "<expectation>" --json
monito check https://preview.example.com/signup "The form rejects a malformed email" --project <projectId> --jsonA check runs once without adding a saved test. It waits for the verdict by default. JSON includes checkId, projectId, runId, done, status, cause, causeLabel, durationMs, creditsCharged, reportUrl and firstFailure. Human output goes to stderr. Exit 0 means passed; 1 means failed or error. An error is not a product verdict.
For deployed URLs, --no-wait returns the IDs immediately. --timeout <ms> sets the wait limit (default 600000). A wait timeout exits 6 and retains the run ID; resume a deployed check with monito run wait <runId> --json.
Use --request-id <id> to retry an uncertain launch response without creating another run. A fresh invocation generates a new ID and launches a new check. --project <id> keeps checks in an existing project.
Check localhost
Start your dev server, then check its URL or give the start port:
monito check http://localhost:3000/cart "The cart shows the added item" --timeout 600000 --json
monito check --local 3000 "The home page loads" --json
monito check --local 3000 --local 4000 "The page loads data from the API" --jsonlocalhost, 127.0.0.1, [::1] and names ending in .localhost imply a local check. Repeat --local for up to three distinct ports; the first is the start port when no URL is supplied. Ports must be from 1024 through 65535. Local checks use HTTP; local HTTPS is not supported. Use --project <projectId> to keep them in your app's project, under its local (tunnel) environment.
Before creating a run, Monito sends a GET to the start path on 127.0.0.1, then tries ::1 if the connection is refused. This warms a dev-server compile. Any HTTP response, including a 500, allows the check to start. If neither address is listening, it stops with “Nothing is listening on localhost:3000. Start your dev server and retry.” No run is created and no credits are spent.
Keep the CLI process and dev server running until the verdict. Avoid editing files during the check: hot reload can change the page being tested. --no-wait is unavailable for local checks. Set the agent's command timeout long enough for the check as well as using --timeout 600000. If the CLI wait times out (exit 6), the tunnel closes when the process exits and the run ends as “tunnel closed”; monito run wait can read that ending, but cannot restore the tunnel.
The local stdio MCP server (monito mcp) also accepts loopback URLs in check, with an optional localPorts: [3000, 4000]. Keep the server process running. Its tunnel stays alive after a tool call's wait limit; use wait_for_run to resume. Hosted MCP cannot reach localhost; use the local server for these checks.
| Ending | Cause and billing |
|---|---|
| Nothing listening before launch | No run, no charge. |
| Tunnel never connects | agent_not_started, “Check didn’t start — not charged”. The server waits up to 60 seconds. |
| Tunnel closes after the agent starts | site_unreachable, “Site unreachable or access blocked”. Charged for the run; the error explains that the tunnel closed. |
| Monito's tunnel agent fails | monito_error, “Monito's error — not charged”. |
Saved logins are not available for local checks yet. Use an app with seeded or dev auto-login when authentication is needed. Dev builds may show source paths and stack traces in evidence. --verbose prints each request's method, path without its query, status and duration to stderr. The tunnel token stays in memory and is omitted from JSON and logs.
check save
monito check save <checkId> --name "Signup validation" --jsonSaving keeps the check's history and makes it a reusable test. It does not create a schedule. Local environments require a live tunnel and cannot be used for background monitoring; choose a deployed environment for that.