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-tool
# Using pnpm
pnpm add -g guardrail-cli-tool
# Using yarn
yarn global add guardrail-cli-tool

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 guardrailai.dev to unlock team features and cloud dashboards.