The Ranger CLI sets up your project to use Ranger's AI-powered testing tools with Claude Code.
npm install @ranger-testing/ranger-cliThe Ranger CLI sets up your project to use Ranger's AI-powered testing tools with Claude Code.
``bash`
npm install -g @ranger-testing/ranger-cli
Go to dashboard.ranger.net/cli to get your API token.
In your project repo (must be a git repository), run:
`bash`
ranger start
This will guide you through setup. If you skipped any steps, run them manually:
- Add a browser environment for verification:
`bash`
ranger add env local
`
- Install Claude Code skills:
bash`
ranger skillup
`
- Install the Claude Code plugin:
bash`
claude plugin marketplace add ranger-testing/trailhead
claude plugin install ranger@trailhead --scope user
Once set up, here's the typical workflow:
1. Start a Claude Code session in your project
2. In your Claude Code session, run /ranger:enable to activate Ranger/plan
3. Enter plan mode with to begin planning your feature
4. Accept the plan - Ranger tracks your feature automatically
5. Watch Ranger verify your feature in the browser
Ranger stays enabled on your branch across sessions. Use /ranger:disable to turn it off.
Note: Commands starting with / (like /ranger:enable, /plan, /ranger:disable) are slash commands entered inside the Claude Code chat interface. Terminal commands like ranger start are run in your shell.
| Command | Description |
|---------|-------------|
| ranger start | Initialize Ranger in your project |ranger status
| | Show Ranger status and configuration |ranger update
| | Update Ranger CLI to latest version |ranger clean
| | Remove all Ranger artifacts from project |
| Command | Description |
|---------|-------------|
| ranger add env | Add a new browser environment |ranger use
| | Switch to a different environment |ranger env ls
| | List all configured environments |ranger env update
| | Re-capture auth for an environment |
| Command | Description |
|---------|-------------|
| ranger config set | Set a config value |ranger config get
| | Get a config value |ranger config list
| | List all config for an environment |ranger config unset
| | Remove a config value |
Create a new feature with checklist items:
`bash`
ranger feature create "User Authentication" \
--description "Login and signup flows" \
-c "User can log in" \
-c "User can sign up"
`bash`
ranger feature list # All features
ranger feature list --current-branch # Features for current git branch
Verify checklist items in the browser:
`bash
ranger verify-feature \
--item 1 \
--task "Log in with valid credentials and verify redirect to dashboard"
The URL is derived from your active environment's
baseUrl setting. Use --start-path to append a path.Options:
-
--item : Checklist item to verify by index (1-based, required in non-interactive mode)
- --task: Task description (defaults to checklist item description)
- --env: Environment to use (defaults to active environment)
- --start-path: Path to start on (e.g., /dashboard)$3
Configure browser settings for environments:
`bash
ranger config set ci headless true
ranger config set ci userAgent "Mozilla/5.0 (CI Bot)"
ranger config set ci header.Authorization '${AUTH_TOKEN}'
`Environment variables like
${AUTH_TOKEN} are resolved at runtime, not when the config is set.Claude Code Plugin
The
ranger start command attempts to install the plugin automatically. However, installation may be skipped or fail.To install manually:
`bash
claude plugin marketplace add ranger-testing/trailhead
claude plugin install ranger@trailhead --scope user
`Check status with
ranger status.Troubleshooting
"No active environment" error
Run
ranger use to set an active environment.Authentication expired
Run
ranger env update