Skip to main content

CLI

The Flowda CLI is the command-line client for the /v1 developer API. Each command maps to one API operation, and the CLI covers all 20 developer-API operations: the capability calls behind Scrape, Templates, Search, and Map, the ten Watch job operations, the three public dictionaries, and the account self-check. It is built for terminals, scripts, CI, and AI agents that can run shell commands.

The CLI is deterministic. It sends the request you describe and reports the outcome. It does not plan, it does not retry a billed call, and it does not change your request silently.

Applies to flowda CLI 0.1.3Last updated 2026-11-16

What the CLI gives you​

PropertyWhat it means in practice
One command per operationEvery /v1 operation has a command, and every command calls one operation. You can use the CLI to script exactly what the HTTP API documents.
Single static binaryIt is compiled from Go 1.26 with CGO_ENABLED=0. The installed machine needs no Go, Node, or other runtime. The npm channel is the exception, because npm itself needs Node.js.
Pipe-safe outputstdout carries data only: page content, URL lists, JSON. Prompts, warnings, and the call summary go to stderr, so --json output can go straight into jq or a file.
Diagnosable failuresFailures from the API carry a request_id, and platform-side failures also carry upstream_request_id. Exit codes are stable, so scripts branch on the code rather than matching error text.
Billing safetyBilled calls are never retried automatically, because the contract has no idempotency key. Only zero-cost GET requests may be retried once, and only on a transport error.
No telemetry, no self-updateThe binary sends no usage data and does not update itself. Upgrade with npm install -g flowda-cli@latest.
Embedded contractThe developer OpenAPI contract ships inside the binary, so flowda version reports both the CLI version and the contract version it was built against.

Install​

The CLI is published to npm and runs on Windows, macOS, and Linux. Install it globally with npm, or run it without installing through npx.

ChannelCommandRequiresUse it when
npmnpm install -g flowda-cli@latestNode.js 16 or newerYou use the CLI regularly. One package contains the binaries for all five supported platforms, and nothing is downloaded at install time.
npxnpx -y flowda-cli@latest versionNode.js 16 or newerYou want to try the CLI without installing it.

Node.js is the only prerequisite. The flowda binary inside the package is self-contained and needs no Go, Python, or other runtime.

Supported platforms​

The package ships binaries for windows/amd64, darwin/amd64, darwin/arm64, linux/amd64, and linux/arm64. windows/arm64 and musl/Alpine are not supported; the launcher exits with an explicit error instead of running the wrong binary.

Verify the install​

Verify the install
flowda version --json
flowda doctor

version --json returns version, commit, build_date, go_version, spec_version, and spec_digest. doctor checks the API URL, whether the developer surface is enabled, the credential, and the scopes you name; any failing check exits non-zero. Before you log in, auth FAIL and exit code 1 are expected. surface OK means the network path works.

flowda doctor --need extract,search,map,watch

Upgrade and uninstall​

The CLI does not update itself. Upgrade it with npm; your configuration, profiles, and cached template schemas are left in place.

npm install -g flowda-cli@latest

Uninstall it with npm. The binary is removed and your user configuration is kept.

npm uninstall -g flowda-cli

The configuration directory holds the API key and profiles. Delete it only when you also want the stored credentials gone: %APPDATA%\flowda on Windows, ~/Library/Application Support/flowda on macOS, and $XDG_CONFIG_HOME/flowda (default ~/.config/flowda) on Linux.


Authenticate​

Create an API key in the Flowda console. A key has the shape flw_<env>_<key_id>_<secret> and carries per-capability scopes. The CLI saves a key to the active profile and validates it against GET /v1/account. It never creates or revokes keys; that happens only in the console.

Save and validate a key
flowda login # prompts for the key, without echoing it
flowda login --api-key flw_live_... # pass the key directly
echo "$FLOWDA_API_KEY" | flowda login --stdin

On success, login prints the authentication method, user ID, key ID, scopes, and daily quota. --no-save validates the key without writing it to the configuration.

Configuration file locations​

OSPath
Windows%APPDATA%\flowda\config.json
macOS~/Library/Application Support/flowda/config.json
Linux$XDG_CONFIG_HOME/flowda/config.json, which defaults to ~/.config/flowda/config.json

