Skip to main contentSkip to navigation
Back to Home
Guardrail
Installation Guide

Install Guardrail

Get Guardrail running on your machine in under a minute. Choose your preferred installation method below.

Select Your Platform

npm / pnpm / yarn

Install globally via your preferred package manager

# Using npm
npm install -g @guardrail/cli
# Using pnpm
pnpm add -g @guardrail/cli
# Using yarn
yarn global add @guardrail/cli

Verify Installation

After installation, verify that Guardrail is working correctly:

# Check version
guardrail --version

# Run help
guardrail --help

# Initialize in your project
cd your-project
guardrail init

Authentication (Optional)

For cloud features, team collaboration, and enhanced scanning, authenticate with your Guardrail account:

# Login to your Guardrail account
guardrail auth login

# Or set your API key directly
export GUARDRAIL_API_KEY=your_api_key_here

# Verify authentication
guardrail auth status

Note: Basic scanning works without authentication. Sign up for a free account at theguardrail.dev to unlock team features and cloud dashboards.