--- name: wonda-cli description: Using the Wonda CLI to generate images, videos, music, and audio from the terminal — plus LinkedIn, Reddit, and X/Twitter research and automation --- # Wonda CLI Wonda CLI is a content creation toolkit for terminal-based agents. Use it to generate images, videos, music, and audio; edit and compose media; publish to social platforms; and research/automate across LinkedIn, Reddit, and X/Twitter. ## Install If `wonda` is not found on PATH, install it first. The recommended installs are the signed desktop installers (CLI + tray icon + always-on relay, zero extra steps): macOS `brew install --cask degausai/tap/wonda-app` (or the wonda-macos.pkg from releases), Windows winget/wonda-windows-setup.exe. The CLI-only channels below work everywhere and can add the desktop app later with `wonda app install`: ```bash # npm npm i -g @degausai/wonda # Homebrew brew tap degausai/tap && brew install wonda ``` ## Setup - **Auth**: `wonda auth login` (opens browser, recommended) or set `WONDA_API_KEY` env var - **Verify**: `wonda auth check` ### OAuth connector auth Claude web and Cowork connectors use Wonda's OAuth 2.1 flow instead of a CLI API key field. The connector signs in through Wonda in the browser, grants the requested account access, and receives OAuth tokens bound to the Wonda API resource. The server swaps those tokens to the account's internal API key only inside Wonda, so agents and connector hosts never see the `sk_...` key. For the CLI and local stdio MCP path, keep using `wonda auth login` or `WONDA_API_KEY`. ### Claude Cowork local relay Claude Cowork (the desktop app) runs local MCP servers on the host, so it can load the `.mcpb` bundle or a local stdio `wonda-mcp` config directly, WAB writes included (verified 2026-07-07). Claude web cannot. The Wonda local relay is the alternative path: it lets the REMOTE connector (web or Cowork) run actions on the user's own Mac and residential IP without any local MCP config: 1. Open `https://wonda.sh/download` while signed in and install the notarized Mac package. 2. Pair the relay with `wonda relay pair` or the first-run browser handoff. This uses the existing `cli-auth` flow with a relay-scoped `wrelay_...` credential stored in the macOS Keychain. Do not ask the user to paste an API key or device code. 3. Open `https://wonda.sh/setup`, connect LinkedIn, X, and Reddit through the headful local WAB, then approve the Wonda connector once in Claude. The engine policy is `auto | my_machine | cloud`. `auto` uses the local relay when it is online and cloud otherwise. `my_machine` must not silently fall back: if the relay is offline, ask whether to switch to cloud. ### Organizations & spend context Wondercat orgs are shared wallets with their own seats and billing. Members can spend from the org wallet (instead of their personal credits) by switching context: - `wonda organizations list` (aliases: `wonda orgs list`, `wonda org list`) — see every org you belong to with your role and seat plan in each. - `wonda use --org ` — sticky org context for this machine. Sets `X-Wonda-Org` on every request; holds, charges, and `wonda balance` route through the org wallet. - `wonda use --personal` — back to personal. - `wonda usage` — spend-only usage summary (total + per-model + per-project breakdown) for a period (`--month 2026-05`, or `--from`/`--to`; defaults to the current month, UTC). `--project ` restricts the report to one project. In org context it reports org-wide usage including a per-member breakdown — admin/owner role required. Admins can also download a full Excel report from the org page on the web. ### Projects (spend tagging) Projects attribute spend to a named workstream for monitoring. Agents should check the active project at task start (`wonda use` prints it) and set one per task when the operator monitors spend by project: - `wonda use --project ` — sticky: every subsequent charge carries the project (in `wonda usage`, the API, and the org Excel report). `wonda use --no-project` stops tagging; switching org/personal context clears the project automatically (projects are per-scope). - `--project ` on any command — one-off override for that invocation. - `wonda project list|create|delete` — manage the registry in the active scope. Org projects are created by org admins/owners only; personal projects are self-service. Tagging against a name that doesn't exist fails with `unknown_project` (no silent new buckets, so typos can't split the monitoring data). `wonda topup` always tops up your **personal** wallet, regardless of context. Topping up the org wallet (and configuring auto top-up) is admin-only and happens on the web at `/organizations/`. If a member runs out of org credits, the error tells them to ask an admin or switch back to personal — they cannot top up the org wallet from CLI. Roles inside an org are separate from the seat plan: - **Owner**: the original creator. Cannot be demoted or kicked. Can transfer ownership to another member from the org page (rare). - **Admin**: can invite (single or bulk via paste), kick, change roles, change seats, top up, configure auto top-up, change monthly limits. - **User**: can only spend within the org wallet (subject to a per-member monthly limit if the admin set one). A paid org seat (`WONDA` / `WONDA_PREMIUM`) grants the same paid feature access (skills, etc.) as a personal paid plan, but only while in org context. `wonda use --personal` falls back to the user's personal account plan. ### Access tiers Wonda is paid-only: every product surface requires a paid plan, including API calls, local platform reads, browser automation, media composition, file editing, diagnostics, generation, publishing, scraping, analysis, skills, relay operation, and cloud twin. Before any product command does work, the CLI performs a live entitlement check against Wonda. The check fails closed when access cannot be verified. New accounts get no product access until they subscribe, and a positive credit balance does not substitute for a plan. | Tier | Access | | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Anonymous** (no login) | No product access. Authentication, config, pricing, organization discovery/selection, shell completion, and local shutdown commands remain available so the user can subscribe, recover, or stop background services. Run `wonda auth login`, then subscribe. | | **Free** (logged in, no paid plan) | No product access. Subscribe at https://wonda.sh/account to use the product. | | **WONDA** (`$19.99/mo`, "Pro") | Everything except cloud twin: generation (`image/generate`, `video/generate`, ...), media upload/download, publishing, scraping, analytics, video analysis, skills (`wonda skill install/list/get`), transitions, clipping, email, reddit/linkedin account creation, styles, brand. | | **WONDA_PREMIUM** (`$49.99/mo`, "Premium") | Everything in WONDA, plus **cloud twin** (`wonda twin`: provisioning, scheduled runs, streamed login) with antidetect / shadowban protection, no caps, and US account creation. | | **Flagged** (per-account PostHog kill-switches) | Included in the paid plan but still gateable by a per-account flag: `wonda reddit signup` (redditAccountCreationEnabled), `wonda email` (emailServerApiEnabled), public LinkedIn profile enrichment (linkedinProfileEnrichmentEnabled). | If a command returns a `403` (`paid_plan_required`), subscribe at https://wonda.sh/account. This applies to the local stdio MCP path too because MCP executes the same CLI. Platform cookies and data remain on-device, but the command must first receive a successful paid-access decision from `GET /api/v1/auth/access`. A relay-only installation may use its scoped `wrelay_...` credential for that entitlement probe. The scoped credential still cannot call ordinary account APIs. ### Voice cloning Clone a voice from a 10s+ audio clip and use it in TTS. Hard limit: 20 cloned voices per account. Cost: $1.50 per clone. ```bash # Clone from a local file (auto-uploads to media library first) wonda voice create "Andu" --file ./sample.mp3 --description "My voice" # Clone from existing wonda media wonda voice create "Brand" --media-id # Optional source-audio preprocessing wonda voice create "Clean" --file ./raw.wav --noise-reduction --normalize-volume # List cloned voices (each row reports isExpired and expiresInDays) wonda voice list # One voice wonda voice get # Rename / re-describe (local only, no provider call) wonda voice update --name "New Name" --description "..." # Delete wonda voice delete ``` **Use a cloned voice in TTS** by passing the `providerVoiceId` from `voice get` as `voiceId` to `/audio/speech`: ```bash wonda audio speech "Hello world" \ --model minimax-speech-2-8-hd \ --params '{"voiceId":""}' ``` **7-day expiry**: cloned voices that haven't been used in TTS within 7 days are automatically expired. Running TTS with a cloned voice automatically refreshes its expiry. Idle voices that lapse must be re-cloned ($1.50 again). ### Credentials vault Persist logins created on external platforms (Instagram, TikTok, Twitter, etc.) so they can be reused on the next run. Passwords are AES-256-GCM encrypted with a server-side key and only decrypted on `get`. ```bash # Create wonda credentials create --website instagram.com --username myhandle \ --email me@example.com --password-stdin <<< "hunter2" \ --metadata '{"signup_source":"wonda-email"}' # List (passwords omitted) wonda credentials list --website instagram.com # Get full record including decrypted password wonda credentials get # Update any field (use --password-stdin to rotate; --username "" to clear) wonda credentials update --username newhandle # Delete wonda credentials delete # Fetch + record why you're using it in one call — POST, not GET, because # it writes a 'used' event with the reason. Prefer this over `get` whenever # you can articulate the reason. wonda credentials use --reason "instagram signup flow" # See recent events (created / used / rotated / updated) for audit wonda credentials events ``` Fields: `website` (required — typed input like `insta` is canonicalized to `instagram.com`), `username`, `email`, `password` (required), `metadata` (arbitrary JSON). At least one of `username` / `email` must be present. Multiple records per `(website, username)` are allowed — dedupe on your side if you need to. **Event log**: every `credentials get`/`use`, `create`, password rotate, and other updates are recorded as events on the credential (actor: `cli` | `web` | `system`). Use `credentials events ` or the web UI's history icon to audit. The event log is append-only and cascades on credential delete. ### Global output flags All commands support these output control flags: - `--json` — Force JSON output (auto-enabled when stdout is piped) - `--quiet` — Only output the primary identifier (job ID, media ID, etc.) — ideal for scripting - `-o ` — Download output to file (implies `--wait`) - `--fields status,outputs` — Select specific JSON fields - `--jq '.outputs[0].media.url'` — Filter JSON output with a jq expression ### CLI announcements & deprecation warnings On every command the CLI polls `GET /api/v1/updates` (anonymous, 1h cache in `~/.wonda/state.json`) for active announcements: deprecation notices, incident heads-ups, upgrade prompts. Messages are printed to stderr only, so stdout/JSON stays clean for piping. Per-request deprecation hints arrive as the standard `Warning: 299 - ""` HTTP header and are surfaced to stderr by the CLI's HTTP client as `[deprecated METHOD /path] `. Silence both channels with `WONDA_QUIET=1` (env var) or `--quiet` (flag). Disable just the network checks with `WONDA_NO_UPDATE_CHECK=1`. ### WAB / Wonda Automation Browser (`wonda wab`) **Claude/Codex and other agent launches default to background.** Use `wonda wab start ` and normal platform commands without `--visible`; this matches the Dock menu's **Send to background** state. Show a WAB only for an intentional visible inspection or manual login. `wab show`/`hide` affects the current session and never changes the next launch default. `wab config set visible true` is a deliberate persistent opt-in. Routine reuse preserves visibility and the selected tab, and showing the window preserves that tab too. Local CAPTCHA/authentication detection reports the blocker without surfacing the browser or taking keyboard focus. Notify the operator through their authorized channel and provide the exact `wonda wab show ` command; let them choose when to show it. Explicit show/login commands and hosted streamed login remain visible as requested. **From CLI v1.66.0, macOS persona visibility uses AppKit without per-persona Automation prompts.** WAB hides, shows and activates its own browser app by PID without sending Apple Events to System Events or the persona app. This also covers the native-host fallback guard. An already-running older driver keeps its old guard until that persona is restarted at a safe time; coordinate with its owner before restarting an active session. **1Password is included in local WAB profiles.** WAB downloads the official stable 1Password browser extension, verifies its publisher signature, and pins it to the toolbar on first setup. Open the WAB with `wonda wab show `, then click 1Password to sign in. Each persona keeps its own 1Password session. The desktop app may require you to approve WAB as an additional browser; signing in directly in the extension also works. Cached extension files work offline. WAB checks cached extensions for updates at most once a day when a persona starts, including failed checks; changing the Chromium version triggers another compatibility check. If the extension has never installed successfully, each start retries installation. An already-running browser picks up an extension update on its next start. When the bundled extension changes, WAB refreshes its background service worker so Chromium cannot reuse code from the previous version. This preserves the persona’s 1Password sign-in and vault data. Startup and `wab install` prune unused cached versions older than seven days; versions used by a live WAB process are kept. Set `WAB_ONEPASSWORD=0` before starting WAB to skip the bundled extension. Anonymous captures, scratch sessions, and cloud twins do not load it. A Wonda data path containing a comma also skips 1Password with a driver-log warning; use a `WONDA_HOME` path without commas to enable the extension. Enhanced Safe Browsing or administrator policies can also block automatic extension loading; WAB reports Chromium’s rejection in its driver log and preserves your browser settings. The Wonda Automation Browser (WAB) is a premium stealth antidetect browser, hardened so platforms cannot fingerprint it as automation. `wonda wab` is the one command for the antidetect Chromium stack (an undetected Playwright fork). It has two faces: - **Authenticated sessions.** One persistent headful Chromium per persona that holds signed-in sessions for LinkedIn, X, Reddit, and friends. The CLI spawns it on demand, lets it idle out, and routes platform reads/writes through it whenever a command runs `--via wab`. Cookies live in the persona's Chromium profile, not in `~/.wonda/config.json`. - **Anonymous capture.** `wonda wab screenshot `, `wonda wab record `, and `wonda brand extract` drive an ephemeral Chromium with a fresh fingerprint, no persona, and no cookies. Screenshot supports responsive single, batch, and manifest capture. See the screenshot and record blocks below. The mental model: you have **accounts** (one identity per platform). Each platform command routes to that account's cookies via either the flat JSON store (`--via cookies`, fast, no Chromium) or the account's **persona** (`--via wab`, live antidetect Chromium). A persona is the Chromium envelope that can hold multiple accounts under one fingerprint. In almost every case the persona is auto-created on first `--via wab` use, named after the account, so you never type a persona name. The local `wonda.mcpb` Desktop Extension uses this same local WAB path from Claude Desktop or Claude Code: platform cookies stay on-device, reads use local cookies, and writes use the local WAB. Claude web and Cowork need the remote MCP connector instead. **Native login is the default for a new persona.** `wonda wab login ` opens a headful WAB window and you log in there. The session is minted INSIDE the WAB, so it is independent (logging out of the same account in an unrelated Chrome cannot revoke it) and the cookies are born under the WAB's own fingerprint, so session and browser identity stay coherent. A brand-new persona auto-created on first `--via wab` use chains straight into this flow on a TTY. After an X login, Wonda detects the signed-in `screen_name` and records it as the persona's X account binding. Existing bindings are never silently changed; a different detected handle produces a warning. Pasting cookies from another browser (`wonda linkedin auth set`, `wonda x auth set`, ...) still works and is the explicit fallback, but a hand-pasted `li_at` on a novel WAB fingerprint is the highest-risk shape. ```bash wonda wab install # one-time: npm install + stealth-browser Chromium (shared by sessions, screenshot, record, brand extract) wonda wab update # refresh the runtime to the version this CLI pins (runtime versions ship inside CLI releases): staged download, verified, then atomically swapped in, so a failed download leaves the current driver tree untouched; refuses the runtime swap while personas run (wab stop them first; the relay picks the new runtime up on its next spawn, no restart), while an already-current tree's cheap manifest refresh proceeds without the gate: it reconciles drifted current files back to this build's embedded bytes (additive rewrites, safe under a running persona) and only prunes stale files when NO personas are running, deferring the prune (and keeping the mismatch visible) until the tree is quiet; --check reports installed vs pinned without changing anything, --force reinstalls even when current and re-downloads the shared Chromium build (corrupt-cache recovery; caveat: --force clears the cached Chromium before re-downloading, so a failed forced download leaves the shared cache without it until a retry succeeds). The driver tree also carries a manifest recording what produced it: the embedded driver asset identity compatibility is actually keyed on, plus the CLI build and platform as provenance. A tree whose recorded assets differ from this binary's embedded set (or that predates manifests) is refreshed automatically at the next browser spawn or wab update; two builds shipping byte-identical driver assets share one manifest without churn, so the recorded CLI version can lag behind the newest compatible binary. --check reports the manifest state (ok|absent|mismatch|unreadable) without touching anything; --json only changes the output format and still performs the update wonda wab start [account] # spawn (offscreen by default; --visible to show) wonda wab stop [account] # graceful shutdown wonda wab show [account] # peek a background WAB on-screen to watch it (suspends the macOS focus guard); starts it offscreen first if needed wonda wab hide [account] # send a surfaced WAB back offscreen, resume silent background operation wonda wab screenshot [persona] # persona mode: capture an already-open tab without surfacing it; --json still returns inline base64, --output writes a file, --tab/--full-page optional wonda wab screenshot --output page.png # anonymous PNG in a fresh ephemeral browser; responsive waits, injection, animation, element, clip, batch, manifest, and diagnostic JSON controls, see below wonda wab browse [url] --persona # load a page and scroll it like a person: pause, scroll, pause, scroll; stops early once the scrolled element stops advancing, see below (plain text output, not JSON) wonda wab snapshot -i --persona # drive ANY page: interactive elements with refs ([ref=e5]); then click/type/scroll/... @e5, see "Drive any page" below wonda wab menubar # Tray control, macOS menu bar or Windows notification area: the Wonda cat icon with a corner status badge. Green filled = running here and serving; orange half = standing by, which proves only that this machine is not the active device (whether another device or no device is serving is a separate three-way the badge cannot answer, and the menu's detail line only echoes the last relay-health check, a snapshot that can lag while this machine stays in standby); red triangle = running but cannot serve; grey hollow = not running here. The badge carries shape as well as color (filled/half/triangle/hollow) on both platforms; macOS falls back to a 🐱 text item with the same states as glyphs. Click for Restart Relay, a state-following Stop/Start toggle (`wonda relay disable`/`enable`, never `relay stop`), Open Log (macOS only; the Windows task runs the relay with no log file), and Show/Hide per running WAB; the tooltip carries the full status sentence. The bottom item "Quit Wonda" runs `wonda app quit` (stop relay + disable autostart + remove every open-at-login mechanism (macOS login item, Windows Startup entry) + remove the icon; quit stays quit until the app or `wonda app open` runs again). The Windows tray is a PowerShell/WinForms NotifyIcon consuming `relay health --json` (state) plus a periodic `wab status --json` (the persona Show/Hide list) and shelling wonda verbs, zero platform logic in the script. --stop removes only the icon and leaves the relay running # macOS Dock menu: right-click a running WAB's Dock tile (the 🐱) for "Show on screen" / "Send to background" (same as wab show/hide). Each running persona has its own Dock tile and its menu controls only that persona. Opt out with WAB_DOCK_MENU=0. # macOS: a background WAB no longer steals focus or flashes the menu bar / Dock when it opens a new tab; the Dock tile stays, it just never comes to the foreground until you `wab show` it. wonda wab status # list personas + last activity + browser-context health (a running daemon whose Chromium died shows browser-dead with a restart hint instead of a misleading plain "running") wonda wab login # RECOMMENDED for a new persona: open headful window, user logs in, session minted in-WAB (independent + fingerprint-coherent) wonda wab check # non-interactive session-alive probe wonda wab bind --x --reddit --linkedin # multi-account power-user path: bind N accounts to ONE persona wonda wab record # anonymous one-shot webm recording (no account, no cookies), see below wonda wab sync-cookies [account] # force wab → disk cookie sync now (don't wait for the 10-min timer) wonda wab logs [account] --tail 100 # tail driver.log (--audit for structured per-command log) wonda wab errors --tail 20 --since 24h # tail the cross-persona action-failure log wonda wab top-failures --since 7d # rank local WAB failures by platform/action/reason, joined with DOM recovery stats wonda wab top-failures --platform x --json # machine-readable local failure ranking wonda wab bundle-failures list # recent action failure bundles (one per failed run: screenshot, dom, visible-elements, cookies-summary REDACTED) wonda wab bundle-failures show # print manifest + file tree for a bundle (id = unix-ms-ts prefix) wonda wab bundle-failures ship # zip to ~/Downloads/wonda-failure-.zip for sharing wonda wab bundle-failures prune # remove bundles older than 30d (or --max-per-persona, --all) # Telemetry: on every wab action failure we report (action, platform, reason, error-string, has_bundle, cli_version) as a wab_action_failed PostHog event so maintainers can spot platform rotations across users. NO bundle contents, NO cookies, NO DOM, NO screenshots leave the user's machine. Opt out: WONDA_TELEMETRY_DISABLED=1. For server-side breakdowns, group `wab_action_failed` by `platform`, `action`, `reason`, and `has_bundle` in PostHog. Locally, `wonda wab top-failures` reads only `~/.wonda/wab/errors.jsonl` and persona-local `dom-recoveries.jsonl`, then shows count, last seen, recovered rate, bundle count, and a sample bundle id. wonda wab migrate-legacy # copy a legacy WAB-driver profile into a persona slot wonda wab restore [timestamp] # restore from an hourly snapshot (--list to enumerate) wonda wab backup disable # opt out of auto-push (on by default; existing cloud backups untouched) wonda wab backup enable # opt back in (auto-push synced cookie JSON to wondercat after every disk sync) wonda wab backup status # show config + remote inventory wonda wab backup push [account] # one-shot manual push for all platform bindings wonda wab backup pull [account] # guarded restore to ~/.wonda/-cookies/.json; refuses non-empty local unless --force wonda wab backup pull [account] --dry-run # preview restores without writing wonda wab backup list # inventory of cloud backups, including device/provenance metadata when available wonda wab backup delete [acct] # remove one backup wonda wab cookies list # explicit cookie backup inventory, metadata only wonda wab cookies status [account] # local cookie files plus cloud backup rows wonda wab cookies port [acct] --from-device # safely port one selected cloud row to this machine wonda wab config set # persist per-persona spawn defaults (idle-timeout, locale, visible, interactive, proxy_url, timezone, geo_lat/lon) wonda wab config get # print a persona's persisted config ``` **Keep cron personas warm.** A persona that continuously backs cookie-only read crons can use `wonda wab config set idle-timeout off`, followed by `wonda wab start `. The WAB then stays up and its existing 10-minute cookie sync keeps the flat files current. Use always-on only for cron-backing personas; `wonda wab config unset idle-timeout` restores the default 30-minute idle shutdown. **Local browser proxy (`proxy_url`).** By default the local WAB dials direct (your own IP). Set `wonda wab config set proxy_url managed` to route the LOCAL browser through your account's minted twin proxy, so it shares the same egress as the cloud twin (useful for IP continuity or a VPN/office/CGNAT network). A literal `socks5://…`/`https://…` value is a manual override instead; unset clears it back to direct. The proxy is optional: if minting is disabled for the environment or unavailable, the browser falls back to a direct dial. Lifecycle commands take an `--account` (e.g. `wonda wab login linkedin`); the persona is auto-derived from the account name. `wonda wab bind` is the one place a persona is named explicitly: use it when one Chromium must host accounts that have different names per platform. **Drive any page (`snapshot`, act on `@ref`, `snapshot`).** Click, type, scroll, and read ANY site in the persona's logged-in WAB, offscreen, without an action script. Use it for every site or step the platform commands do not cover; never drive the WAB with computer-use or screen clicks. The loop: 1. `wonda wab goto --persona