Directories are created with mode 0700 and the file with 0600, and writes are atomic. A corrupt file is treated as no configuration and reported on stderr; run flowda login again to overwrite it.

Profiles and precedence​

Credentials resolve in this order: flag, environment variable, configuration file for the active profile, default. Use profiles to separate environments or keys.

flowda login --profile staging
flowda --profile staging status
flowda config use-profile staging
ItemFlagEnvironment variableConfiguration file
API key-k, --api-keyFLOWDA_API_KEYprofile.api_key
Developer API URL--api-urlFLOWDA_API_URLprofile.api_url
Profile--profileFLOWDA_PROFILEdefault_profile
Client timeout--http-timeoutFLOWDA_HTTP_TIMEOUTprofile.http_timeout
Color--no-colorNO_COLOR, FLOWDA_NO_COLORnone
Debug log--verboseFLOWDA_DEBUG=1none

The default API URL is https://openapi.flowda.ai. Point --api-url or FLOWDA_API_URL at another deployment when you use a staging environment.

Quick start​

Create the key first, then run the commands below.

  1. Log in and check the account
    flowda login
    flowda status
    flowda whoami --json
  2. Run a capability
    flowda extract https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Caching
    flowda extract https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Caching -f markdown,links --json -o page.json
    flowda search "espresso machine" --max-results 5
    flowda map https://www.example.com --limit 100 | head -20

    flowda templates
    flowda templates get amazon_product
    flowda template amazon_product --param asin=B0CHHSFMRL
  3. Monitor a page
    flowda watch create https://example.com/pricing \
    --every 1h --selector "main .price" --diff-mode text \
    --webhook-url https://api.mycorp.com/hooks/flowda
    flowda watch list --status active
    flowda watch run job_01J8Z...
    flowda watch checks job_01J8Z... --limit 5
    flowda watch check job_01J8Z... chk_01J8Z...
    flowda watch pause job_01J8Z...
    flowda watch resume job_01J8Z...
    flowda watch delete job_01J8Z... --yes
  • flowda template fetches the template's params_schema from the free GET /v1/templates/{id} endpoint and validates your parameters locally before sending the billed request. The schema is cached for 24 hours; --refresh-schema fetches it again. Invalid parameters exit 2 without an execution request.
  • A search that returns no results is a success, with exit code 0.
  • In human mode, flowda map prints one URL per line, so it composes with head, sort, and wc -l.
  • Template execution requires the extract scope, because the upstream platform authorizes templates through that scope.

Commands, endpoints, and credits​

CommandEndpointCredits
flowda extract <url>POST /v1/extract1 on a cache hit, 3, or 5
flowda search <query>POST /v1/searchBilled per result; fractional values are possible
flowda map <url>POST /v1/mapInteger; credits_used is absent when the call was not billed
flowda template <template_id>POST /v1/template5; 0 on failure; a successful call with an empty result still costs 5
flowda templates, flowda templates get <template_id>GET /v1/templates, GET /v1/templates/{template_id}0
flowda watch <subcommand>/v1/watch/jobs...Manual check 1, 3, or 5 (0 on failure); the other subcommands are estimated at one unit of the server-side soft quota
flowda whoami, flowda status, flowda doctorGET /v1/account0
flowda regions, flowda countries, flowda languagesGET /v1/regions, GET /v1/search/countries, GET /v1/search/languages0, public
flowda openapiGET /v1/openapi.yaml, GET /v1/openapi.json0, public
flowda docsNo request; prints or opens <api-url>/v1/docs0

Commands​

Every capability has one command, and the full flag reference is linked from each section.

Extract a page​

flowda extract <url> fetches one page and returns it as markdown, raw HTML, clean HTML, or its links. The options control what content is kept, how fresh the cached snapshot must be, and which egress region the request uses.

Extract a page as markdown
flowda extract https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Caching
Request several formats and save JSON
flowda extract https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Caching -f markdown,links --json -o page.json
Pipe a page's links into another command
flowda extract https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Caching -f links | head -20
Send a custom header and pick an egress region
flowda extract https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Caching --header "Accept-Language: en-US" --country JP

Parameters

