Skip to main content

🚀 OpsHero CLI

Analyze CI/CD pipeline errors from your terminal in <100ms.

Installation

pip install opshero

Quick Start

# Login with GitHub
opshero login

# Analyze an error
opshero analyze "npm ERR! code ENOENT"

# Pipe from your CI/CD
npm test 2>&1 | opshero analyze

# View history
opshero history

# Search patterns
opshero patterns search docker

Features

  • ⚡ Ultra-fast analysis - <100ms for 85% of errors
  • 🎯 100+ patterns - Docker, Node.js, Python, Git, K8s, tests
  • 🤖 AI fallback - Groq LLM for unknown errors
  • 📊 History tracking - All analyses saved and searchable
  • 🔄 Sync - Access from CLI, dashboard, or API
  • 🌐 Offline mode - Local pattern matching

Commands

Authentication

opshero login          # Login with GitHub
opshero logout         # Logout
opshero whoami         # Show current user

Analysis

opshero analyze TEXT                    # Analyze error text
opshero analyze --file error.log        # Analyze from file
echo "error" | opshero analyze          # Pipe input
opshero analyze --language nodejs      # With context

History

opshero history                # List all analyses
opshero history --last 10      # Last 10 analyses
opshero history show ID        # Show details
opshero history search docker  # Search in history

Patterns

opshero patterns list                  # List all patterns
opshero patterns list --category docker # Filter by category
opshero patterns show ID               # Show pattern details
opshero patterns search "permission"   # Search patterns

Contributions

opshero contribute pattern             # Submit new pattern
opshero contribute list                # My contributions
opshero contribute status ID           # Check status

Sync

opshero sync analyses    # Sync analyses from cloud
opshero sync patterns    # Sync patterns
opshero sync all         # Sync everything

Configuration

opshero config show                           # Show config
opshero config set api_url https://api...    # Set value
opshero config reset                          # Reset to defaults

Examples

Analyze npm Error

$ opshero analyze "npm ERR! code ENOENT"

✅ Analysis Complete (47ms)

Pattern Matched: npm_missing_file
Confidence: 95%

Problem:
  npm cannot find a required file or module

Solutions:
  1. npm install (confidence: 95%)
     Install missing dependencies
     
  2. Check package.json (confidence: 80%)
     Verify all dependencies are listed
     
  3. Clear cache (confidence: 60%)
     npm cache clean --force && npm install

Pipe from CI/CD

# In your CI/CD script
npm test 2>&1 | opshero analyze

# Or with Docker
docker build . 2>&1 | opshero analyze

Search History

$ opshero history search docker

Found 5 analyses:

1. docker_permission_denied (2 days ago)
   Status: Resolved
   
2. docker_build_failed (1 week ago)
   Status: Resolved
   
...

Configuration

Config file: ~/.config/opshero/config.json

{
  "api_url": "https://api.opshero.me",
  "cache_enabled": true,
  "offline_mode": false
}

Environment Variables

OPSHERO_API_URL      # Override API URL
OPSHERO_TOKEN        # Auth token (set by login)
OPSHERO_OFFLINE      # Enable offline mode

Development

# Clone repo
git clone https://github.com/your-org/opshero.git
cd opshero/cli

# Install in editable mode
pip install -e .

# Run tests
pytest

# Lint
ruff check .

License

MIT License - see LICENSE file for details

Support

Metadata

Release files for opshero 0.2.0

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

Source distribution (sdist)

Source distribution for opshero 0.2.0
File Size Uploaded Provenance Actions
opshero-0.2.0.tar.gz 81.2 kB Without provenance Details for opshero-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for opshero 0.2.0
File Interpreter ABI Platform Actions
opshero-0.2.0-py3-none-any.whl Python 3 none any Details for opshero-0.2.0-py3-none-any.whl

Total release size: 180.7 kB

Release files / opshero-0.2.0.tar.gz

Download URL opshero-0.2.0.tar.gz
Size 81.2 kB
Tags Source
SHA-256 checksum
How to use checksums
322fadedcb9d497c72d770ba54f4cdadfe12765c2b50713b00bb499420ba623e
BLAKE2b-256 checksum
How to use checksums
931af93608af3dfc00d614c5f08d053d51dbd2f49517e06c65a3f59fea398f02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / opshero-0.2.0-py3-none-any.whl

Download URL opshero-0.2.0-py3-none-any.whl
Size 99.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6094220c1dd53ac125be6a514922c58d41f1c96122c5642693dd5b665c3bdf69
BLAKE2b-256 checksum
How to use checksums
776bce034039c88d2c3bdb11af82cebefd01c8647cbd1633146d7afea70b5ddf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Security for opshero 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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