Installation
The CLI ships as a single native binary — no Node.js or other runtime required.- GitHub Releases (recommended)
- npm
Download the binary for your platform from Releases, extract it, and put
magnet (or magnet.exe on Windows) in your PATH:Authentication
There are two ways to authenticate, depending on whether you’re acting as yourself or as a workspace:- Log in as a user (recommended for local development) —
magnet loginopens your browser and stores a personal CLI token on your machine.
- 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_KEYis set, it takes precedence over a stored login.
magnet whoami.
Environment variables
Commands
All commands output JSON, so they compose well with
jq and scripts.