FlagDefaultMeaning
<url> / --urlrequiredAbsolute http(s) page URL. Give it as the positional argument or with --url, not both.
-f, --formatmarkdownOutput format: markdown, raw_html, clean_html, or links. Repeat the flag or separate values with commas.
--only-main-contenttrueKeep the main content and drop navigation and footers. Write --only-main-content=false to include them.
--include-tagunsetKeep only nodes that match these CSS selectors. Repeatable.
--exclude-tagunsetRemove nodes that match these CSS selectors. Repeatable; removing all content returns 16002.
--max-age48hMaximum age of a cached snapshot, at most 48 hours. 0 forces a fresh fetch.
--wait-for0sExtra wait after page load: at most 30s, and at most half of --timeout.
--timeout60sPer-fetch budget, from 1s to 120s. The client HTTP budget is the global --http-timeout.
--headerunsetk:v request header forwarded to the target site. Repeatable. A custom header bypasses the cache and marks the URL for 48 hours.
--countryUSTwo-letter uppercase egress region from flowda regions.
--advanced-modetrueLet the fetch service escalate its engine when page signals call for it. Keep the default when the page needs rendering.

Endpoint POST /v1/extract, scope extract. Credits 1 on a cache hit, 3, or 5. Full flags: extract reference.

Search the web​

flowda search <query> searches web, news, shopping, or scholar sources and returns ranked results. --extract-content also extracts the content of every result in the same call.

Search the web
flowda search "espresso machine" --max-results 5
Search news for the past week
flowda search "AI news" --source news --time-range week --country US --language en
Extract the content of every result
flowda search "docs" --extract-content -f markdown --json -o results.json
Look up valid country and language codes first
flowda countries
flowda languages

Parameters

FlagDefaultMeaning
<query> / --queryrequiredSearch query, 1–256 characters. Give it as the positional argument or with --query, not both.
--max-results10Result limit from 1 to 100. This is an upper bound, not an exact count.
--sourcewebweb, news, shopping, or scholar.
--countryunsetTwo-letter uppercase ISO code from flowda countries. Not available with --source scholar.
--languageunsetResult language from flowda languages; case-sensitive.
--time-rangeunsethour, day, week, month, or year. Not available with shopping or scholar.
--extract-contentoffAlso extract the content of every result.
-f, --formatmarkdownExtraction format: markdown, raw_html, clean_html, or links. Valid only with --extract-content.
--only-main-content, --max-age, --include-tag, --exclude-tag, --wait-for, --timeout, --advanced-modeas extractContent and timing options for extraction, with the same defaults and limits as extract. Valid only with --extract-content; passing one without it is a local error, not a silent drop.

Endpoint POST /v1/search, scope search. Credits billed per result; fractional values are possible. Full flags: search reference.

Map a site​

flowda map <url> enumerates the reachable URLs of a site. Human mode prints one URL per line, so the output composes with head, sort, and wc -l.

List a site's URLs
flowda map https://www.example.com | head -50
Keep only same-site URLs discovered from the sitemap
flowda map https://www.example.com --limit 500 --domain-filter domain --sitemap only -o urls.txt
Write the full result as JSON
flowda map https://www.example.com --limit 1000 --json -o urls.json

Parameters

FlagDefaultMeaning
<url> / --urlrequiredAbsolute http(s) site URL. Give it as the positional argument or with --url, not both.
--limit5000Maximum number of URLs, from 1 to 100000.
--domain-filteralldomain keeps only same-site URLs; all includes external links.
--sitemapincludeskip, include, or only.
--countryUSEgress region from flowda regions.

Endpoint POST /v1/map, scope map. Credits an integer; credits_used is absent when the call was not billed. Full flags: map reference.

Run a template​

A template is a maintained extraction recipe for a supported site: flowda templates lists the catalogue and flowda template <template_id> runs one for 5 credits. The CLI validates your parameters against the template's schema before it sends the billed call.

List the template catalogue
flowda templates
Inspect a template's parameters
flowda templates get amazon_product
flowda templates get amazon_product --schema
Run a template with --param
flowda template amazon_product --param asin=B0CHHSFMRL
Run a template with a params file
flowda template walmart_search --params-file params.json

