Skip to content

Commands

The CLI outputs JSON by default. Add --table for human-readable output and --full to disable truncation on any command.

Authenticate the CLI through the browser. Stores an OAuth session in auth.json.

Terminal window
sg login
sg login --no-browser
sg login --save-config --global
Flag Description
--web-endpoint <url> superglue web app endpoint
--no-browser Print the login URL instead of opening a browser
--save-config Persist endpoint settings to config.json
--global Save endpoint config globally (~/.superglue/config.json)

Remove the stored OAuth session from auth.json.

Terminal window
sg logout

No flags.

Show the authenticated user and organization.

Terminal window
sg whoami

No flags.


Legacy API-key setup for headless environments. Prefer sg login.

Terminal window
sg init
Flag Description
--web-endpoint <url> Web endpoint for OAuth callbacks
--output-dir <dir> Output directory for stdout+file mode (default: .superglue/output)
--global Save config globally (~/.superglue/) instead of locally

Update the CLI to the latest version.

Terminal window
sg update
sg update --check
Flag Description
--check Only check for updates without installing

Print the skill reference (SKILL.md) for AI agents, or a specific topic reference.

Terminal window
sg skill
sg skill postgres
sg skill integration

Takes an optional positional topic argument. Available topics: superglue-info, integration, http, graphql, postgres, mssql, redis, sftp-smb, file-handling, access-rules.


Build a new tool from a config file or individual flags.

Terminal window
sg tool build --config tool.json
sg tool build --id my-tool --instruction "Fetch user data" --steps steps.json
Flag Description
--config <file> JSON config file or inline JSON
--id <id> Tool ID (kebab-case)
--instruction <text> Human-readable tool instruction
--steps <file> JSON file containing steps array
--output-transform <code> JS output transform function
--output-schema <file> JSON file for output schema
--payload <json> Sample payload JSON
--file <key=path> File reference (repeatable)

Provide either --config or --id + --instruction + --steps.

Execute a draft, saved tool, or inline config.

Terminal window
sg tool run --tool my-tool --payload '{"userId": "123"}'
sg tool run --draft abc123
sg tool run --config '{"id":"inline","instruction":"...","steps":[...]}'
sg tool run --config-file tool.json --payload-file payload.json
Flag Description
--tool <id> Saved tool ID
--draft <id> Draft ID from build
--config <json> Inline tool config JSON
--config-file <path> Tool config JSON file
--payload <json> JSON payload
--payload-file <path> JSON payload file
--file <key=path> File reference (repeatable)
--include-step-results Include raw step results in output
--include-config Include full tool config in output

Exactly one of --tool, --draft, --config, or --config-file is required.

Edit a tool or draft using JSON Patch operations (RFC 6902).

Terminal window
sg tool edit --tool my-tool --patches '[{"op":"replace","path":"/instruction","value":"New instruction"}]'
sg tool edit --draft abc123 --patches patches.json
Flag Description
--tool <id> Saved tool ID
--draft <id> Draft ID
--patches <json-or-file> JSON Patch array (inline or file path) — required

One of --tool or --draft is required. Editing a saved tool creates a new draft.

Persist a draft to the server.

Terminal window
sg tool save --draft abc123
sg tool save --draft abc123 --id custom-tool-id
Flag Description
--draft <id> Draft ID — required
--id <customId> Custom ID for the saved tool (defaults to the draft’s tool ID)

List all saved tools.

Terminal window
sg tool list
sg tool list --limit 50 --offset 50
Flag Description
--limit <n> Max results (default: 25, max: 100)
--offset <n> Skip the first N results (default: 0)

Search tools by query or look up by exact ID.

Terminal window
sg tool find "user data"
sg tool find --id my-tool
sg tool find --id my-tool --fields instruction,inputSchema
sg tool find
Flag Description
--id <exactId> Exact tool ID lookup
--fields <fields> Comma-separated top-level fields to return (requires --id)

When called with no arguments or *, lists all tools. Otherwise performs a semantic search.


Create a new system.

