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.1.tar.gz (14.0 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.1-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: offcall_cli-1.0.1.tar.gz
  • Upload date:
  • Size: 14.0 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.1.tar.gz
Algorithm Hash digest
SHA256 40c8dd12cc28f83887bbd68a5cb23e5cf8c8cadbdf38f26eb29e410605f99b48
MD5 734444a6df58d7fa0c9ebe21f0a4e964
BLAKE2b-256 df62a1d17b0661e5fcc500c65e8ff929456aba2d4558f52f1cf1924fbf03e56b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: offcall_cli-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 12.5 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 89b0f5f839acbb514982d02e2bf661fedb22b7404dd9d363a0f63cb614db87f7
MD5 f2192749a60dd53580720a95977462bb
BLAKE2b-256 95dd92049384af53ab060fe230cfa0cb49765c948dbadb34a48f2e4aecc800d7

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