CLI Reference

whatalo dev

Start local development with a live tunnel — your plugin appears in the Whatalo admin sidebar instantly.

Syntax

whatalo dev [options]

Options

FlagShortTypeDefaultDescription
--store <slug>-sstringcachedDev store to connect to
--tunnel-url <url>stringUse your own tunnel URL instead of cloudflared
--no-tunnelbooleanUse localhost directly (no tunnel)
--port <number>-pstringfrom configOverride the local dev port
--resetbooleanForce re-selection of dev store
--verbose-vbooleanShow dev server stdout/stderr
--portal-url <url>stringDeveloper Portal URL

Startup Sequence

When you run whatalo dev, the following steps execute in order:

  1. Read config — Loads whatalo.app.toml from the current directory (required)
  2. Authenticate — Verifies session; runs auto-login if needed
  3. Load manifest — Reads whatalo.app.ts via esbuild to extract your plugin's pages, permissions, and URLs
  4. Select dev store — Uses --store flag → cached store → auto-select → interactive prompt
  5. Start app server — Spawns the command defined in build.dev_command in your whatalo.app.toml; that command must expose the iframe frontend, /api/*, and /webhooks/whatalo on the same local origin
  6. Create tunnel — Downloads and starts cloudflared automatically (unless --tunnel-url or --no-tunnel is set); extracts the *.trycloudflare.com URL
  7. Register dev session — Sends a POST /api/dev-sessions with your manifest and tunnel URL
  8. Show dev console — Prints all URLs and keyboard shortcuts

--portal-url changes which Developer Portal receives the dev-session registration. It does not change the preview host printed by the CLI.

Dev Console

Once running, the console shows:

  Plugin:   My Plugin
  Store:    my-dev-store
  Local:    http://localhost:5173
  Tunnel:   https://xxx.trycloudflare.com

  Press p to open preview, r to restart, q to quit

Keyboard shortcuts (TTY only)

KeyAction
pOpen preview URL in browser
rRestart the dev server
q or Ctrl+CStop everything and clean up

Background Processes

While whatalo dev is running, three background tasks keep the session alive and in sync:

TaskIntervalWhat it does
HeartbeatEvery 30 minutesPATCH /api/dev-sessions/{id} to keep the session alive
Config watcherOn file changeReloads whatalo.app.toml when you save it
Manifest watcherOn file changeReloads whatalo.app.ts and syncs changes to the portal (hot-reload)

Dev Session Details

A temporary plugin installation is created for your dev store with status: 'development'. This makes your plugin visible in the admin sidebar immediately, without going through the review process.

PropertyValue
Session durationUp to 8 hours
Absolute lifetime72 hours
Sidebar visibilityYes (pinned_to_sidebar: true)
Manifest appUrlSet to your tunnel URL automatically
Manifest webhookUrlSet to {tunnelUrl}/webhooks/whatalo automatically

The dev session is removed when you quit whatalo dev, which also removes the plugin from the sidebar.

whatalo dev uses a single-origin development pattern. The tunneled URL serves the iframe frontend and keeps browser requests such as /api/orders and /webhooks/whatalo on that same origin.

Tunnel Modes

cloudflared is downloaded automatically to ~/.whatalo/bin/cloudflared on first use. Supported platforms:

  • macOS (Intel and Apple Silicon)
  • Linux (x86-64 and ARM64)

Custom tunnel (--tunnel-url)

Use your own tunnel provider (ngrok, localtunnel, or any HTTPS URL):

whatalo dev --tunnel-url https://your-tunnel.example.com

No tunnel (--no-tunnel)

Uses localhost directly. The plugin will load in your browser, but the Whatalo admin (running on a different domain) cannot reach your iframe unless both are on the same machine.

whatalo dev --no-tunnel

Examples

Start with a specific dev store:

whatalo dev --store my-store-slug

Use a custom port and show dev server output:

whatalo dev --port 3000 --verbose

Use your own ngrok tunnel:

whatalo dev --tunnel-url https://abcd-1234.ngrok.io

Force re-select the dev store:

whatalo dev --reset

Cleanup on Exit

When you press q or Ctrl+C, whatalo dev performs a clean shutdown in order:

  1. Clears the heartbeat interval
  2. Closes file watchers
  3. Sends DELETE /api/dev-sessions/{id} (removes plugin from sidebar)
  4. Kills the tunnel process
  5. Kills the dev server process

Error Messages

MessageCause
No whatalo.app.toml found. Run 'whatalo init' first.Command run outside a plugin project directory
Port {port} is already in use.Another process is using the configured port
Plugin "{slug}" was not found in your account.The plugin_id in whatalo.app.toml does not match your account
No development stores found. Create one at {link}Your account has no dev stores
Local server did not start. Check your 'build.dev_command' in whatalo.app.tomlDev server did not become ready within 30 seconds
Tunnel failed to start.cloudflared could not establish a connection
Data Bridge returns Insufficient permissions or empty scopesRestart whatalo dev so the development installation re-syncs granted_scopes from your manifest

On this page