Terminal window
sg system create --config system.json
sg system create --name "My API" --url https://api.example.com --credentials '{"apiVersion":"v2"}'
sg system create --name "My API" --template stripe
Flag Description
--config <file> JSON config file
--id <id> System ID (derived from --name if omitted)
--name <name> Human-readable name — required unless using --config or --template
--url <url> API URL — required unless using --config or --template
--template <id> Template ID — auto-fills URL, OAuth config, and credentials. Auto-detected from URL if omitted
--instructions <text> Specific instructions
--credentials <json> Credentials JSON, including secret values when needed
--authentication <json> Authentication config JSON
--docs-url <url> Documentation URL to scrape after creation
--openapi-url <url> OpenAPI spec URL to fetch after creation
--env <environment> dev or prod (default: prod)

--name and --url must be present in the system definition — provide them as flags, include them in --config, or let --template auto-fill both. --id is derived from --name if omitted.

Edit an existing system.

Terminal window
sg system edit --id my-api --url https://api-v2.example.com
sg system edit --id my-api --credentials '{"api_key":"new-key"}'
sg system edit --id my-api --scrape-url https://docs.example.com --scrape-keywords "auth endpoints"
Flag Description
--id <id> System ID — required
--name <name> New name
--url <url> New URL
--instructions <text> New instructions
--credentials <json> Credentials JSON to merge
--authentication <json> Authentication config JSON
--scrape-url <url> Documentation URL to scrape
--scrape-keywords <keywords> Space-separated scrape keywords
--env <environment> dev or prod

List all systems.

Terminal window
sg system list
sg system list --mode dev
Flag Description
--mode <mode> Filter by environment: dev, prod, or all (default: all)
--limit <n> Max results (default: 25)
--offset <n> Skip the first N results (default: 0)

Search systems by query or look up by exact ID.

Terminal window
sg system find "payment"
sg system find --id my-api
sg system find --id my-api --env prod
Flag Description
--id <exactId> Exact system ID lookup
--env <environment> dev or prod

Make an authenticated call through a system (HTTP API, database, or file server).

Terminal window
sg system call --url https://api.example.com/users --system-id my-api
sg system call --url https://api.example.com/users --method POST --body '{"name":"Jane"}' --system-id my-api
sg system call --url postgres://host/db --system-id my-db --body "SELECT * FROM users LIMIT 5"
Flag Description
--url <url> Full URL including protocol — required
--system-id <id> System ID for credential injection
--method <method> HTTP method (default: GET)
--headers <json> HTTP headers JSON
--body <string> Request body
--file <key=path> File reference (repeatable)
--continue-on-error Return a failed response envelope instead of exiting non-zero
--env <environment> dev or prod

Manage the current user’s credentials for systems configured with credentialOwnership: "user".

Terminal window
sg system credentials get --system-id my-api
sg system credentials set --system-id my-api --credentials '{"api_key":"sk-..."}'
sg system credentials clear --system-id my-api
Subcommand Description
get Get current user’s credentials for a user-owned system. Values are masked unless --reveal is passed
set Set current user’s credentials from --credentials <json> (required)
clear Delete current user’s credentials

Common flags:

Flag Description
--system-id <id> System ID — required
--env <environment> dev or prod

Search a system’s scraped documentation.

Terminal window
sg system search-docs --system-id my-api --keywords "authentication oauth"
Flag Description
--system-id <id> System ID — required
-k, --keywords <keywords> Search keywords — required

Authenticate a system via OAuth.

Terminal window
sg system oauth --system-id my-api --scopes "read write"
sg system oauth --system-id my-api --scopes "read" --grant-type client_credentials
Flag Description
--system-id <id> System ID — required
--scopes <scopes> Space-separated OAuth scopes; defaults to system/template value
--auth-url <url> OAuth authorization URL (defaults to system/template value)
--token-url <url> OAuth token URL (defaults to system/template value)
--grant-type <type> authorization_code (default) or client_credentials
--env <environment> dev or prod

Manage named MCP servers that expose selected saved tools.

List named MCP servers.

Terminal window
sg mcp list
Flag Description
--limit <n> Max results (default: 25)
--offset <n> Skip the first N results (default: 0)

Search MCP servers by query, name, or exact ID.

Terminal window
sg mcp find "sales"
sg mcp find --id server_abc123
sg mcp find --name sales-tools
Flag Description
--id <exactId> Exact MCP server ID lookup
--name <serverName> Exact MCP server name lookup

Create a named MCP server for selected saved tools.

