Set up frontend error tracking from your terminal
Errors that happen in a user’s browser stay in the browser. They never make it back to your logs, so you hear about them from a complaint, late, or not at all.
You can close that gap without ever opening a browser. This guide runs the whole loop from the shell: start a trial, drop in the tracker, and read your errors with the CLI. It is the terminal-first twin of the dashboard walkthrough, same outcome, no browser.
The setup
Step 1: Install the CLI and start a trial
Install the CLI from npm:
npm install -g vantmetry-cli@latest
Then start a trial. No account, no signup form. vant trial provisions an anonymous project, starts your 14-day trial, and prints everything you need: your public key, a ready-to-paste tracker snippet, and a secret key for the CLI itself:
$ vant trial
Provisioning project...
Project provisioned!
Project ID: a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d
Public key: vpk_your_public_key
Secret key: vsk_your_secret_key
(saved to ~/.vantmetry/config.json, will not be shown again)
Plan: trial
Tracker snippet:
<script src="https://cdn.vantmetry.com/tracker.js" data-vantmetry-key="vpk_your_public_key"></script>
Active project set to "new-project". Run vant recent to query logs.
Trial expires in 14 days. Run vant claim <email> to link this project to your account.
The public key (vpk_) is browser-safe and can only send logs. The secret key (vsk_) can read your data, so keep it private. It is what the CLI uses to query your errors. Run vant claim you@example.com whenever you want to attach the project to an account, or start with vant register you@example.com instead if you would rather create one up front.
Step 2: Add the tracker to your site
The tracker is a small script you can read in full on npm, so you can see exactly what runs in your users’ browsers. It also scrubs sensitive data, things like auth tokens, emails, and anything that looks like a password or secret, before any of it leaves the browser.
It is a single script tag that belongs in your page <head>. Use the snippet vant trial printed:
<script src="https://cdn.vantmetry.com/tracker.js" data-vantmetry-key="vpk_your_public_key"></script>
Once it is in place, the script initializes itself the moment the page loads and starts capturing uncaught errors, unhandled promise rejections, and console.error. On a React app, install the package and wrap your root instead, which the dashboard guide covers in Option B: React.
Step 3: Trigger a test error
First put something there to find. Force a quick crash by reading a property off data that turned out to be null, somewhere that runs on the page:
const user = JSON.parse('null');
console.log(user.name); // Cannot read properties of null
Load the page once so the tracker catches it and sends it on.
Step 4: Read your errors from the terminal
With an error captured, ask the CLI what happened. vant errors groups by fingerprint and orders by how often each one fired, which is usually what you want first:
$ vant errors
FINGERPRINT SEVERITY MESSAGE COUNT LAST_SEEN
4d9b1f0a7c22 ERROR Uncaught TypeError: Cannot read properties of null… 3 30s ago
1a6e2c70f3b5 ERROR Uncaught ReferenceError: analytics is not defined 2 9m ago
90c4d7e2a8f1 ERROR This is an unhandled promise rejection 1 22m ago
The MESSAGE column is truncated to fit the terminal width. For the full trace, open the issue in the dashboard. vant recent shows the raw latest events instead (timestamp, severity, message, trace id), and running vant with no arguments drops you into an interactive prompt where recent, errors, and SQL queries all work. The CLI commands reference has the full set.
If you use an AI agent like Claude Code or Cursor, the same data can reach it. Run vant mcp to connect the CLI over the Model Context Protocol, and it can answer “what just broke” on its own, without you copying anything across. The MCP setup guide walks through each one.
What you did not have to do
No signup form to get started, no backend to run, and no retention to manage: old errors rotate out on their own, which keeps the price fixed even when something spikes. The whole loop is a few commands from the CLI, so you can try it yourself or hand the setup to your AI agent. When you want to keep the project past the trial, vant claim links it to an account from the same terminal, and the dashboard walkthrough shows the full detail you get on each error.
Frequently asked questions
Do I need an account to start?
No. vant trial provisions an anonymous project and starts a 14-day trial with no signup. You can link it to an account later with vant claim.
Where do I get the public key from the terminal?
vant trial prints it for you, along with a ready-to-paste tracker snippet and a secret key for the CLI. There is no need to open the dashboard.
Is the secret key safe to put in scripts?
The secret key can read your logs, so it is for the CLI and server-side use only. Keep it out of client code and out of shared repositories.
Can my AI agent read my errors?
Yes. Connect the CLI to Claude Code or Cursor over MCP, and it can query your live errors and answer what just broke.
Where to go next
You can register, install, and read your errors without leaving the shell. From here, point a webhook at your project so an error spike or downtime reaches you on its own, and skim the CLI commands for the query and output flags worth knowing.