Skip to content

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.

Terminal window
npm install -g @superglue/cli

Verify the install:

Terminal window
sg --version

Authenticate through the browser:

Terminal window
sg login

This 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:

Terminal window
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.

Both API key and endpoint resolve in this order:

  1. CLI flag (--api-key, --endpoint)
  2. Environment variable (SUPERGLUE_API_KEY, SUPERGLUE_API_ENDPOINT)
  3. Config file / stored OAuth session
  4. Default (endpoint defaults to https://api.superglue.cloud)

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.

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 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)
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 artifacts

Install as a skill for AI coding agents (35+ agents supported):

Terminal window
npx skills add superglue-ai/cli

Or target a specific agent:

Terminal window
npx skills add superglue-ai/cli -g -a cursor
npx skills add superglue-ai/cli -g -a claude-code
npx skills add superglue-ai/cli -g -a codex