Skip to main content

CLI Reference

Cheat sheet for @verlynk/cli commands, environment variables, exit codes, and common errors.

Quick commands

# Auth
verlynk auth:login --key verlynk_your_key_here
verlynk auth:status
verlynk auth:logout

# Profiles & accounts
verlynk profiles:list
verlynk profiles:use <profile-uuid>
verlynk accounts:list --json

# Posts
verlynk posts:create -c "text" -i "<channel-id>" -d "2026-07-15T09:00:00.000Z"
verlynk posts:create -c "text" -i "<channel-id>" -t publish
verlynk posts:create --json file.json
verlynk posts:list --from 2026-07-01 --to 2026-07-31
verlynk posts:get <post-id>
verlynk posts:update <post-id> -c "Updated" -i "<channel-id>" -d "2026-07-16T09:00:00.000Z"
verlynk posts:retry <post-id>
verlynk posts:delete <post-id> --yes
verlynk validate -t "text"

# Drafts
verlynk posts:drafts --from 2026-07-01 --to 2026-07-31
verlynk drafts:update <draft-id> --json ./draft.json
verlynk drafts:delete <draft-id> --yes

# API keys
verlynk keys:list
verlynk keys:create --name "CI Deploy" --permission read-write
verlynk keys:delete <key-id> --yes

# Analytics & usage
verlynk analytics:post <post-id>
verlynk analytics:best-time -a <channel-id>
verlynk usage

# Help
verlynk --help
verlynk posts:create --help

Environment variables

VariableRequiredDefaultDescription
VERLYNK_API_KEYNo*Public API key (verlynk_...)
VERLYNK_API_URLNohttps://verlynk.com/apiCustom API base URL
VERLYNK_PROFILE_IDNoDefault profile UUID

*Either verlynk auth:login or VERLYNK_API_KEY is required. Stored credentials from auth:login take priority over environment variables.

Exit codes

CodeMeaning
0Success
1Error (Error: ... on stderr), or validate --strict when any platform exceeds its limit

Destructive commands

These require --yes / -y:

  • posts:delete
  • drafts:delete
  • keys:delete
  • profiles:delete
  • accounts:disconnect

Common errors

ErrorSolution
No authentication foundRun verlynk auth:login or set VERLYNK_API_KEY
Profile resolution errorsRun verlynk profiles:list, then profiles:use <id>
API_KEY_SCOPE_DENIEDKey is missing the required scope — create a key with the right --scope / --permission
INVALID_PLAN on analyticsPlan does not include that feature — check verlynk usage

Rate limits

120 requests/minute, burst 30 / 10 seconds. See Rate Limits.