Before the execution request, the CLI fetches params_schema from the free GET /v1/templates/{template_id} endpoint and validates locally; invalid parameters exit 2 without sending a request. The schema is cached for 24 hours, and --refresh-schema fetches it again. On Windows, nested JSON on a PowerShell command line is easy to mangle: write the object to a file and use --params-file, or pipe it into --params -.

The --param asin= example uses a live Amazon product checked on 2026-11-16. An execution costs 5 credits even when the page or result is missing, so confirm the identifier is a current product before running it.

Parameters

FlagDefaultMeaning
<template_id>requiredTemplate ID such as amazon_product or walmart_search.
--paramunsetOne template parameter as k=v. Repeatable, and the value is typed from the template's params_schema.
--paramsunsetThe whole params object as JSON. --params - reads it from stdin. Mutually exclusive with --param.
--params-fileunsetRead the whole params object from a file.
--refresh-schemaoffIgnore the schema cache and fetch params_schema again.
--zipcode, --pages, --timeoutunsetSugar for zipcode, pages, and timeout_ms. --timeout accepts a duration such as 60s.

Endpoint POST /v1/template, scope extract. Credits 5; 0 on failure; a successful call with an empty result still costs 5. The catalogue and template details cost 0. Full flags: template reference and templates reference.

Monitor a page​

A watch job fetches a page on a schedule and compares it with the previous snapshot. The CLI covers the whole lifecycle: create, list, get, update, run, checks, check, pause, resume, and delete.

Create an hourly job with a webhook
flowda watch create https://example.com/pricing \
--every 1h --selector "main .price" --diff-mode text \
--webhook-url https://api.mycorp.com/hooks/flowda
List the active jobs
flowda watch list --status active
Run a manual check and read the diff
flowda watch run job_01J8Z...
flowda watch checks job_01J8Z... --limit 5
flowda watch check job_01J8Z... chk_01J8Z...
Pause, resume, or delete a job
flowda watch pause job_01J8Z...
flowda watch resume job_01J8Z...
flowda watch delete job_01J8Z... --yes

Subcommands

SubcommandEndpointWhat it does
flowda watch create <url>POST /v1/watch/jobsCreate a job with an interval or cron schedule.
flowda watch listGET /v1/watch/jobsList jobs, optionally filtered by status or URL.
flowda watch get <job_id>GET /v1/watch/jobs/{id}Show one job and its next run time.
flowda watch update <job_id>PATCH /v1/watch/jobs/{id}Change the job; only the fields you name are sent.
flowda watch delete <job_id>DELETE /v1/watch/jobs/{id}Delete the job with its check history and pending deliveries.
flowda watch run <job_id>POST /v1/watch/jobs/{id}/checkRun a synchronous manual check and print the diff.
flowda watch checks <job_id>GET /v1/watch/jobs/{id}/checksList the check history.
flowda watch check <job_id> <check_id>GET /v1/watch/jobs/{id}/checks/{check_id}Show one check, including the historical diff body.
flowda watch pause <job_id>POST /v1/watch/jobs/{id}/pauseStop scheduling. Idempotent.
flowda watch resume <job_id>POST /v1/watch/jobs/{id}/resumeResume scheduling and clear the errored state. Idempotent.

Parameters

FlagDefaultMeaning
--everyunsetCheck interval from 60s to 30d, for example 1h or 90m. Runs on the UTC timeline; --timezone does not affect it. Give exactly one of --every and --cron.
--cronunsetStandard five-field cron expression, interpreted in --timezone, including weekends. Give exactly one of --every and --cron.
--timezoneUTCIANA timezone for --cron.
--selector / --selector-typeunset / cssMonitor only part of the page. Selector type is css or xpath.
--diff-modeunset (the service defaults to auto)auto, text, or json; repeatable. auto cannot be combined with the others.
--webhook-urlunsetChange callback URL: public HTTPS on port 80 or 443. Localhost and private networks are rejected at registration with 400/16006.
--retention-days30Days to keep the check history, from 0 to 365. 0 keeps checks forever.
--statusunsetwatch list filter: active, paused, or errored, in lowercase.
--limit50Page size for watch list and watch checks, from 1 to 200.
--alloffFollow next_cursor to the end. An empty page does not mean the list ended.
  • watch run is a synchronous manual check that takes about 60 seconds. It costs 1, 3, or 5 credits, and 0 when it fails. It has no idempotency key, so after a timeout or a 504, list the checks with flowda watch checks before running it again.
  • Callbacks are HTTP webhooks delivered to your server, not a local listener. See Webhooks for signature verification and delivery retries. The CLI does not listen for callbacks; a watch listen command is planned.
  • watch create returns a webhook_secret that starts with whsec_ only the first time a callback URL is registered to your account. Store it immediately; the CLI does not save it. Reusing a URL that was registered before never returns its secret again (even after the job was deleted), GET never returns it, and there is no read-back or rotate endpoint — register a new callback URL and update the job to rotate. When no secret is returned, data.data.webhook_secret_note explains why.
  • watch resume also clears the errored status and the consecutive-failure counter.
  • Job and check IDs are job_ or chk_ followed by 22 base62 characters.

