Skip to main content

OffCall AI Command Line Interface - Manage incidents, alerts, and deployments from your terminal

Project description

OffCall CLI

Command-line interface for OffCall AI - the AI-powered observability and incident management platform.

Installation

pip install offcall-cli

Quick Start

# Configure with your API key
offcall configure

# List open incidents
offcall incidents list --status=open

# Check who's on-call
offcall oncall who

# Notify about a deployment
offcall deploy notify --service=api --version=1.2.3

Commands

Incidents

# List incidents
offcall incidents list
offcall incidents list --status=open --severity=critical

# Show incident details
offcall incidents show INCIDENT_ID

# Acknowledge an incident
offcall incidents ack INCIDENT_ID

# Resolve an incident
offcall incidents resolve INCIDENT_ID

Alerts

# List alerts
offcall alerts list
offcall alerts list --severity=high

# Acknowledge an alert
offcall alerts ack ALERT_ID

On-Call

# Who is currently on-call?
offcall oncall who

# List schedules
offcall oncall schedule

Deployments

# Notify about a deployment (for CI/CD integration)
offcall deploy notify \
  --service=api \
  --version=1.2.3 \
  --environment=production \
  --commit=abc123 \
  --message="Fix login bug" \
  --branch=main

# List recent deployments
offcall deploy list --service=api

Hosts

# List hosts
offcall hosts list
offcall hosts list --status=inactive

# Show host details
offcall hosts show HOST_ID

Logs

# Search logs
offcall logs search "error"
offcall logs search "timeout" --service=api --level=error --last=1h

Services

# List services
offcall services list

Configuration

API Key

Configure your API key:

offcall configure

Or use environment variables:

export OFFCALL_API_KEY=your_api_key
export OFFCALL_API_URL=https://api.offcallai.com/api/v1  # optional

Multiple Profiles

Use different profiles for different environments:

# Configure staging profile
offcall --profile=staging configure

# Use staging profile
offcall --profile=staging incidents list

Config File

Configuration is stored in ~/.offcall/config.yaml:

default:
  api_url: https://api.offcallai.com/api/v1
  api_key: ofc_xxxxxxxxxxxx

staging:
  api_url: https://staging-api.offcallai.com/api/v1
  api_key: ofc_staging_key

CI/CD Integration

GitHub Actions

- name: Notify OffCall of deployment
  run: |
    pip install offcall-cli
    offcall deploy notify \
      --service=${{ github.repository }} \
      --version=${{ github.sha }} \
      --commit=${{ github.sha }} \
      --branch=${{ github.ref_name }}
  env:
    OFFCALL_API_KEY: ${{ secrets.OFFCALL_API_KEY }}

GitLab CI

notify_deployment:
  script:
    - pip install offcall-cli
    - offcall deploy notify --service=$CI_PROJECT_NAME --version=$CI_COMMIT_SHA
  variables:
    OFFCALL_API_KEY: $OFFCALL_API_KEY

Jenkins

pipeline {
    environment {
        OFFCALL_API_KEY = credentials('offcall-api-key')
    }
    stages {
        stage('Notify') {
            steps {
                sh 'pip install offcall-cli'
                sh 'offcall deploy notify --service=${JOB_NAME} --version=${BUILD_NUMBER}'
            }
        }
    }
}

Output Formats

The CLI uses rich formatting for terminal output. For machine-readable output in scripts, pipe to jq or similar tools.

Requirements

  • Python 3.8+
  • Works on Linux, macOS, and Windows

License

MIT License - see LICENSE for details.

Links

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

offcall_cli-1.0.0.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

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

offcall_cli-1.0.0-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file offcall_cli-1.0.0.tar.gz.

File metadata

  • Download URL: offcall_cli-1.0.0.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for offcall_cli-1.0.0.tar.gz
Algorithm Hash digest
SHA256 cd2e0de19678add2ec633425082afeddf09791450ddce1b53a7badabf9f40f8e
MD5 b0db69e77aea9ccebccfbbe6cb9d8755
BLAKE2b-256 6281677eb3cc0c706d409567c67df14e70118332df13ac56cf520c3ab4cb1bea

See more details on using hashes here.

File details

Details for the file offcall_cli-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: offcall_cli-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 12.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for offcall_cli-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 98c2ebbc4581d2a3ffd4fc10fca000921719a2ac2a442fc6f639b38b6ca822b5
MD5 76e3b8d4231eafeb05402c13efcf2199
BLAKE2b-256 75c9b1710320aaba940b0fd1b04f980488c7811af3f43bdc2cb44ca0516ce6cc

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