` (or start from whatever the tab already shows). 2. `wonda wab snapshot -i --persona

` prints the actionable elements as YAML, one per line, each with a ref: ``` # url: https://news.ycombinator.com/ # title: Hacker News - link "new" [ref=e7]: - /url: newest - textbox "Search" [ref=e41] ``` 3. Act on a ref: `wonda wab click @e7`, `wonda wab type @e41 "rust" --submit`. 4. Snapshot again. Refs expire on every snapshot and navigation of the tab; a stale ref fails fast with `ref_not_found` and a hint to re-snapshot. Add `--snapshot` to any page-changing action (click, type, fill, press, hover, select, scroll, goto, back, forward, reload, upload) to print the fresh interactive snapshot in the same call. Target grammar (one argument; quote it when it has spaces): `@e5` / `e5` / `ref=e5` (snapshot ref; `@f1e3` inside a frame), `label=Email`, `placeholder=Search`, `640,360` (viewport x,y, `click` and `hover` only), anything else is a Playwright selector (`'text=Sign in'`, `'role=button[name="Post"]'`, CSS, `xpath=//a`). Prefer refs. ```bash wonda wab snapshot [-i] [--max-chars N] # YAML accessibility tree; -i = actionable elements only (default cut 40000 chars) wonda wab click [--button left|right|middle] [--double] # human mouse path; scrolls off-screen elements into view first wonda wab type [--clear] [--submit] # clicks the field, human keystrokes; --submit presses Enter after wonda wab fill # instant value set, replaces content ("" clears) wonda wab press [--target ] # Enter, Tab, Escape, ArrowDown, PageDown, ControlOrMeta+A (lowercase ok) wonda wab hover # open hover menus / tooltips wonda wab select [value...] # native