Endpoint /v1/watch/jobs for create, list, get, update, and delete, plus /v1/watch/jobs/{id}/check, /checks, /pause, and /resume, scope watch. Credits manual check 1, 3, or 5 (0 on failure); the other subcommands are estimated at one unit of the server-side soft quota. Full flags: watch reference.

Check the account​

flowda whoami and flowda status read GET /v1/account and report your identity, scopes, and daily quota, while flowda doctor checks the network path, the developer surface, the credential, and the scopes you name. All three are free reads.

Show the account identity and daily quota
flowda status
flowda whoami --json
Check the scopes a workflow needs
flowda doctor --need extract,search,map,watch
Machine-readable account check
flowda status --json

Parameters

FlagDefaultMeaning
--needunsetdoctor only: comma-separated scopes that must be present, from extract, search, map, and watch.
--jsonoffMachine mode for whoami, status, and doctor: stdout carries JSON only.

status shows the CLI version, where the credential came from, connectivity, the contract version, and the account's daily quota. whoami prints the identity, scopes, and daily_credit_quota. There is no usage or balance query in the CLI: GET /v1/account returns only the daily quota, and the per-call credit details are in the console. Before you log in, doctor reports auth FAIL and exits 1; that is expected.

Endpoint GET /v1/account, scope none (a valid credential is required). Credits 0. Full flags: whoami reference, status reference, doctor reference.

Look up dictionaries​

The three public dictionaries name the values that the country and language flags accept, and they work without a login. They are not interchangeable: flowda regions is the egress-region list, while search uses flowda countries and flowda languages.

List the dictionaries
flowda regions
flowda countries
flowda languages
Read the dictionaries as JSON
flowda regions --json
flowda countries --json
flowda languages --json

Parameters

Target flagValues fromMeaning
--country on extract, map, and watchflowda regionsEgress region, a two-letter uppercase code.
--country on searchflowda countriesSearch country, a two-letter uppercase code.
--language on searchflowda languagesResult language, case-sensitive, for example en, zh-cn, or pt-br.

Endpoint GET /v1/regions, GET /v1/search/countries, and GET /v1/search/languages, all public. Credits 0. Full flags: regions reference, countries reference, languages reference.

Configure the CLI​

flowda config reads and writes the local configuration: the API URL, credentials, and the HTTP budget. Profiles separate environments or keys, and login --profile writes to the profile you name.

Read the configuration
flowda config list
flowda config get api-url
flowda config path
Change and remove values
flowda config set api-url https://openapi.flowda.ai
flowda config set http-timeout 120s
flowda config unset api-key
Keep staging in its own profile
flowda login --profile staging
flowda --profile staging status
flowda config use-profile staging

The CLI never asks for a password: a profile stores the API key, or a session token, in the configuration file. Credentials resolve in the order flag, environment variable, configuration file for the active profile, default.

Parameters

Command or keyMeaning
flowda config listList all profiles.
flowda config get <key>Read one value. Readable keys: api-url, api-key, token, http-timeout, profile, default-profile, and config-path. api-key and token print a masked value.
flowda config set <key> <value>Change a value. Writable keys: api-url, api-key, token, and http-timeout.
flowda config unset <key>Remove a value. Removable keys: api-url, api-key, token, and http-timeout.
flowda config pathPrint the path of the configuration file.
flowda config use-profile <name>Switch the default profile.

Endpoint none; the commands read and write the local configuration file. Credits 0. Full flags: config reference.

Global options​

