Skip to main content

Installation

Install from npm

npm install -g @useswarm/cli
Or with other package managers:
pnpm add -g @useswarm/cli
yarn global add @useswarm/cli

Verify installation

swarm --version

Authenticate

swarm login
This opens your browser to authorize the CLI with your Swarm account. A device code is displayed in your terminal — confirm it matches in the browser, then click Authorize CLI. Your credentials are stored locally at ~/.config/swarm/config.json and persist across sessions.

Custom API URL

If you’re using a self-hosted or staging instance:
swarm login --api-url https://your-instance.example.com/api

Log out

swarm logout
This removes stored credentials from your machine.

Requirements

  • Node.js 18 or later
  • A Swarm account on the Pro plan or higher
  • For local testing with Cloudflare tunnels: cloudflared binary (install guide)