Skip to content
Lucas edited this page Mar 7, 2026 · 21 revisions

GH-Workflow-Clean

gh-actions-cleanup is a terminal-first macOS cleanup tool with two delivery modes:

  • a native macOS GUI app
  • the original CLI engine

Current release: 0.0.7

What It Does

  • checks GitHub CLI authentication status first
  • lets you choose the GitHub host and authenticated account to use
  • lets you choose the target repository or paste a full GitHub repo URL
  • disables GitHub Actions workflows
  • deletes workflow runs
  • deletes Actions artifacts
  • deletes Actions caches
  • remembers the last host, account, and repo you used without storing any tokens or secrets
  • keeps the CLI as the source of truth, with the native GUI running the CLI under the hood

Quick Links

Quick Start

From any Mac:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/WayneTechLab/GH-Workflow-Clean/main/install.sh)"
gh auth login -h github.com
gh-actions-cleanup

Installer behavior:

  • the bootstrap installer resolves the latest tagged release before downloading
  • the CLI installs everywhere GitHub CLI is available
  • the native GUI app is built automatically when the local Mac has a Swift toolchain
  • if Swift is missing, the installer falls back to CLI-only and tells you how to add the GUI later
  • when possible, the native app installs into /Applications; otherwise it falls back to ~/Applications
  • older app and CLI copies are removed first so upgrades are clean

Full cleanup:

gh-actions-cleanup --repo OWNER/REPO --all --yes

Safe preview first:

gh-actions-cleanup --repo OWNER/REPO --all --dry-run --yes

Target one leftover run series:

gh-actions-cleanup --repo OWNER/REPO --delete-runs --run-filter "Sync Google Analytics Data" --yes

Target one exact run:

gh-actions-cleanup --repo OWNER/REPO --run "https://github.com/OWNER/REPO/actions/runs/21023858697/workflow" --yes

App launch:

  • open GH Workflow Clean.app from Finder, Spotlight, or Launchpad
  • the native app opens a real macOS window
  • the GUI runs the bundled CLI in the background and streams output into a readable high-contrast log panel
  • the GUI includes buttons to open GitHub login or the raw CLI flow in Terminal when needed
  • the GUI now uses a single-screen high-contrast panel layout with a clear logged-in banner, logout action, repository browser with select-all, and safety arm switch before cleanup can run

Notes

  • Users must authenticate first with gh auth login -h <host>.
  • The CLI uses the selected active GitHub account on the selected host.
  • The GUI uses the same gh login state and the same bundled CLI engine.
  • If multiple accounts are authenticated on one host, it can switch using gh auth switch and restore the prior active account when the session ends.
  • The tool does not embed, print, or save GitHub tokens.
  • The token in use needs repository and workflow access to delete Actions resources.
  • You can target one exact workflow run by numeric ID or GitHub run URL.
  • If the active token is invalid or the GitHub API core rate limit is exhausted, the CLI stops before cleanup and shows the next command to run.
  • The tool stores only the last host, account, and repo in ~/Library/Application Support/GH Workflow Clean/last-session.env.
  • --dry-run is the safest way to confirm intended changes before deleting anything.
  • The native GUI app currently targets macOS 12 or newer.

Official Links

Creator Note

Built by Lucas / SatoshiUNO.

Clone this wiki locally