Rafter CLI
Project description
rafter-cli
A Python CLI for Rafter Security that supports pip package management.
Installation
# Using pip
pip install rafter-cli
# Using pipx (recommended for CLI tools)
pipx install rafter-cli
Quick Start
# Set your API key
export RAFTER_API_KEY="your-api-key-here"
# Run a security scan
rafter run
# Get scan results
rafter get <scan-id>
# Check API usage
rafter usage
Commands
rafter run [options]
Trigger a new security scan for your repository.
Options:
-r, --repo <repo>- Repository in formatorg/repo(default: auto-detected)-b, --branch <branch>- Branch name (default: auto-detected)-k, --api-key <key>- API key (or setRAFTER_API_KEYenv var)-f, --format <format>- Output format:jsonormd(default:json)--skip-interactive- Don't wait for scan completion--quiet- Suppress status messages
Examples:
# Basic scan with auto-detection
rafter run
# Scan specific repo/branch
rafter run --repo myorg/myrepo --branch feature-branch
# Non-interactive scan
rafter run --skip-interactive
rafter get <scan-id> [options]
Retrieve results from a completed scan.
Options:
-k, --api-key <key>- API key (or setRAFTER_API_KEYenv var)-f, --format <format>- Output format:jsonormd(default:json)--interactive- Poll until scan completes--quiet- Suppress status messages
Examples:
# Get scan results
rafter get <scan-id>
# Wait for scan completion
rafter get <scan-id> --interactive
rafter usage [options]
Check your API quota and usage.
Options:
-k, --api-key <key>- API key (or setRAFTER_API_KEYenv var)
Example:
rafter usage
Configuration
Environment Variables
RAFTER_API_KEY- Your Rafter API key (alternative to--api-keyflag)
Git Auto-Detection
The CLI automatically detects your repository and branch from the current Git repository:
- Repository: Extracted from Git remote URL
- Branch: Current branch name, or
main
Note: The CLI only scans remote repositories, not your current local branch.
Documentation
For comprehensive documentation, API reference, and examples, see https://docs.rafter.so.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rafter_cli-0.1.0.tar.gz.
File metadata
- Download URL: rafter_cli-0.1.0.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2c74946435eae269aa4765520eb1d2362bb3fd87e4d30bd16c396f14c4338f6
|
|
| MD5 |
b3a4ba1757b4c53dcec0b70b5144c5c0
|
|
| BLAKE2b-256 |
c8f7419f2210dca6abba71fc4dba0dca2e5214a6c1888ae6a87bcf2b3b4dc3bf
|
File details
Details for the file rafter_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: rafter_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aab0ab2817dad5edd1623683e3d1e6527f6bf6546e3af52e9f8c5d4089fdb510
|
|
| MD5 |
c5f9daee0ad0b4fc3811ab199ed5ec5a
|
|
| BLAKE2b-256 |
f217128e26e5f1020d1d06fc4198694c931cd18dc13e53beda8501200fdeeb5f
|