Skip to main content

Monitor GitHub CI workflows, fetch logs, and track build status

Project description

CI Monitor

CI Monitor is a command-line tool that lets AI agents and humans instantly access GitHub CI status, logs, and failure details without leaving the terminal.

Eliminates Copy-Paste Development - No more copying error messages from GitHub's web interface. Agents can directly access CI failures, logs, and status updates through a simple command-line interface.

Universal Agent Compatibility - Works with any AI coding assistant (Claude Code, Cursor, etc.) that can run terminal commands.

Automated CI Debugging with Claude Code

# Single command to investigate and fix your active branch's CI failures
claude "Use cimonitor to watch my PR's CI. If the tests fail, fix and push. \
Notify me when finished or if you can't solve the problem. Think hard."

# Auto-retry flaky tests and get notified only for real failures
cimonitor watch --pr 123 --retry 3 | claude \
  "Monitor this output. If tests still fail after retries, analyze the logs and notify me with a summary of the real issues."

This powerful combination lets you:

  • Stay Focused: No need to monitor job status and engage with an agent if you see a failure—let the agent do the waiting
  • Fix Real Issues: Claude Code automatically parses CI logs, identifies root causes, implements fixes, and pushes solutions
  • Handle Flaky Tests: Auto-retry failing jobs up to N times, only getting notified if failures persist

Installation

pip install cimonitor
export GITHUB_TOKEN="your_github_token_here"

How to generate a token:

  1. Visit https://github.com/settings/tokens,
  2. "Generate new token" -> "Generate new token (classic)"
  3. Check "repo" and "workflow"
  4. Generate the token and export it as an environment variable as shown above

Usage

# Check CI status
cimonitor status                    # Current branch
cimonitor status --pr 123          # Specific PR
cimonitor status --commit abc1234  # Specific commit

# Get error logs
cimonitor logs                      # Current branch (filtered logs)
cimonitor logs --pr 123            # PR logs
cimonitor logs --raw               # Raw unfiltered logs
cimonitor logs --job-id 12345678   # Specific job logs

# Watch CI progress
cimonitor watch                     # Watch current branch
cimonitor watch --until-complete   # Wait for completion
cimonitor watch --until-fail       # Stop on first failure
cimonitor watch --retry 3          # Auto-retry failed jobs up to 3 times

Command Reference

Main Command

Usage: cimonitor [OPTIONS] COMMAND [ARGS]...

  CI Monitor - Monitor GitHub CI workflows, fetch logs, and track build
  status.

Options:
  --version  Show the version and exit.
  --help     Show this message and exit.

Commands:
  logs    Show error logs for failed CI jobs.
  status  Show CI status for the target commit/branch/PR.
  watch   Watch CI status with real-time updates.

cimonitor status

Usage: cimonitor status [OPTIONS]

  Show CI status for the target commit/branch/PR.

Options:
  --pr, --pull-request INTEGER  Pull request number to check
  --commit TEXT                 Specific commit SHA to check
  --branch TEXT                 Specific branch to check (defaults to current
                                branch)
  -v, --verbose                 Show verbose output
  --help                        Show this message and exit.

cimonitor logs

Usage: cimonitor logs [OPTIONS]

  Show error logs for failed CI jobs.

Options:
  --pr, --pull-request INTEGER  Pull request number to check
  --commit TEXT                 Specific commit SHA to check
  --branch TEXT                 Specific branch to check (defaults to current
                                branch)
  -v, --verbose                 Show verbose output
  --raw                         Show complete raw logs (for debugging)
  --job-id INTEGER              Show logs for specific job ID only
  --help                        Show this message and exit.

cimonitor watch

Usage: cimonitor watch [OPTIONS]

  Watch CI status with real-time updates.

Options:
  --pr, --pull-request INTEGER  Pull request number to check
  --commit TEXT                 Specific commit SHA to check
  --branch TEXT                 Specific branch to check (defaults to current
                                branch)
  -v, --verbose                 Show verbose output
  --until-complete              Wait until all workflows complete
  --until-fail                  Stop on first failure
  --retry COUNT                 Auto-retry failed jobs up to COUNT times
  --help                        Show this message and exit.

What Agents Can Do

Instant CI Diagnosis - Check any commit, branch, or PR for failures and get structured output perfect for programmatic analysis.

Real-Time Monitoring - Use watch --until-complete to watch CI progress live, watch --until-fail for fail-fast workflows, or watch --retry N to automatically retry failed jobs and filter out flaky test failures.

Targeted Debugging - Get step-level failure details and filtered error logs without downloading massive raw logs.

Multi-Branch Operations - Seamlessly check CI status across different branches, PRs, and commits in automated workflows.

License

MIT License - see LICENSE file for details.

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

cimonitor-0.1.6.tar.gz (60.8 kB view details)

Uploaded Source

Built Distribution

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

cimonitor-0.1.6-py3-none-any.whl (22.9 kB view details)

Uploaded Python 3

File details

Details for the file cimonitor-0.1.6.tar.gz.

File metadata

  • Download URL: cimonitor-0.1.6.tar.gz
  • Upload date:
  • Size: 60.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for cimonitor-0.1.6.tar.gz
Algorithm Hash digest
SHA256 600ec5bae05db0f2d15e21eeecaca70e089830d4884bf05aa3faffd25f9783f3
MD5 1c84f232eb82432052ea7e19027905d0
BLAKE2b-256 0e614e45b0e7a0ffac9c698306f40811e1670c8c6f83890ebe3d03fb3996af1d

See more details on using hashes here.

Provenance

The following attestation bundles were made for cimonitor-0.1.6.tar.gz:

Publisher: pypi.yml on irskep/cimonitor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cimonitor-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: cimonitor-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 22.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for cimonitor-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 1bff7dbce871991731a755692778d4812ac47199348cbbbba7990522f35288a4
MD5 1573fb9c778fa057f139e85613801f3d
BLAKE2b-256 d58ebdbb3d060d148f0198862b86ffa3189020bc7aa76fddcd734c491938cc1d

See more details on using hashes here.

Provenance

The following attestation bundles were made for cimonitor-0.1.6-py3-none-any.whl:

Publisher: pypi.yml on irskep/cimonitor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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