Skip to main content

Installation

Install MutagenT tools for your development environment. The CLI is the primary developer interface for MutagenT. It handles authentication, framework integration, and trace management.
bun add -g @mutagent/cli

Verify Installation

mutagent --version
# @mutagent/cli v0.1.30

Authenticate

After installing, log in to connect the CLI to your MutagenT account. The CLI presents two authentication methods interactively: browser-based OAuth or pasting an API key.
mutagent auth login
You can also specify the authentication method directly:
# Browser-based OAuth flow
mutagent auth login --browser

# Direct API key (for CI/CD pipelines)
mutagent auth login --browser
Check your authentication status at any time:
mutagent auth status
For CI/CD environments, set the MUTAGENT_API_KEY environment variable (no login needed). The CLI also respects CI=true and MUTAGENT_NON_INTERACTIVE=true to auto-select browser auth.
See CLI Documentation for full details.

SDK (Optional)

The TypeScript SDK (@mutagent/sdk v0.2.65) is for advanced or programmatic use cases — direct API access, custom integrations, or scripting.
bun add @mutagent/sdk

Verify SDK Installation

import { Mutagent } from '@mutagent/sdk';

const client = new Mutagent({
  apiKey: process.env.MUTAGENT_API_KEY,
});

// SDK is ready to use
console.log('MutagenT SDK installed successfully');

Integration Packages

Most developers use integration packages that auto-trace LLM framework calls. Install the one matching your framework.
bun add @mutagent/langchain
You do not need to install integration packages manually if you use mutagent integrate. The CLI generates the integration code and tells you which package to install.

Environment Variables

VariablePurposeDefault
MUTAGENT_API_KEYAPI key for authentication (SDK and CLI)
MUTAGENT_ENDPOINTCustom API endpointhttps://api.mutagent.io
MUTAGENT_NON_INTERACTIVESet to true to skip interactive promptsfalse

System Requirements

RequirementVersion
Node.js18.0+
Bun1.0+
TypeScript5.0+ (recommended)