Supaflow CLI
The Supaflow CLI (@getsupaflow/cli) lets you manage datasources, pipelines, syncs, schedules, and jobs from your terminal. Use it for automation, scripting, and as the foundation for the Claude Code plugin.
Install
npm install -g @getsupaflow/cli
Requires Node.js 18 or later.
Enable access and authenticate
An organization administrator or personal-account owner must select the intended account in Supaflow, open Settings > Admin > API Access, and check Enable API access. Access is off by default, including for administrators.
For browser OAuth login, check Supaflow CLI under OAuth applications. For key-based/headless login, check Allow API keys instead. Click Save API Access Changes, review the selections, then Save access settings before authenticating. API keys are not required for OAuth.
See the access setup guide with screenshots.
For interactive browser login, run:
supaflow auth login
supaflow auth status
The current CLI opens your browser for OAuth sign-in and consent. API keys are not required. Choose the account whose access settings you configured.
For headless automation, enable Allow API keys instead, save the reviewed settings, and create a key from Settings > API Keys. Configure it securely in your terminal or secret manager:
supaflow auth login --key <your-api-key>
Never paste keys or tokens into chat. The CLI's local stdio MCP server uses this same CLI login: enable Supaflow CLI for OAuth or Allow API keys for key-based login. Hosted ChatGPT and Claude checkboxes do not authorize local CLI-backed MCP.
If access is denied, verify the active account, administrator role, master switch and selected login method before retrying. Existing keys also require API-key access to remain enabled. See API access settings for the full permission matrix and token-expiry limits.
Select a Workspace
List available workspaces and select one:
supaflow workspaces list
supaflow workspaces select <workspace-name>
The selected workspace persists across commands until you change it.
Run Your First Command
Try these to confirm everything is working:
# Check auth and workspace
supaflow auth status --json
# List available connectors
supaflow connectors list --json
# Browse connector documentation
supaflow docs sqlserver
Command Groups
| Command | Description |
|---|---|
supaflow auth | Log in, log out, check authentication status |
supaflow workspaces | List and select workspaces |
supaflow connectors | List available connector types |
supaflow datasources | Create, edit, test, and manage datasource connections |
supaflow projects | List and create projects |
supaflow pipelines | Create, edit, sync, and manage data pipelines |
supaflow schedules | Create, edit, and manage recurring sync schedules |
supaflow jobs | Check job status, view logs, and inspect results |
supaflow agent | Start, stop, and manage a local Docker agent; safe upgrades require CLI 0.5.0+ |
supaflow encrypt | Encrypt sensitive values for datasource configuration |
supaflow docs | Browse connector-specific documentation |
supaflow mcp | Start the stdio MCP server (used by Claude Desktop and other MCP clients) |
Configure Error File Storage
The pipeline setting Save error files for debugging controls whether rejected-row files are saved to Supaflow. It defaults to Off, including for existing pipelines without the property. Local error files continue to be generated. Opted-in files may contain customer data.
Generate a pipeline configuration file:
supaflow pipelines init --source <source-id-or-api-name> --project <project-id-or-api-name> --output pipeline-config.json
The generated config includes this default:
{
"upload_error_files_to_control_plane": false
}
Set the property to the JSON boolean true to opt in, then pass the config file to supaflow pipelines create --config pipeline-config.json along with the required pipeline name, source, and project. Missing, null, or non-boolean values do not permit error-file uploads.
The bundled stdio MCP server includes this choice in its prepared config and config_summary. For guided creation through either stdio or hosted MCP, set the property in config_patch when calling pipelines_create_from_plan. Hosted MCP also accepts it in the config for direct creation and in config_patch for editing.
Turning the setting off blocks subsequent uploads; it does not delete files already saved to Supaflow or cancel a transfer already in progress. See Ingestion Pipelines and Activation Pipelines for UI instructions.
Configure Objects Without a Key
The keyless_object_handling setting controls row identity for objects without a primary or unique key, including children whose IDs depend on a keyless parent. It is independent of the load mode:
UUID(Generate UUID, default): requested Merge becomes Append for these objects. Full reads append every returned row again; changed rows on incremental reads are added instead of updated.ROW_HASH(Row hash): Merge can skip exact repeats, but changed rows become new rows and identical source rows collapse into one. The destination must support row-hash merging. Explicit Append still appends.
pipelines init includes keyless_object_handling in its generated config and explains both options in the companion reference file. For a new pipeline, omitted or null values become UUID; other values are rejected. Set the desired value in the config passed to pipelines create.
To change an existing pipeline, save this JSON as keyless-policy.json:
{
"keyless_object_handling": "ROW_HASH"
}
Then apply it:
supaflow pipelines edit <pipeline-id-or-api-name> --config keyless-policy.json
This merges into the saved config and preserves other fields. Omitting the field from an unrelated edit keeps its current value; explicitly setting it to null selects UUID. Create and edit reject an unsupported Row hash choice before saving.
Changing between Generate UUID and Row hash requests a reset and full reload for affected tables on their next scheduled or manually started sync. Saving does not start a sync. Tables loaded with Append from the same source read may also be reset. Destination-only history will be lost. Review the reset behavior and affected-table warnings before editing.
The bundled stdio MCP server includes the policy in its prepared config and config_summary. For guided creation, set it in config_patch on pipelines_create_from_plan. Direct stdio MCP create/edit tools accept a config_file with the same JSON. Hosted MCP accepts the field in config for direct creation and config_patch for guided creation or editing.
Run a Local Agent
Deploy a private agent on your own machine or server with one command. The agent executes your pipelines inside your network. Agent versions that support Save error files for debugging keep rejected-row files on the agent by default; enabling the setting permits those files to be sent to Supaflow. Older agents do not enforce this setting.
supaflow agent start
The command checks its dependencies first (Docker installed and running, about 5 GB of free disk, agent image availability), then either enrolls a new agent -- issuing a registration token behind the scenes and asking whether to approve the agent for jobs -- or resumes an existing one. A restarted or recreated agent keeps its identity, so it reconnects in seconds without a new token or re-approval.
| Command | What it does |
|---|---|
supaflow agent start | Enroll a new agent or resume an existing one |
supaflow agent upgrade | Pull and install a newer image while preserving the agent identity and keystore volume (CLI 0.5.0+) |
supaflow agent stop | Stop the agent container (identity preserved) |
supaflow agent status | Container state plus lifecycle, connectivity, and last heartbeat |
supaflow agent logs | Agent container logs (-f to follow) |
supaflow agent remove | Remove the container; --purge also deletes the identity so the next start enrolls fresh |
agent start defaults to supaflow/supaflow-agent:latest and refuses to replace an existing container that uses a different image. In CLI 0.5.0+, use agent upgrade for image changes. The upgrade pulls and validates the requested image before stopping the current container, preserves its bootstrap URL and identity volume, checks that the replacement starts, and attempts to restore the previous immutable image if startup fails.
An upgrade briefly interrupts the local agent because its container is replaced. Use --name for a non-default container, --image for a specific image, and --no-pull only when that image already exists on the host. Legacy containers without a saved SUPAFLOW_API_URL require an explicit --api-url.
Enrolling requires an API key created by an organization admin. To re-enroll after revoking an agent, run supaflow agent remove --purge first, then supaflow agent start. For the wizard-based deployment and production guidance, see Agents.
Help and Documentation
# Global help
supaflow --help
# Help for a specific command group
supaflow pipelines --help
# Help for a subcommand
supaflow pipelines create --help
# Connector-specific documentation
supaflow docs <connector>
supaflow docs --list
Common Flags
These flags work across most commands:
| Flag | Description |
|---|---|
--json | Output results as JSON |
--workspace <name> | Override the selected workspace for this command |
CLI vs Claude Code Plugin
| Use case | Recommended tool |
|---|---|
| Shell scripts and automation | CLI directly |
| CI/CD pipelines | CLI directly |
| Guided, interactive workflows | Claude Code plugin |
| First-time setup with guardrails | Claude Code plugin |
The Claude Code plugin uses the CLI under the hood. It adds guardrailed slash commands, parser contracts, and confirmation gates to prevent common AI agent failure modes.
Further Reading
- Build a Custom Connector to build and test your own integration on a private agent
- Full CLI reference on npm
- Claude Code plugin for AI-powered pipeline management