Commands
The CLI outputs JSON by default. These global flags can be placed before a command:
| Flag | Description |
|---|---|
--api-key <key> |
Override the API key for headless auth |
--endpoint <url> |
Override the superglue API endpoint |
--table |
Human-readable table output (default: JSON) |
--full |
Disable truncation of large fields |
Run sg <command> --help to inspect the exact interface installed locally.
Authentication
Section titled “Authentication”sg login
Section titled “sg login”Authenticate the CLI through the browser. Stores an OAuth session in ~/.superglue/auth.json.
sg loginsg login --no-browsersg 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) |
sg logout
Section titled “sg logout”Remove the stored OAuth session from ~/.superglue/auth.json.
sg logoutNo flags.
sg whoami
Section titled “sg whoami”Show the authenticated user and organization.
sg whoamiNo flags.
sg init
Section titled “sg init”Legacy API-key setup for headless environments. Prefer sg login.
sg init| Flag | Description |
|---|---|
--web-endpoint <url> |
Web endpoint for OAuth callbacks |
--output-mode <mode> |
stdout or stdout+file (default: stdout) |
--output-dir <dir> |
Output directory for stdout+file mode (default: .superglue/output) |
--global |
Save config globally (~/.superglue/) instead of locally |
--preset <preset> |
runner, builder, or admin (default: admin) |
sg update
Section titled “sg update”Update the CLI to the latest version.
sg updatesg update --check| Flag | Description |
|---|---|
--check |
Only check for updates without installing |
sg skill
Section titled “sg skill”Print the skill reference (SKILL.md) for AI agents, or a specific topic reference.
sg skillsg skill postgressg skill integrationTakes an optional positional topic argument. Available topics: superglue-info, integration, http, graphql, postgres, mssql, odbc, redis, mongodb, sftp-smb, file-handling, access-rules.
Tool commands
Section titled “Tool commands”sg tool build
Section titled “sg tool build”Build a new tool from a config file or individual flags.
sg tool build --config tool.jsonsg 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.
sg tool run
Section titled “sg tool run”Execute a draft, saved tool, or inline config.
sg tool run --tool my-tool --payload '{"userId": "123"}'sg tool run --draft abc123sg 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 |
--timeout <ms> |
Per-request timeout; minimum 1000ms |
Exactly one of --tool, --draft, --config, or --config-file is required.
sg tool edit
Section titled “sg tool edit”Edit a tool or draft using JSON Patch operations (RFC 6902).
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.
sg tool save
Section titled “sg tool save”Persist a draft to the server.
sg tool save --draft abc123sg 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) |
sg tool list
Section titled “sg tool list”List all saved tools.
sg tool listsg 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) |
sg tool find
Section titled “sg tool find”Search tools by query or look up by exact ID.
sg tool find "user data"sg tool find --id my-toolsg tool find --id my-tool --fields instruction,inputSchemasg 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 keyword search across tool IDs, names, and instructions.
System commands
Section titled “System commands”sg system create
Section titled “sg system create”Create a new system.
sg system create --config system.jsonsg 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 |
--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.
To categorize a system, include a tags string array in the JSON passed with --config. Tags are metadata only; commands always use the exact system ID.
sg system edit
Section titled “sg system edit”Edit an existing system.
sg system edit --id my-api --url https://api-v2.example.comsg 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 |
sg system list
Section titled “sg system list”List all systems.
sg system list| Flag | Description |
|---|---|
--limit <n> |
Max results (default: 25) |
--offset <n> |
Skip the first N results (default: 0) |
sg system find
Section titled “sg system find”Search systems by query or look up by exact ID.
sg system find "payment"sg system find --id my-api| Flag | Description |
|---|---|
--id <exactId> |
Exact system ID lookup |
sg system call
Section titled “sg system call”Make an authenticated call through a system (HTTP API, database, or file server).
sg system call --url https://api.example.com/users --system-id my-apisg system call --url https://api.example.com/users --method POST --body '{"name":"Jane"}' --system-id my-apisg system call --url postgres://host/db --system-id my-db --body '{"query":"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 |
--timeout <ms> |
Per-request timeout; minimum 1000ms |
--file <key=path> |
File reference (repeatable) |
--continue-on-error |
Return a failed response envelope instead of exiting non-zero |
sg system credentials
Section titled “sg system credentials”Manage the current user’s credential set for a system.
sg system credentials get --system-id my-apisg system credentials set --system-id my-api --credentials '{"api_key":"sk-..."}'sg system credentials clear --system-id my-api| Subcommand | Description |
|---|---|
get |
List secret names, whether each has a value, and the corresponding runtime placeholders |
set |
Set the current user’s secret values from --credentials <json> (required) |
clear |
Clear the current user’s credential set for the system |
get never returns secret values.
Common flags:
| Flag | Description |
|---|---|
--system-id <id> |
System ID — required |
sg system search-docs
Section titled “sg system search-docs”Search a system’s scraped documentation.
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 |
sg system oauth
Section titled “sg system oauth”Authenticate a system via OAuth.
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 |
MCP commands
Section titled “MCP commands”Manage named MCP servers that expose selected saved tools.
sg mcp list
Section titled “sg mcp list”List named MCP servers.
sg mcp list| Flag | Description |
|---|---|
--limit <n> |
Max results (default: 25) |
--offset <n> |
Skip the first N results (default: 0) |
sg mcp find
Section titled “sg mcp find”Search MCP servers by query, name, or exact ID.
sg mcp find "sales"sg mcp find --id server_abc123sg mcp find --name sales-tools| Flag | Description |
|---|---|
--id <exactId> |
Exact MCP server ID lookup |
--name <serverName> |
Exact MCP server name lookup |
sg mcp create
Section titled “sg mcp create”Create a named MCP server for selected saved tools.
sg mcp create --name sales-tools --tool get_customer --tool create_invoicesg mcp create --name sales-tools --tools get_customer,create_invoice --auth-mode oauthsg 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 |
sg mcp edit
Section titled “sg mcp edit”Edit a named MCP server.
sg mcp edit --id server_abc123 --add-tool refund_invoicesg mcp edit --id server_abc123 --remove-tool create_invoicesg 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) |
Schedule commands
Section titled “Schedule commands”Manage cron schedules for saved tools.
sg schedule list
Section titled “sg schedule list”List tool schedules.
sg schedule listsg 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) |
sg schedule create
Section titled “sg schedule create”Create a schedule for a saved tool.
sg schedule create --tool my-tool --cron "0 9 * * *" --timezone Europe/Berlinsg 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 |
sg schedule edit
Section titled “sg schedule edit”Edit, enable, or disable an existing schedule.
sg schedule edit --tool my-tool --id sched_abc123 --disabledsg 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 |
Run commands
Section titled “Run commands”sg run list
Section titled “sg run list”List recent tool execution runs.
sg run listsg run list --tool my-tool --status success --limit 20sg 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) |
sg run get
Section titled “sg run get”Get details of a specific run.
sg run get run_abc123sg run get run_abc123 --fetch-resultsTakes a positional runId argument.
| Flag | Description |
|---|---|
--fetch-results |
Include complete run data (alias for --full) |
sg run download
Section titled “sg run download”Download file artifacts produced by a run.
sg run download run_abc123sg run download run_abc123 report.csv --output-dir ./downloadsTakes a positional runId and an optional fileKey argument.
| Flag | Description |
|---|---|
--output-dir <path> |
Target directory (default: .) |