Get Guardrail running on your machine in under a minute. Choose your preferred installation method below.
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/cliAfter installation, verify that Guardrail is working correctly:
# Check version
guardrail --version
# Run help
guardrail --help
# Initialize in your project
cd your-project
guardrail initFor 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 statusNote: Basic scanning works without authentication. Sign up for a free account at theguardrail.dev to unlock team features and cloud dashboards.