CLI

Query RevKlik analytics from your terminal with the revklik command: sites, overview, pages, referrers, revenue, journeys, Search Console and API tokens.

The revklik command wraps the REST API, so you can read analytics without opening the dashboard or script it in CI.

Install

The CLI needs Node.js 22 or newer.

npm install -g @revklik/cli
revklik --version

Log in

Create an account token (rvt_) under Share → API tokens (see share and access) with at least the sites:read and analytics:read scopes, then:

revklik login --token rvt_YOUR_TOKEN

The CLI checks the token against whoami and saves it to ~/.config/revklik/config.json. Without --token, revklik login asks you to paste one. Site tokens (rv_) are accepted too, but revklik gsc needs an account token.

revklik whoami

prints your user, plan, token type, scopes and, for a site token, the bound site.

Commands

CommandDoes
revklik loginSave an API token
revklik whoamiShow the active token, plan and scopes
revklik sites listList your sites
revklik analytics overviewPageviews, visitors, sessions, bounce rate, revenue, conversions
revklik analytics timeseriesPageviews and visitors per day
revklik analytics pagesTop pages
revklik analytics referrersTraffic sources
revklik analytics geoCountry, region and city
revklik analytics devicesDevice, OS and browser breakdowns
revklik analytics revenueRevenue by source and by country
revklik analytics eventsRaw event log
revklik analytics journeysVisitor journey summaries
revklik gsc queriesStored Google Search Console queries
revklik gsc syncPull the last 7 days from Search Console
revklik tokens listList API tokens
revklik tokens createCreate a token
revklik tokens revoke <id>Revoke a token

Every analytics and gsc command needs -s, --site <site>. Pass a site ID, a unique ID prefix, or the exact domain:

revklik sites list
revklik analytics overview --site mysite.com --range 7d

-r, --range accepts 24h, 7d, 30d or 90d and defaults to 7d.

Currency in the terminal

Tables print revenue with a $ prefix whatever your site’s currency is. The numbers are in the site’s own currency; use the API to get the currency field.

Events

revklik analytics events --site mysite.com --type conversion --range 30d --limit 100
FlagDescriptionDefault
-t, --typepageview, conversion, custom or allall
-l, --limitMaximum events (up to 10000)50

Journeys

revklik analytics journeys --site mysite.com --sort revenue --limit 10 --range 30d
FlagDescriptionDefault
--sortsteps, revenue, source, device or datesteps
-l, --limitMaximum journeys (up to 100)20

Identified visitors are marked with *.

Search Console

Connect Search Console in the dashboard first (see integrations).

revklik gsc sync --site mysite.com
revklik gsc queries --site mysite.com --limit 20

gsc queries aggregates the stored 30-day window. Search Console data arrives with a delay of about two days.

Tokens

revklik tokens create --name "CI" --type account --scopes sites:read,analytics:read
revklik tokens create --name "Blog" --type site --site SITE_ID
revklik tokens revoke TOKEN_ID

--site is required for site tokens. Without --scopes the token gets the type’s default scopes (see REST API scopes). The full token is printed once.

JSON output

--json prints raw JSON for analytics events and analytics journeys:

revklik analytics events --site mysite.com --json --limit 100
revklik analytics journeys --site mysite.com --json --limit 5

The same flag on gsc queries also prints JSON. Other commands print tables only; for JSON from them, call the REST API with curl and pipe to jq:

curl -s "https://app.revklik.com/api/v1/analytics/overview?site_id=SITE_ID&range=7d" \
  -H "Authorization: Bearer $REVKLIK_TOKEN" | jq .data.bounceRate

--verbose prints the API base and the first characters of the token before the command runs.

Configuration

VariableDescriptionDefault
REVKLIK_TOKENAPI token; overrides the saved onenone
REVKLIK_API_BASEAPI base URL, for self-hosted installshttps://app.revklik.com/api

Saved settings live in ~/.config/revklik/config.json:

{
	"token": "rvt_...",
	"apiBase": "https://app.revklik.com/api"
}

Run revklik login again to replace the token.

CI example

# GitHub Actions
env:
  REVKLIK_TOKEN: ${{ secrets.REVKLIK_API_TOKEN }}
steps:
  - run: npx @revklik/cli analytics overview --site mysite.com --range 24h