Download files from a site that needs a login, from a script or agent
Clicking a download button only proves the browser accepted the click; it does not prove the file finished writing or contains the right data. In a remote browser setup, the file can also land on the browser host instead of the machine running your script. Check three things separately: the click, the download completion status, and the saved file on disk.
Use this pattern only with your own accounts on sites whose terms permit automated access. Do not use Grip (gripui) to scrape restricted portals or bypass access controls on sites that forbid automation. In our live check below, Grip ran headlessly against https://example.com; no real site sign-in, file download, or remote transfer was executed in this run.
Install and activate Grip using the download instructions (gripui license activate <your-key>, checked with gripui license status). Browser actions require an active paid licence with no free tier, and commands stop if a licence ends or becomes invalid: Solo Dev ($79/year, 1 developer, up to 2 local machines excluding CI), Pro Runner ($499/year, headless, CI, multi-machine, and production workflows on up to 3 machines or CI runners), and Platform (starts at $10k/year for redistribution, bundling, or external user access). Subscriptions renew annually with a 2-day refund window and refresh a signed lease with gripui.com every 5 hours; see the pricing page for details. Where a service already offers an export API, prefer that API over browser-driven downloads.
Verify your disposable profile first
Before pointing an agent at a real export workflow, confirm that Grip launches, reads a page, and reports clean status on a disposable profile. On macOS with Grip 6.5.1, these commands ran one at a time against Example Domain and removed the temporary profile on quit:
gripui @grip-review02-20261204 set temporary
gripui @grip-review02-20261204 set headless
gripui @grip-review02-20261204 go https://example.com
gripui @grip-review02-20261204 hud
gripui @grip-review02-20261204 status
gripui quit --profile grip-review02-20261204
Synchronous go completed in 1.34 seconds wall time including browser startup and network, and hud took 0.25 seconds (Example Domain, [1] click link:"Learn more"). Any one-shot command still running after 2 seconds returns a background handle instead, which you inspect with gripui handle (or block with GRIPUI_SYNC=1). The status call returned ok: status with headless=on, temporary=on, and live=connected https://example.com/, and quit deleted the temporary profile directory.
Authenticate your own session and inspect the page
For a real recurring export on a site that permits automation, replace temporary mode with a dedicated persistent profile (gripui attach <name>). Keep that profile limited to the accounts needed for the report. A profile isolates browser cookies and storage; it is not a sandbox around a shell-capable coding agent.
When the site asks for a password, multi-factor prompt, or verification challenge, let the authorized account holder sign in directly. Grip's handoff guide shows the flow: gripui human-drives opens the session for the person, and gripui agent-drives hands control back afterwards. Because restarting into a visible window can drop unsaved form state, authenticate before selecting filters or long forms.
Once control returns, run gripui hud to inspect the current sheet. Confirm the signed-in account, report name, and date range before clicking anything. Refresh the HUD after each page change, and use the context= detail when multiple rows share a button label like Download. Note that a hud call can exit nonzero while printing an updated sheet after page actions change, so inspect the output text rather than relying on exit status alone.
Click, then verify download completion and file bytes
Grip tracks Chromium CDP download lifecycle events (Browser.downloadWillBegin and Browser.downloadProgress) for up to the 8 most recent downloads without blocking page actions. When a download updates, gripui status surfaces a summary formatted as download <filename>: <state> <receivedBytes> bytes, on the browser's machine at <filePath> once the path is known. That tells you whether the browser saw the transfer finish (completed vs inProgress or canceled), how many bytes arrived, and where the browser saved it.
The parameterized template below shows the persistent-profile download and verification loop (<name>, <your-report-url>, and <ref-or-label> are placeholders to substitute from your own authorized session; this sequence was not executed against a live download here):
gripui attach <name>
gripui go <your-report-url>
gripui human-drives
gripui agent-drives
gripui hud
gripui click <ref-or-label>
gripui status
Once gripui status reports completed and gives the path on the browser's machine, inspect the actual file before accepting it. A server can return an expired-session HTML page or a truncated body with a valid .csv filename. Verify the byte count, check the SHA-256 digest with shasum -a 256 <reported-path> if the publisher provides a checksum, and inspect the first lines (for example head -n 5 <reported-path>) to confirm the expected columns and period. For a recorded demonstration of catching a truncated file and a stalled download, see the three-downloads walkthrough.
Do not treat a click receipt as a finished export, and do not blindly retry clicking when a report builds asynchronously. Re-clicking can trigger duplicate export jobs on the server. Surface timeouts or missing files to the operator, and isolate runs or output filenames so a stale artifact never masquerades as today's export.
Know which machine owns the file and choose the right tool
In a local session, the path printed by gripui status sits on your local machine. When driving a remote browser, that path sits on the remote browser host, so verify transfer and checksums on the receiving machine as well. Store exported invoices, logs, or customer data in a directory with restricted permissions and avoid printing file contents into shared logs.
When you own the web application or test server and want scripted CI assertions for file downloads, Playwright is the better choice: page.waitForEvent('download') paired with download.saveAs(...) captures the downloaded artifact deterministically inside an isolated test context. Use Grip when the export lives inside a persistent user session or needs a person to complete sign-in before the agent triggers and verifies the download.
If you used a persistent profile, run gripui detach to release your job lock or gripui quit --profile <name> to close the browser while keeping saved logins separate from your downloaded files.
Next: to drive a remote BrowserBox you own, use gripui connect browserbox '<login-link>' --engine with its login link; that remote connection was not tested here. Evaluate BrowserBox and see Grip pricing.