Skip to main content

CLI Installation

The MutagenT CLI (@mutagent/cli) is available on npm. The current version is 0.1.30.

Install

bun add -g @mutagent/cli

Standalone Binary

You can also build a standalone binary from source that requires no Bun or Node.js runtime. The binary includes all dependencies in a single executable. Available targets: linux-x64, linux-arm64, darwin-x64, darwin-arm64, windows-x64.
# Clone and build the binary for your platform
git clone https://github.com/mutagent/mutagent-monorepo.git
cd mutagent-monorepo
bun install
bun run --cwd mutagent-cli build:binary
# Binary is written to mutagent-cli/dist/mutagent
sudo mv mutagent-cli/dist/mutagent /usr/local/bin/
The standalone binary is ideal for CI/CD environments or air-gapped machines. Cross-compile for a specific target with build:binary:darwin-arm64, build:binary:linux-x64, etc.

Verify Installation

mutagent --version
# Expected output: 0.1.30

Authenticate

Interactive Login

mutagent auth login
This will present authentication options:
  • Browser OAuth (recommended) — opens your browser for secure login
  • API Key — enter your mt_ prefixed API key directly

Non-Interactive Login

For CI/CD pipelines, set the MUTAGENT_API_KEY environment variable (no login step needed):
export MUTAGENT_API_KEY="mt_xxxx"
export MUTAGENT_ENDPOINT="https://api.mutagent.io"
You can also use the --non-interactive flag or set CI=true to suppress interactive prompts and auto-select browser auth:
# Using the flag
mutagent --non-interactive auth login

# Using the CI environment variable
CI=true mutagent auth login

Environment Variables

export MUTAGENT_API_KEY="mt_xxxx"
export MUTAGENT_ENDPOINT="https://api.mutagent.io"
When MUTAGENT_API_KEY and MUTAGENT_ENDPOINT are set, the CLI uses them automatically — no auth login step is needed. This is the recommended pattern for AI agents and CI/CD pipelines.

Check Status

mutagent auth status

System Requirements

RequirementMinimum VersionNotes
Bun>= 1.1.0Recommended runtime for package install
Node.js>= 18.0.0Alternative runtime for package install
OSmacOS, Linux, WindowsSupported platforms
Using the standalone binary? No runtime dependencies are required — it works on any supported OS out of the box.

Supported Binary Platforms

Configuration

The CLI uses a configuration hierarchy (highest to lowest priority):

Configuration File Example

Create .mutagentrc.json in your project:
{
  "endpoint": "https://api.mutagent.io",
  "format": "table",
  "timeout": 30000,
  "ui": {
    "colors": true,
    "verbosity": "info"
  }
}
Or mutagent.config.js:
module.exports = {
  endpoint: 'https://api.mutagent.io',
  format: 'table',
  ui: {
    colors: true,
    progressIndicators: true
  }
};

View Configuration

# List all config
mutagent config list

# Get specific value
mutagent config get apiKey
mutagent config get endpoint

Uninstall

bun remove -g @mutagent/cli
To also remove credentials:
rm -rf ~/.config/mutagent