These flags are available on every command. Per-command flags are in the CLI command reference.

OptionDefault or environmentMeaning
-k, --api-key <key>FLOWDA_API_KEY, or the profileAPI key for this call. The value is never written to disk.
--token <jwt>FLOWDA_SESSION_TOKEN, or the profileSession JWT sent as a Bearer token. Use an API key for scripts and agents.
--api-url <url>https://openapi.flowda.ai, FLOWDA_API_URL, or the profileDeveloper API base URL.
--profile <name>FLOWDA_PROFILE, or defaultConfiguration profile.
--http-timeout <dur>The operation budget plus 30 seconds (never below 5 seconds), FLOWDA_HTTP_TIMEOUT, or the profileTotal client-side budget for one request.
--jsonoffMachine mode: stdout carries JSON only.
--envelopeoffPrint the full {code,message,request_id,data} envelope. Implies --json.
--prettyon in a terminal, off in a pipeIndent JSON.
-o, --output <path>offWrite the result to a file instead of stdout.
--quietoffSuppress prompts and the call summary.
--verboseFLOWDA_DEBUG=1Print request and response summaries to stderr, including request_id and duration.
--no-colorNO_COLOR or FLOWDA_NO_COLORDisable ANSI color.
--no-validateoffSkip local request validation and send the request as given.
-y, --yesoffSkip the confirmation for a destructive operation. Required when not on a TTY.
-h, --helpPrint help.
-V, --versionPrint the version.

Output and piping​

  • stdout carries data only. Page content, URL lists, and JSON go to stdout. Prompts, warnings, and the credits_used and request_id summary go to stderr, so parse stdout only.
  • A single artifact is written as raw text: one format of markdown or HTML, links with one URL per line, and map in human mode with one URL per line.
  • When you ask extract for more than one format, it prints JSON even without --json, because there is no single text representation.
  • Structured results are JSON. With --json, the CLI prints the envelope's data object unchanged: it is not flattened and its field names are not rewritten. With --envelope, it prints {code,message,request_id,data}.
  • -o, --output writes the result to a file. Nothing is repeated on stdout; wrote <path> goes to stderr. A .json suffix, or --json, writes JSON.
  • --pretty affects JSON only. In a terminal, JSON is indented by default; in a pipe, it is compact unless you pass --pretty.
  • Credit amounts are printed as reported. Search can report fractional credits; the CLI does not round them or convert them to money.
  • HTTP 200 is not success. A capability call can return HTTP 200 with code: 0 and data.success: false; the CLI treats that as a failure with exit code 10. See Response format.
  • Color is used only in a terminal, and only when you have not passed --no-color.

With --json, a failure writes nothing to stdout. The machine-readable failure body is a single line on stderr:

Failure body on stderr
{"ok":false,"exit_code":10,"error_type":"target_unreachable","platform_code":"TARGET_DNS_ERROR",
"request_id":"req_…","upstream_request_id":"core-…","hint":"…"}

Exit codes​

Exit codeMeaningTypical error codesWhat to do
0Success, including an empty search or an empty template resultnoneContinue.
1Internal or unknown failure10000, 14000, a rendering errorRetry later; contact us if it persists.
2Usage or local validation failurean unknown flag, an out-of-range value, invalid template parametersFix the command. Local validation failures send no request.
3No credential configured12001Run flowda login or set FLOWDA_API_KEY.
4Invalid or expired credential12002, 12014Check the key in the console, or save it again with flowda login.
5Permission denied12003, 12015Add the scope named in data.required_scope. Templates need extract.
6Rate limited13000, 16003Back off using Retry-After. The default limit is 5 requests per second per key.
7Quota or credits exhausted13002, 16004Wait for the next UTC day, or ask for a higher quota.
8Resource not found11004, including a disabled /v1 surfaceCheck the path. If every route returns 404, check --api-url and whether the surface is enabled.
9Request rejected11000, 16002, 16006Fix the request as described in details.
10Upstream or fetch failure16xxx codes not mapped to another exit code, or data.success: falseThe fetch failed but was usually still billed. Check the outcome before retrying.
11State conflict16008Adjust the job state, for example after a manual check while the job is paused. flowda watch get shows the state.
12Local network error, timeout, or cancellationnone; outcome_unknown when the request may already have been sentVerify whether the call ran before sending it again.

