Take screenshots of pages behind your login from the command line

A dashboard screenshot requires the browser session that holds that dashboard's cookies. Fetching the same URL with curl or a separate HTTP client does not carry your signed-in browser state, and an image of a login screen is not evidence that the private view loaded. Grip (gripui) drives a real Chromium or Firefox session from the terminal and writes a PNG of the current tab with gripui snap [path].

Use this workflow only with your own accounts on sites whose terms permit automated access. Do not use Grip to scrape data or bypass access controls on sites that forbid automation. In this guide, only the disposable headless run against https://example.com was executed live; the persistent-profile and human-handoff sequence below is a parameterized template and did not run against a live login, two-factor prompt, or CAPTCHA.

Grip 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) covers one developer for local work on up to 2 machines (excluding CI runners); Pro Runner ($499/year) covers headless, CI, multi-machine, and production workflows on up to 3 machines or CI runners; Platform (from $10k/year) covers redistribution, bundling, or external user access. Subscriptions renew annually with a 2-day refund window, and Grip refreshes a signed lease with gripui.com every 5 hours. Install and activate using the download instructions (gripui license activate <your-key>, checked with gripui license status), or compare plans on the pricing page.

Capture a public page first

On a macOS test host running Grip 6.5.1, these commands created a disposable profile, switched it to headless mode before loading a page, inspected Example Domain, and saved a screenshot. When you omit the file path, gripui snap [path] writes screenshot.png in the working directory; passing an explicit path lets each check write its own artifact. A temporary profile is deleted on gripui quit, so never use set temporary for a login you intend to keep.

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 snap /tmp/grip-review02-public.png

On that single run, synchronous go finished in 1.34 seconds wall time including browser startup and network, and the following hud took 0.25 seconds. Those numbers are single-run observations on one public page, not a performance guarantee or an estimate of an authenticated app's render time. Any one-shot command still running after 2 seconds returns a background handle instead, which you inspect with gripui handle (or block by setting GRIPUI_SYNC=1). A hud call can also exit nonzero when the page's action sheet changes while still printing the new refs, so read the output rather than checking the exit code alone.

The hud output listed Example Domain (https://example.com/) with one action ([1] click link:"Learn more"). The snap receipt reported 190673bytes, image=2560x1714px, viewport=1280x857css, and scale=2.00, which file independently confirmed as 2560 x 1714 PNG image data. Those dimensions come from the test host's display scale and default window, not fixed Grip constants.

Bring your own authorized login to the session

For a site you own or an account of your own on a service whose terms allow browser automation, create a dedicated persistent profile instead of using temporary mode. Bind the profile to your project with gripui attach <name> so subsequent commands in that directory share the same session, and keep that profile restricted to the accounts the job requires. A profile stores cookies and browser data; it is not a sandbox for a shell-capable agent, and it never overrides a site's terms or access controls.

Let a person enter credentials, two-factor codes, or verification challenges directly in the browser rather than putting secrets into an agent prompt. Grip's human handoff guide documents that transfer: from a headless session, gripui human-drives normally restarts the browser visibly so the person can sign in, and gripui agent-drives returns control afterwards. Restoring tabs after a restart can drop unsaved form state, so complete authentication before editing anything important.

The parameterized sequence below illustrates that persistent-profile capture flow (<name>, <your-page-url>, and <output.png> are placeholders, not an executed live login):

gripui attach <name>
gripui go <your-page-url>
gripui human-drives
gripui agent-drives
gripui hud
gripui snap <output.png>
gripui detach

Inspect the hud output right after agent-drives before calling snap. If the HUD shows a login redirect, an access-denied screen, or an expired session, stop and hand control back to the authorized person. Never treat a saved PNG as proof of a private report when the page returned a sign-in gate.

Make the image useful and choose the right tool

Decide what the screenshot must verify before capturing it. A page title alone confirms the route, not that asynchronous charts, tables, or date filters finished rendering. Check the visible text or gripui read output for the expected report header and date range before writing the image.

Remember that snap captures the rendered viewport rather than the full scrollable document. For a narrow mobile layout, gripui viewport can emulate a phone-sized CSS viewport with a chosen device scale factor (scale=2.00 or 3.00 means each CSS pixel spans two or three image pixels on each axis). Viewport emulation in Grip is Chromium-only and does not change the user agent, so test real phones when native browser behavior matters.

Write screenshots into a restricted directory with an explicit retention rule. Private dashboards can expose customer records, internal URLs, or displayed tokens inside pixels. Do not commit captured images to a repository or print sensitive text into shared logs.

When you own the application and want repeatable visual regression checks in CI, Playwright is the better choice: expect(page).toHaveScreenshot() compares against baseline snapshots, storageState fixtures reuse authenticated test contexts, and npx playwright test runs across Chromium, Firefox, and WebKit. Use Grip when you need an ad-hoc terminal capture from a live or human-handed-off browser session without maintaining a test project. For a site that already exposes an official export API, prefer the API when you need structured data rather than pixels.

Close the disposable session

gripui quit --profile grip-review02-20261204

On the test run, quit stopped the daemon and deleted the temporary grip-review02-20261204 profile directory. A persistent profile keeps its cookies and storage after gripui quit, so assign clear ownership and delete or sign out of the profile when the job ends.

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.

Your agent. Your browser.

Put it to work.

Get started

macOS · Linux · Windows
Paid licence required. Bring your own AI agent.

Demo recording

Player unavailable? Watch on YouTube ↗