Skip to main content

ProdSensor CLI

Command-line tool for running ProdSensor production readiness analysis in CI/CD pipelines.

Installation

pip install prodsensor-cli

Quick Start

  1. Get an API key from prodsensor.com/app
  2. Set up authentication:
# Option 1: Environment variable (recommended for CI/CD)
export PRODSENSOR_API_KEY=ps_live_your_key_here

# Option 2: Save to config file
prodsensor config set-key ps_live_your_key_here
  1. Run an analysis:
prodsensor analyze https://github.com/your-org/your-repo

Commands

analyze

Analyze a repository for production readiness.

# Basic usage
prodsensor analyze https://github.com/owner/repo

# With JSON output
prodsensor analyze https://github.com/owner/repo --format json

# Start analysis without waiting
prodsensor analyze https://github.com/owner/repo --no-wait

# Custom timeout (10 minutes)
prodsensor analyze https://github.com/owner/repo --timeout 600

# Only fail on blockers (not warnings)
prodsensor analyze https://github.com/owner/repo --fail-on blockers

status

Check the status of an analysis run.

prodsensor status <run-id>
prodsensor status <run-id> --format json

report

Get the full analysis report.

prodsensor report <run-id>
prodsensor report <run-id> --format json
prodsensor report <run-id> --format markdown
prodsensor report <run-id> --format json -o report.json

config

Manage CLI configuration.

# Save API key
prodsensor config set-key ps_live_your_key

# Remove saved API key
prodsensor config clear-key

# Show current configuration
prodsensor config show

Exit Codes

The CLI uses exit codes that work with CI/CD pipelines:

Code Meaning
0 PRODUCTION_READY
1 NOT_PRODUCTION_READY
2 CONDITIONALLY_READY
3 API/Network error
4 Authentication error
5 Timeout

CI/CD Integration

GitHub Actions

- name: Run ProdSensor Analysis
  env:
    PRODSENSOR_API_KEY: ${{ secrets.PRODSENSOR_API_KEY }}
  run: |
    pip install prodsensor-cli
    prodsensor analyze https://github.com/${{ github.repository }}

Or use the dedicated GitHub Action:

- uses: prodsensor/action@v1
  with:
    api-key: ${{ secrets.PRODSENSOR_API_KEY }}

GitLab CI

production-readiness:
  script:
    - pip install prodsensor-cli
    - prodsensor analyze https://gitlab.com/$CI_PROJECT_PATH
  variables:
    PRODSENSOR_API_KEY: $PRODSENSOR_API_KEY

Jenkins

pipeline {
    environment {
        PRODSENSOR_API_KEY = credentials('prodsensor-api-key')
    }
    stages {
        stage('Production Readiness') {
            steps {
                sh 'pip install prodsensor-cli'
                sh 'prodsensor analyze ${GIT_URL}'
            }
        }
    }
}

Environment Variables

Variable Description
PRODSENSOR_API_KEY API key for authentication
PRODSENSOR_API_URL Custom API URL (for self-hosted)

Output Formats

Summary (default)

Human-readable summary with verdict, score, and findings count.

JSON

Full report data as JSON, suitable for parsing in scripts.

Markdown

Report formatted as markdown, suitable for PR comments.

License

MIT

Metadata

Release files for prodsensor-cli 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for prodsensor-cli 1.0.1
File Size Uploaded
prodsensor_cli-1.0.1.tar.gz 9.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for prodsensor-cli 1.0.1
File Interpreter ABI Platform
prodsensor_cli-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 20.4 kB

Release files / prodsensor_cli-1.0.1.tar.gz

Download URL prodsensor_cli-1.0.1.tar.gz
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ad764c6bc29499f3498427f0afe325618dc7853101769fb87fb3c1b9636e0f13
BLAKE2b-256 checksum
How to use checksums
03336205bc4ae90dc08d7c3a21d9cf5b52a84c1993c907d9bce0618ac464a236
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / prodsensor_cli-1.0.1-py3-none-any.whl

Download URL prodsensor_cli-1.0.1-py3-none-any.whl
Size 11.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b459a6fa5e952700db16ddd85e83ad470d66d07a97ce6c144a675adda8ff9521
BLAKE2b-256 checksum
How to use checksums
8aba14ca1a4461bbe61594b69c46566d6b08f47b715966c37b098c054aaa3d98
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page