sg init
Interactive setup wizard. Prompts for API key, endpoint, output mode, and config location.sg update
Update the CLI to the latest version.| Flag | Description |
|---|---|
--check | Only check for updates without installing |
Tool Commands
sg tool build
Build a new tool from a config file or individual flags.| 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) |
--config or --id + --instruction + --steps.
sg tool run
Execute a draft, saved tool, or inline config.| 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 |
--no-create-run | Skip creating a run record |
--tool, --draft, --config, or --config-file is required. --no-create-run cannot be used with --tool.
sg tool edit
Edit a tool or draft using JSON Patch operations (RFC 6902).| Flag | Description |
|---|---|
--tool <id> | Saved tool ID |
--draft <id> | Draft ID |
--patches <json-or-file> | JSON Patch array (inline or file path) — required |
--tool or --draft is required.
sg tool save
Persist a draft to the server.| 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
List all saved tools.sg tool find
Search tools by query or look up by exact ID.| Flag | Description |
|---|---|
--id <exactId> | Exact tool ID lookup |
*, lists all tools. Otherwise performs a semantic search.
System Commands
sg system create
Create a new system.| 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 (merges template defaults) |
--instructions <text> | Specific instructions |
--credentials <json> | Non-sensitive credentials JSON |
--sensitive-credentials <fields> | Comma-separated field names (prompted interactively or via SUPERGLUE_CRED_<FIELD> env vars) |
--docs-url <url> | Documentation URL to scrape after creation |
--openapi-url <url> | OpenAPI spec URL to fetch after creation |
--env <environment> | dev or 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.
sg system edit
Edit an existing system.| Flag | Description |
|---|---|
--id <id> | System ID — required |
--name <name> | New name |
--url <url> | New URL |
--instructions <text> | New instructions |
--credentials <json> | Non-sensitive credentials JSON to merge |
--sensitive-credentials <fields> | Comma-separated field names |
--scrape-url <url> | Documentation URL to scrape |
--scrape-keywords <keywords> | Space-separated scrape keywords |
--env <environment> | dev or prod |
sg system list
List all systems.| Flag | Description |
|---|---|
--mode <mode> | Filter by environment: dev, prod, or all (default: all) |
sg system find
Search systems by query or look up by exact ID.| Flag | Description |
|---|---|
--id <exactId> | Exact system ID lookup |
--env <environment> | dev or prod |
sg system call
Make an authenticated call through a system (HTTP API, database, or file server).| 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) |
--env <environment> | dev or prod |
sg system search-docs
Search a system’s scraped documentation.| Flag | Description |
|---|---|
--system-id <id> | System ID — required |
-k, --keywords <keywords> | Search keywords — required |
sg system oauth
Authenticate a system via OAuth.| Flag | Description |
|---|---|
--system-id <id> | System ID — required |
--scopes <scopes> | Space-separated OAuth scopes — required |
--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 |
Run Commands
sg run list
List recent tool execution runs.| 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> | Offset for pagination — converted to a page number as ceil((offset+1)/limit) (default: 0) |
sg run get
Get details of a specific run.runId argument. No additional flags.