Platform

CLI

A zero-dependency wrapper around the REST API. It exists mostly so an agent can drive the product without you writing an HTTP client first.

Install#

npm install -g rankli-cli
rankli-cli --version

Node 18 or newer. No dependencies, so the install is one small tarball.

Authenticating#

  1. Create a key in the app under Settings → API keys. Copy it — it is shown once.
  2. Hand it to the CLI: rankli-cli auth login prompts for the key and writes it to ~/.rankli/config.json with owner-only permissions.
  3. Check it: rankli-cli auth whoami.

Three places a key can come from, highest priority first:

SourceUse it when
--api-key rk_live_…One-off, or switching accounts inside a script.
RANKLI_API_KEYCI, containers, and anything an agent runs.
~/.rankli/config.jsonYour own machine, written by `auth login`.
rankli-cli auth login          # prompts, then stores
rankli-cli auth status         # where the key is coming from, and whether it works
rankli-cli auth whoami         # account, plan, credits remaining

auth status prints the key’s prefix and its source, never the key. If you need the whole thing, read the config file yourself — a CLI that echoes secrets ends up echoing them into a CI log.

Commands#

Products

rankli-cli products list
rankli-cli products create --domain acme.com --name "Acme"
rankli-cli products pause  <productId>
rankli-cli products resume <productId>

products create reads the site, researches keywords and queues a 30-day plan — the same three stages onboarding runs, so it takes a minute or two to settle.

Keywords

rankli-cli keywords list --product <productId>
rankli-cli keywords generate --product <productId> --count 40
rankli-cli keywords update <keywordId> --scheduled-for 2026-10-14

keywords list prints volume and difficulty as when nothing measured them. With --json they are null. They are never 0.

Articles

rankli-cli articles list --product <productId> --status drafted
rankli-cli articles get <articleId>
rankli-cli articles get-content <articleId> --format markdown > post.md
rankli-cli articles precreate <keywordId>       # write a future one now
rankli-cli articles generate  <keywordId>       # write one that is due today
rankli-cli articles retry-publish <articleId>

precreate and generate both spend one article from the month’s allowance. The CLI prints the remaining count after each.

Integrations

rankli-cli integrations list --product <productId>
rankli-cli integrations validate --provider wordpress --site https://acme.com --user editor --app-password "…"
rankli-cli integrations create   --product <productId> --provider wordpress --site https://acme.com …
rankli-cli integrations test <integrationId>

validate checks credentials without saving anything; create saves and then runs the same check; test re-runs it against a saved connection. All three answer the two questions separately: do the credentials authenticate, and may they actually create a post.

Usage

rankli-cli usage stats
rankli-cli subscription status

Machine-readable output#

--json on any command prints the raw API response and nothing else — no spinner, no table, no colour. That is the mode to give an agent or a script.

rankli-cli articles list --product prd_123 --status drafted --json \
  | jq '.articles[] | select(.check_score < 70) | .id'

Exit codes: 0 success, 1 a request failed, 2 the arguments were wrong, 3 not authenticated.

Pointing it somewhere else#

--base-url, or RANKLI_BASE_URL, overrides the API host. The default is https://rankbotic.vercel.app/api/v1.

RANKLI_BASE_URL=https://staging.example.com/api/v1 rankli-cli auth whoami