@fingerprintiq/cli
v0.1.1
Published
Command-line tool for FingerprintIQ — login, init projects, ping the API, manage keys.
Maintainers
Readme
@fingerprintiq/cli
Command-line companion for FingerprintIQ. Authorize a project, drop a key into your .env, and ping the API — without leaving the terminal.
Install
npm install -g @fingerprintiq/cli
# or run on demand
npx @fingerprintiq/cli loginBoth fingerprintiq and the shorter fiq aliases are installed.
Quick start
fiq login # browser auth, key saved to ~/.config/fingerprintiq/config.json
fiq init # writes FINGERPRINTIQ_API_KEY=… to ./.env
fiq ping # health check against the API
fiq ping iq_abc123 # fetch a visitor record
fiq open dashboard # open the web dashboard
fiq logout # remove saved keyCommands
| Command | What it does |
|---|---|
| login | Browser device-code grant. Saves the minted key locally. --no-open skips opening the browser; --client-name sets the consent label (default fingerprintiq-cli). |
| logout | Deletes ~/.config/fingerprintiq/config.json. |
| whoami | Prints the masked key prefix, source (env vs config), and project. |
| init | Writes FINGERPRINTIQ_API_KEY=… into ./.env (replacing any prior line). Use --env-file path/to/.env to target a different file. |
| ping [visitorId] | No arg: hits /v1/query/schema to confirm the API is reachable. With a visitor ID, prints the visitor JSON. |
| keys list | Opens the dashboard's API Keys page (key management is session-auth-only). |
| open <page> | Opens dashboard, docs, keys, mcp, settings, or home in your browser. |
| version / --version | Prints the CLI version. |
| help / --help | Prints usage. |
Configuration
The CLI reads its key in this order:
FINGERPRINTIQ_API_KEYenvironment variable (highest priority — useful in CI).~/.config/fingerprintiq/config.json(set bylogin).
FINGERPRINTIQ_API_URL overrides the API base (default https://fingerprintiq.com). XDG_CONFIG_HOME overrides the config directory.
Why a CLI?
The dashboard works fine for one-off setup. The CLI exists so:
- AI agents (Claude Code, Cursor, Codex…) can run
fiq logininstead of curl-piping a device-code grant. - Project bootstrap is one command:
fiq login && fiq initputs the key on disk and in your project. - Sanity-checking API reachability from a server / CI box doesn't require finding the key.
License
MIT
