Harvv CLI
npx @harvv/cli from any project root. Auto-detects your
stack, creates your account, installs the pixel in the right place.
No signup form, no copy-paste, no manual file edits.
Quickstart
Run it directly with npx — no global install needed:
npx @harvv/cli@latest
The CLI walks you through:
- Detects your project type from package.json / config files (Next.js, Vite, Astro, Shopify CLI, WordPress, Rails, plain static)
- Prompts for your email if you don't have an account yet
- Creates account + site + pixel key on harvv.com
- Injects the pixel into the correct file for your stack
(e.g.
app/layout.tsxfor Next.js,src/app.htmlfor SvelteKit,index.htmlfor Vite) - Prints the dashboard URL for your new site
Non-interactive
For CI / Docker entrypoints / config-as-code workflows, skip the prompts by passing flags:
npx @harvv/cli@latest --key d1db1759f22827e4
If you already have your site key, this writes the pixel snippet without contacting the API. Useful for ephemeral previews where you don't want a new site per branch.
Global install (optional)
If you'll use it across many projects:
npm install -g @harvv/cli
harvv
Subcommands
harvv
Default — install the pixel in the current project. Same as
harvv install.
harvv issues
Lists active issues for your site, sorted by impact. Needs an API key:
npx @harvv/cli issues --api-key hv_live_xxx
Or set HARVV_API_KEY in your shell:
export HARVV_API_KEY=hv_live_xxx
npx @harvv/cli issues
What it detects
The CLI looks for project signals in this order:
package.jsondependencies:next,react,vue,svelte,astro,vite,@shopify/cli,nuxt,remix- Config files:
next.config.js,astro.config.mjs,nuxt.config.ts,shopify.theme.toml - WordPress:
wp-config.php - Rails:
config/application.rb - Plain HTML: looks for
index.htmlwith a<head>
For each, the CLI knows where to inject the pixel snippet so it loads on every page. If detection fails, it falls back to printing the snippet and asking you to paste it in your layout file.
What gets sent to Harvv
- Your email (only if you don't have an account)
- Your project directory name (used as the site name on signup; you can rename later)
- The project type the CLI detected (for our own metrics on which integrations matter)
That's the whole thing. No code, no env vars, no source files. The CLI source is auditable — github.com/AxiomState/harvv-cli.