Overview
The superglue CLI (sg) lets you build, run, and manage integration tools and MCP servers from the terminal. It connects to your superglue instance (cloud or self-hosted) and supports both interactive and scriptable workflows.
Installation
Section titled “Installation”npm install -g @superglue/cliVerify the install:
sg --versionAuthenticate through the browser:
sg loginThis opens your superglue web app to authorize the CLI and stores an OAuth session in auth.json. Check who you are with sg whoami, and sign out with sg logout.
For headless environments (CI, servers, agents), set environment variables instead:
export SUPERGLUE_API_KEY="your-api-key"export SUPERGLUE_API_ENDPOINT="https://api.superglue.cloud"The legacy sg init wizard is still available for API-key setup in headless TTY environments, but sg login is the recommended path.
Configuration Resolution
Section titled “Configuration Resolution”Both API key and endpoint resolve in this order:
- CLI flag (
--api-key,--endpoint) - Environment variable (
SUPERGLUE_API_KEY,SUPERGLUE_API_ENDPOINT) - Config file / stored OAuth session
- Default (endpoint defaults to
https://api.superglue.cloud)
Output Format
Section titled “Output Format”The CLI outputs JSON by default (and always in non-TTY environments), so it is safe to pipe into scripts and agents. Use --table for human-readable tables and --full to disable truncation of large fields.
Global Flags
Section titled “Global Flags”These flags work with any command:
| Flag | Description |
|---|---|
--api-key <key> |
Override API key for headless auth |
--endpoint <url> |
Override API endpoint |
--table |
Human-readable table output (default: JSON) |
--full |
Disable truncation of large fields |
-V, --version |
Print CLI version |
-h, --help |
Show help |
Presets
Section titled “Presets”Presets restrict which commands are available. Set via the SUPERGLUE_CLI_PRESET environment variable (default: admin).
| Preset | Access |
|---|---|
runner |
Run saved tools by ID only (agent-safe, read-only) |
builder |
Runner + build/edit tools, call systems, manage MCP servers (no system CRUD) |
admin |
Full access (default) |
Command Structure
Section titled “Command Structure”sg├── login Authenticate through the browser├── logout Remove the stored OAuth session├── whoami Show authenticated user and organization├── init Legacy API-key setup (headless)├── update Update CLI├── skill Print skill reference for AI agents├── tool│ ├── build Build a tool from config│ ├── run Execute a tool│ ├── edit Edit via JSON Patch│ ├── save Persist a draft│ ├── list List saved tools│ └── find Search tools├── system│ ├── create Create a system│ ├── edit Edit a system│ ├── list List systems│ ├── find Search systems│ ├── credentials Manage current user's system credentials│ ├── call Make authenticated calls│ ├── search-docs Search system docs│ └── oauth OAuth authentication├── mcp│ ├── list List named MCP servers│ ├── find Search MCP servers│ ├── create Create a named MCP server│ └── edit Edit a named MCP server├── schedule│ ├── list List schedules│ ├── create Create a cron schedule│ └── edit Edit a schedule└── run ├── list List execution runs ├── get Get run details └── download Download run file artifactsAI Agent Integration
Section titled “AI Agent Integration”Install as a skill for AI coding agents (35+ agents supported):
npx skills add superglue-ai/cliOr target a specific agent:
npx skills add superglue-ai/cli -g -a cursornpx skills add superglue-ai/cli -g -a claude-codenpx skills add superglue-ai/cli -g -a codex