Skip to main content

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 format org/repo (default: auto-detected)
  • -b, --branch <branch> - Branch name (default: auto-detected)
  • -k, --api-key <key> - API key (or set RAFTER_API_KEY env var)
  • -f, --format <format> - Output format: json or md (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 set RAFTER_API_KEY env var)
  • -f, --format <format> - Output format: json or md (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 set RAFTER_API_KEY env var)

Example:

rafter usage

Configuration

Environment Variables

  • RAFTER_API_KEY - Your Rafter API key (alternative to --api-key flag)

Git Auto-Detection

The CLI automatically detects your repository and branch from the current Git repository:

  1. Repository: Extracted from Git remote URL
  2. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rafter_cli-0.1.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rafter_cli-0.1.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

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

Hashes for rafter_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e2c74946435eae269aa4765520eb1d2362bb3fd87e4d30bd16c396f14c4338f6
MD5 b3a4ba1757b4c53dcec0b70b5144c5c0
BLAKE2b-256 c8f7419f2210dca6abba71fc4dba0dca2e5214a6c1888ae6a87bcf2b3b4dc3bf

See more details on using hashes here.

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

Hashes for rafter_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aab0ab2817dad5edd1623683e3d1e6527f6bf6546e3af52e9f8c5d4089fdb510
MD5 c5f9daee0ad0b4fc3811ab199ed5ec5a
BLAKE2b-256 f217128e26e5f1020d1d06fc4198694c931cd18dc13e53beda8501200fdeeb5f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page