Skip to main content

Get started in three steps

1

Install the CLI

Install the Rafter security CLI using your preferred package manager.
npm install -g @rafter-security/cli
Python 3.10+ required for pip installs. Verify your version:
python3 --version   # Must be 3.10 or higher
On Ubuntu/Debian, Python and pip may not be installed by default:
sudo apt update && sudo apt install -y python3 python3-pip python3-venv
On Fedora/RHEL: sudo dnf install python3 python3-pip. macOS: brew install python. Windows: install from python.org — pip is included.
Verify the install worked:
rafter --version
2

Get your API key

Sign up and grab your API key from your account page.
Your API key starts with RF and should be kept secure. Never commit it to version control (e.g. GitHub). Use environment variables instead.
3

Start your first scan

Navigate to a Git repository, then run:
cd /path/to/your/repo
rafter run --api-key "RFabc-your-api-key-here" --format md
Or set the key as an environment variable and skip the flag:
export RAFTER_API_KEY="RFabc-your-api-key-here"
cd /path/to/your/repo
rafter run --format md
The CLI auto-detects your repository and branch from Git, then displays scan results in your terminal.
rafter scan is an alias for rafter run — use whichever you prefer. Add --mode plus (or -m plus) for deeper analysis with additional agent passes beyond the default fast scan.

What’s happening?

When you run rafter run, the CLI will:
  1. Auto-detect your repository and branch from Git
  2. Upload your code securely to Rafter’s scanning engine from Github
  3. Scan for vulnerabilities, secrets, and security issues
  4. Delete your code from Rafter’s scanning engine
  5. Display results directly in your terminal
The CLI only scans remote repositories, not your current local branch. Make sure your changes are pushed to the remote repository before scanning.

Bonus: Saving Results to a File

To run a scan and save the results to a file, you can use the following command:
rafter run --api-key "RFabc-your-api-key-here" --format md > security-report-$(date +%Y-%m-%d-%H-%M-%S).md

Next Steps

Want to know more about how we scan? See our handbook for detailed information about our scanning technology and security coverage.