Branch on the exit code in scripts instead of matching error text. The ranges are stable: 0 success, 1 internal or unknown, 2 usage and local validation, 3 to 5 authentication and authorization, 6 to 7 rate limits and quota, 8 to 9 target and request, 10 to 11 upstream and state, 12 network and timeout. The full error-code table is in Error codes.

Scripts and AI agents​

Every command works without a TTY, so the same invocation runs in a shell, in CI, and inside an agent that can execute commands. Put the credential in the environment and let the exit code drive the control flow.

CI and agent pattern
export FLOWDA_API_KEY=flw_live_...
export FLOWDA_API_URL=https://openapi.flowda.ai

flowda whoami --json
flowda extract https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Caching -f markdown -o caching.md
flowda search "wireless headphones" --source news --max-results 20 --json -o news.json
  • Machine mode. --json prints data on stdout. A failure prints a single-line JSON object on stderr with exit_code, error_type, and request_id.
  • Confirmation. Only destructive operations ask for confirmation, and without a TTY the CLI refuses to guess. Pass -y, --yes, for example flowda watch delete job_... --yes.
  • Billing. Capability calls and Watch writes are never retried automatically, because the contract has no idempotency key. If a call times out or you cancel it, do not send it again blindly. Check the outcome first: flowda watch checks for a manual check, the console call log for a capability call. Report the request_id.
  • Local validation. The CLI checks URL schemes, enum values, numeric ranges, mutually exclusive flags, --wait-for against --timeout, and template parameters before sending, so an obvious mistake does not spend credits. --no-validate turns that off and sends the request as given. Local validation is not a substitute for server checks such as scopes.
  • Credential environment variables. FLOWDA_API_KEY and FLOWDA_API_URL are enough for a fresh runner. --api-key overrides the environment for one call and is never written to disk.
  • Windows quoting. Nested JSON on a PowerShell command line is easy to mangle. Use --params-file or pipe the JSON into --params -.
  • Agent hints. flowda --help and the CLI command reference describe the command tree for an agent. A flowda init command that installs the CLI usage as an Agent Skill is planned, not shipped.

Troubleshooting​

Run flowda doctor first: it separates a network problem from a credential problem. Then check this table.

SymptomCause and fix
flowda is not recognized after npm install -gnpm's global bin directory is not on PATH. Run npm prefix -g and add its bin directory (on Windows, the prefix itself) to PATH, then open a new terminal.
npm reports that the platform is not supportedThe package has no binary for windows/arm64 or musl/Alpine. Use a supported platform.
401 with 12014, exit code 4The key is invalid, revoked, or expired. Check it in the console, or save it again with flowda login.
403 with 12015, exit code 5The key lacks a scope. data.required_scope names the missing scope. Templates need extract.
429 with 13000, exit code 6Rate limited. Back off using Retry-After; the default limit is 5 requests per second per key.
402 with 13002, exit code 7The daily quota is used up. It resets on the next UTC day, or ask us for a higher quota.
404 with 11004, exit code 8The target does not exist, or the /v1 surface is not enabled. Check --api-url.
The fetch failed but HTTP was 200Look at the code inside data.success: false, for example TARGET_DNS_ERROR. The call was usually still billed.
The client times out, exit code 12Fetch budgets reach 130 seconds on the server, and the CLI adds 30 seconds. Raise the read timeout on an enterprise proxy or nginx.
16009A platform credential on our side is broken. Retrying does not help. Contact us.
flowda doctor reports surface FAILThe /v1 developer surface is not enabled, or --api-url is wrong. A 404 with 11004 on every route confirms it.
flowda doctor reports auth FAIL before loginExpected before you log in. Run flowda login or set FLOWDA_API_KEY, then run it again.
config.json is corruptThe CLI treats it as no configuration and says so on stderr. Run flowda login to overwrite it.
A proxy or TLS inspection breaks requestsSet HTTPS_PROXY. A proxy that terminates TLS needs its root certificate installed. The CLI has no --insecure bypass.
Tables or non-ASCII text are garbled in a terminalUse UTF-8 in Windows Terminal, for example with chcp 65001. --no-color also removes ANSI codes.

Next steps​