Skip to main content

CLI Integration Setup

Use the Squasher CLI when you want an agent or local script to kick off integration setup without hunting through the dashboard.

Squasher CLI Agent Skill

Install the squasher-cli skill so coding assistants use the right CLI command names and auth flow.

What the command does

  • Opens a browser-backed Squasher OAuth flow.
  • Prompts you to sign in first if your Squasher session is missing.
  • Connects the provider account.
  • Optionally saves the project integration before returning control to the CLI.

Commands

Authenticate the CLI itself with your Squasher account:
That opens a browser, signs you into Squasher if needed, and stores an OAuth session using the configured credentials backend. Use device-code login when the CLI is running over SSH, inside a container, in a remote development environment, or anywhere the local browser callback is not reachable:
The CLI prints a URL and a short code:
Open the URL on a device with a browser, enter the code, approve the request, and the CLI finishes the OAuth login. If you prefer the old manual flow for CI or local scripts, API keys still work:
Connect provider integrations after the CLI is signed in:
squasher oauth ... works as an alias for the same flow.

Credential storage

New CLI installs default to credentials_store: "auto" in ~/.squasher/config.json. In auto mode, Squasher stores API keys and OAuth access/refresh tokens in the OS keyring when available:
  • macOS: Keychain
  • Windows: Credential Manager
  • Linux: Secret Service, such as GNOME Keyring or KWallet
If the OS keyring is unavailable, auto falls back to the local config file and prints a warning. Existing installs that do not already have credentials_store set keep the file backend until you opt in. To choose a backend explicitly, edit ~/.squasher/config.json:
Supported values:
  • auto: use the OS keyring when available, otherwise fall back to ~/.squasher/config.json.
  • keyring: require the OS keyring and fail if it cannot be reached.
  • file: keep credentials in ~/.squasher/config.json, protected as 0600 on Unix.
Run squasher config to see which backend is active. Run squasher logout to clear both the OS keyring entry and local config credentials.

Profiles and active project

Save the project you use most often so agents can omit repetitive --project flags:
Use profiles when you switch between teams, projects, or API endpoints:
--api-key-env saves only the environment variable name in the profile. Keep the API key itself in your shell, CI secret store, or secrets manager and inject it when the CLI runs. This lets two profiles use different project-scoped keys without writing either key into the profile definition. When a profile has --api-key-env, that variable takes precedence over the legacy shared SQUASHER_API_KEY and stored login. If the selected variable is missing or empty, the command fails instead of silently authenticating with another profile’s key. Profiles without --api-key-env keep the existing SQUASHER_API_KEY, OAuth, and stored-key behavior. Profile updates preserve omitted project, URL, and key-selector fields. Remove one explicitly with --clear-project, --clear-api-url, --clear-app-url, or --clear-api-key-env. For example, configure two project boundaries using placeholder variable names:
Do not put the exports or resolved key values in a tracked file. API-key profiles still cannot perform per-user mutations; use squasher login for those operations. --project and SQUASHER_PROJECT_ID still override the active project for one command.

Examples

Connect GitHub only:
Connect GitHub and link a repo to a project:
Connect Linear and save a team on a project:
Connect Slack and save a channel on a project:
Install Railway and bind a project in one flow:
Install Vercel and bind a project in one flow:

Agent-friendly behavior

  • The CLI waits on a loopback callback and exits only after Squasher confirms success or failure.
  • Successful runs write the connected account and saved integration target into ~/.squasher/config.json.
  • If the browser cannot be opened automatically, the CLI prints the exact URL to open.
  • If the local callback or browser launch is not available, the CLI can fall back to squasher login --device-code.
  • Squasher validates provider-specific setup fields from the same provider metadata returned by GET /v1/integrations/providers.