CLI Reference

CLI Overview

Install and authenticate the Whatalo CLI — 14 commands for the full plugin development lifecycle.

Installation

Install the CLI globally with pnpm:

pnpm add -g @whatalo/cli

Or run a single command without a global install:

npx @whatalo/cli whatalo login

Verify the installation:

whatalo --version

Authentication

The CLI uses the RFC 8628 Device Authorization Grant flow. You never type your password into the terminal.

How it works

  1. Run whatalo login
  2. The CLI contacts the Developer Portal and receives a device code
  3. Your browser opens automatically with a verification page
  4. Approve the request in the browser
  5. The CLI polls every 5 seconds until you approve
  6. On success, tokens are saved to ~/.whatalo/session.json

Token lifecycle

TokenTTLBehavior
Access token1 hourAuto-refreshed silently before expiry
Refresh token30 daysSingle-use rotation — a new refresh token is issued on every refresh

Session file permissions are enforced automatically: directory 700, file 600.

Portal URL Resolution

Every command resolves the Developer Portal URL in this priority order:

PrioritySource
1 (highest)--portal-url <url> flag
2WHATALO_DEVELOPER_PORTAL_URL environment variable
3 (default)http://localhost:3002

Configuration Files

FileLocationPurpose
whatalo.app.tomlProject rootProject config — name, slug, build commands, dev port
whatalo.app.tsProject rootPlugin manifest — permissions, URLs, admin pages
~/.whatalo/session.jsonHome directoryAuth tokens (auto-managed, never edit manually)
.whatalo/dev-store.jsonProject rootCached dev store selection

Background Version Check

On every command invocation the CLI checks npm for a newer version of @whatalo/cli. Results are cached for 24 hours at ~/.whatalo/version-check.json. If a newer version is available, a notification is printed to stderr — it never blocks the running command.

All Commands

CommandDescription
whatalo loginAuthenticate via browser Device Flow
whatalo logoutSign out and revoke session
whatalo whoamiShow current developer info
whatalo initCreate a new plugin project interactively
whatalo devStart local development with live tunnel
whatalo deployBuild and deploy a new plugin version
whatalo validateValidate project config and manifest
whatalo logsView and stream webhook delivery logs
whatalo env pullDownload environment variables to .env
whatalo env showDisplay environment variables (read-only)
whatalo webhook triggerSend a test webhook event to your plugin
whatalo infoShow project and environment info
whatalo doctorCheck your development environment
whatalo upgradeCheck for CLI updates

Global Flags

These flags are accepted by every command:

FlagDescription
--portal-url <url>Override the Developer Portal URL
--helpShow command help
--versionShow CLI version

On this page