Skip to main content
The StackOne CLI (@stackone/cli) provides commands for building, validating, testing, and deploying custom connectors.

Full Documentation

Complete CLI documentation on npm

Installation

npm install -g @stackone/cli

Command Reference

Agent Commands

Configure the StackOne MCP server for AI coding assistants like Claude, Cursor, and Windsurf.
CommandDescription
stackone agent setup --globalConfigure MCP tools globally in ~/.stackone
stackone agent setup --localConfigure MCP tools for current project only
stackone agent cleanupRemove stored credentials and configuration
# Global setup - configures MCP server for all projects (recommended)
stackone agent setup --global

# Project-scoped setup - configures MCP server for current directory
stackone agent setup --local

# Remove all API keys and credentials
stackone agent cleanup
Use --global setup when you want the StackOne MCP tools available across all your projects. Use --local for project-specific configurations.

Connector Development

CommandDescription
stackone validate <path>Validate connector YAML syntax and structure
stackone runExecute a connector action locally for testing
# Validate with watch mode
stackone validate ./my-connector/ --watch

# Run an action with local credentials
stackone run \
  --connector my-connector.connector.s1.yaml \
  --account account.json \
  --credentials credentials.json \
  --action-id list_employees \
  --debug

# Run with parameters
stackone run \
  --connector my-connector.connector.s1.yaml \
  --account account.json \
  --credentials credentials.json \
  --action-id get_employee \
  --params params.json

# Run custom action code (for testing action definitions)
stackone run \
  --connector my-connector.connector.s1.yaml \
  --account-id acme-corp-provider \
  --action ./custom-action.yaml

# Save output to file
stackone run \
  --connector my-connector.connector.s1.yaml \
  --account-id acme-corp-provider \
  --action-id list_employees \
  --output-file results.json
Test file formats:
{
  "environment": "production",
  "provider": "provider_name"
}
Faster iteration: Once your connector is pushed or an account is already linked, skip the credentials file and use --account-id instead:
stackone run \
  --connector my-connector.connector.s1.yaml \
  --account-id acme-corp-provider \
  --action-id list_employees
This uses stored credentials from the linked account, making it easier to iterate on action logic without managing local credential files.Note: Using --account-id requires an API key with connectors:read scope.

Deployment

Deployment commands require an API key with Connectors scopes. See API Keys to generate one.
CommandDescriptionRequired Scope
stackone push <path>Upload connector to StackOne registryconnectors:write
stackone pullDownload connector files to local filesystemconnectors:read
stackone drop <provider@version>Delete a connector version from registryconnectors:write
stackone getRetrieve connector configuration (YAML or JSON output)connectors:read
# Push using saved profile
stackone push ./my-connector/ --profile prod

# Push with API key directly
stackone push ./my-connector/ --api-key v1.eu1.xxxxx

# Pull connector files to local directory
stackone pull --connector my_provider --output ./connectors/

# Pull specific version
stackone pull --connector [email protected] --output ./connectors/

# Get connector config as YAML (default)
stackone get --connector my_provider

# Get connector config from a linked account
stackone get --account-id acme-corp-provider --format json --output-file config.json

Configuration

CommandDescription
stackone initConfigure authentication profiles interactively
stackone versionShow version with update check
stackone updateUpdate CLI to latest version
# Interactive setup (prompts for profile name and API key)
stackone init

# Setup for different environments
stackone init --env staging
stackone init --env production

# Check version and available updates
stackone version

# Update to latest version
stackone update

Environment Variables

VariableDescription
STACKONE_AGENT_MCP_TOKENMCP server access token (set by agent setup)
API keys are passed via --api-key flag or stored in your profile configuration, not as environment variables.

Next Steps