Terminal window
sg mcp create --name sales-tools --tool get_customer --tool create_invoice
sg mcp create --name sales-tools --tools get_customer,create_invoice --auth-mode oauth
sg mcp create --config mcp-server.json
Flag Description
--config <file-or-json> MCP server config file or inline JSON
--name <name> URL-safe server name
--display-name <name> Human-readable display name
--description <text> Description
--auth-mode <mode> oauth (default) or creator_api_key
--tool <id> Saved tool ID to expose (repeatable)
--tools <ids> Comma-separated saved tool IDs to expose

Edit a named MCP server.

Terminal window
sg mcp edit --id server_abc123 --add-tool refund_invoice
sg mcp edit --id server_abc123 --remove-tool create_invoice
sg mcp edit --id server_abc123 --tools get_customer,create_invoice
Flag Description
--id <id> MCP server ID — required
--config <file-or-json> Partial MCP server config file or inline JSON
--name <name> New URL-safe server name
--display-name <name> New human-readable display name
--clear-display-name Clear the display name
--description <text> New description
--clear-description Clear the description
--auth-mode <mode> oauth or creator_api_key
--tool <id> Replacement saved tool ID (repeatable)
--tools <ids> Replacement comma-separated saved tool IDs
--add-tool <id> Add a saved tool ID (repeatable)
--remove-tool <id> Remove a saved tool ID (repeatable)

Manage cron schedules for saved tools.

List tool schedules.

Terminal window
sg schedule list
sg schedule list --tool my-tool --status active
Flag Description
--tool <id> Filter by tool ID
--status <status> Filter by status: active, inactive, or all (default: all)
--limit <n> Max results (default: 25)
--offset <n> Skip the first N results (default: 0)

Create a schedule for a saved tool.

Terminal window
sg schedule create --tool my-tool --cron "0 9 * * *" --timezone Europe/Berlin
sg schedule create --tool my-tool --cron "0 * * * *" --timezone UTC --payload '{"limit":100}'
Flag Description
--tool <id> Saved tool ID to schedule — required
--cron <expression> 5-field cron expression — required
--timezone <name> IANA timezone (e.g. UTC, Europe/Berlin) — required
--disabled Create the schedule disabled
--payload <json> JSON object payload passed to each scheduled run
--payload-file <path> JSON file payload passed to each scheduled run
--options <json-or-file> Request options JSON object or file path
--options-file <path> Request options JSON file
--webhook-url <url> Webhook URL called after successful execution
--tool-chain <toolId> Tool ID to run after successful execution
--retries <n> Retry count, 0-10
--timeout <ms> Request timeout in milliseconds

Edit, enable, or disable an existing schedule.

Terminal window
sg schedule edit --tool my-tool --id sched_abc123 --disabled
sg schedule edit --tool my-tool --id sched_abc123 --cron "0 12 * * *"
Flag Description
--tool <id> Saved tool ID that owns the schedule — required
--id <id> Schedule ID — required
--cron <expression> New 5-field cron expression
--timezone <name> New IANA timezone
--enabled Enable the schedule
--disabled Disable the schedule
--payload <json> Replacement JSON object payload
--payload-file <path> Replacement JSON payload file
--options <json-or-file> Replacement request options JSON object or file path
--options-file <path> Replacement request options JSON file
--clear-options Replace request options with an empty object
--webhook-url <url> Set webhook URL called after successful execution
--tool-chain <toolId> Set tool ID to run after successful execution
--clear-webhook Remove webhook/tool-chain success action from options
--retries <n> Set retry count, 0-10
--timeout <ms> Set request timeout in milliseconds

List recent tool execution runs.

Terminal window
sg run list
sg run list --tool my-tool --status success --limit 20
sg run list --source cli,sdk --user user_123
Flag Description
--tool <id> Filter by tool ID
--status <status> Filter by status: running, success, failed, aborted
--source <sources> Comma-separated request sources
--user <userId> Filter by user ID
--system-id <id> Filter by system ID
--limit <n> Max results (default: 10, max: 50)
--offset <n> Skip the first N results (default: 0)

Get details of a specific run.

Terminal window
sg run get run_abc123
sg run get run_abc123 --fetch-results

Takes a positional runId argument.

Flag Description
--fetch-results Include complete run data (alias for --full)

Download file artifacts produced by a run.

Terminal window
sg run download run_abc123
sg run download run_abc123 report.csv --output-dir ./downloads

Takes a positional runId and an optional fileKey argument.

Flag Description
--output-dir <path> Target directory (default: .)