Skip to main content
The Magnet CLI lets you work with your Magnet workspace from the terminal: list and create issues and pages, search, link directories to workspaces, and register custom sandbox images.

Installation

The CLI ships as a single native binary — no Node.js or other runtime required.
Verify the installation:

Authentication

There are two ways to authenticate, depending on whether you’re acting as yourself or as a workspace:
  1. Log in as a user (recommended for local development) — magnet login opens your browser and stores a personal CLI token on your machine.
  1. Workspace API key (recommended for CI and scripts) — create an API key in your Magnet workspace settings and set it as an environment variable. When MAGNET_API_KEY is set, it takes precedence over a stored login.
Check which identity the CLI is using with magnet whoami.

Environment variables

Commands

All commands output JSON, so they compose well with jq and scripts.