Skip to content

Repository files navigation

GitHub Quick Access for Alfred

A powerful Alfred workflow for navigating GitHub at the speed of thought. Fuzzy-search your repos, open pull requests, browse actions, dispatch workflows — all from your keyboard.

Features

  • Fuzzy repo search — Type gh my to find repos matching "my" (e.g., my-app, my-api, my-docs)
  • Quick navigation — Jump to any repo's PRs, issues, actions, wiki, branches, tags, releases, or settings
  • Actions deep-dive — Browse a repo's GitHub Actions workflows and filter them
  • Workflow dispatch — Trigger workflow_dispatch workflows on any branch directly from Alfred
  • Smart commands — Quick access to your PRs, issues, notifications, gists, profile, and stars
  • Caching — Repos and workflows are cached for 7 days for instant results
  • Tab completion — When multiple repos match, Tab drills into the selected repo
  • Repo preferences — Alfred remembers which repo you prefer for ambiguous filters

Requirements

  • Alfred 5 with Powerpack
  • gh CLI installed and authenticated (gh auth login)
  • jq installed (brew install jq)

Installation

  1. Download the latest .alfredworkflow file from Releases
  2. Double-click to install in Alfred
  3. Optionally set your GitHub username in the workflow configuration (auto-detected from gh if left empty)

Usage

Basic Commands

Command Action
gh Show all commands and repos
gh pr Open your GitHub pull requests
gh pr me Open PRs created by you
gh pr review Open PRs requesting your review
gh issues Open your GitHub issues
gh notif Open notifications
gh gists Open your gists
gh profile Open your GitHub profile
gh stars Open your starred repos
gh refresh Clear all caches and re-fetch

Repo Navigation

Command Action
gh <filter> Fuzzy search repos, Enter opens in browser
gh <filter> pr Open the repo's Pull Requests tab
gh <filter> pr me Open the repo's PRs filtered by you
gh <filter> issues Open the repo's Issues tab
gh <filter> a Browse the repo's GitHub Actions workflows

Supported subcommands: pr, issues, a/act/actions, wiki, settings, b/branches, t/tags, releases, projects, security, insights

Modifier Keys on Repos

Modifier Action
Enter Open repo in browser
Cmd+Enter Open repo's issues
Alt+Enter Open repo's pull requests
Ctrl+Enter Copy SSH clone URL to clipboard

Actions Mode

Actions mode lets you browse and dispatch GitHub Actions workflows:

Command Action
gh my-app act List repos matching "my-app" — Tab to drill into workflows
gh my-app act dep Filter workflows by "dep" (e.g., "Deploy")
gh my-app act dep feat/login Dispatch the Deploy workflow on branch feat/login

How it works:

  1. gh <repo-filter> act — Shows matching repos. Press Tab on the one you want to browse its workflows. Press Enter to set it as your preferred repo for this filter and open its /actions page.
  2. gh <repo-filter> act <workflow-filter> — Uses your preferred repo (or top match) and filters its workflows.
  3. gh <repo-filter> act <workflow-filter> <branch> — If the workflow filter matches exactly one workflow and the last word doesn't match any workflow, it becomes a branch name for dispatch.

How Filtering Works

The workflow uses substring matching — all words in your query must appear somewhere in the repo name, owner, or description. Examples:

  • gh my → matches "my-app", "my-api", "my-docs", etc.
  • gh my ap → matches "my-app" and "my-api" (both "my" and "ap" match)
  • gh react nat → matches "react-native-app" (both words are substrings)

Caching

  • Repos are cached for 7 days, refreshed in the background
  • Workflows are cached per-repo for 7 days, fetched on demand when you enter actions mode
  • Username is auto-detected from gh CLI and cached
  • Use gh refresh to clear everything and re-fetch

Extending

Add new quick commands by editing commands.json in the workflow directory. Each entry needs:

{
  "uid": "gh-your-command",
  "title": "Command Title",
  "subtitle": "Description shown in Alfred",
  "arg": "https://github.com/your-url",
  "match": "keywords for fuzzy matching"
}

Use {username} in arg to reference the configured GitHub username.

How It Works

Alfred → gh_workflow.sh (Script Filter) → action.sh (Router) → Open URL / Dispatch / Copy
  • gh_workflow.sh — Main script filter. Parses the query, loads cached data, and outputs Alfred JSON.
  • action.sh — Handles special actions: refresh cache, copy to clipboard, dispatch workflow, save repo preferences.
  • commands.json — Extensible quick commands (PRs, issues, notifications, etc.).
  • Caches live in ~/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.github.quick-access/.

Troubleshooting

"No results found" / "Setup needed: no repositories cached"

This usually means the background repo fetch failed. The workflow writes detailed diagnostics to a debug log:

~/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.github.quick-access/debug.log

You can open it directly from Alfred — when the cache is empty, type gh and select "View debug log", or open the file from Finder.

Common errors and fixes:

Log message Fix
gh binary not found or not executable Install the GitHub CLI: brew install gh
gh is not authenticated Run gh auth login in your terminal
Personal repos fetched: 0 Check that gh repo list works in your terminal
jq failed to merge results Install jq: brew install jq

Reading the log:

Each fetch attempt is timestamped. A healthy fetch looks like:

[2026-04-28 19:12:14] Fetch started. GH_BIN=/opt/homebrew/bin/gh JQ_BIN=/opt/homebrew/bin/jq PATH=...
[2026-04-28 19:12:16] Personal repos fetched: 36
[2026-04-28 19:12:16] Orgs found: my-org other-org
[2026-04-28 19:12:19] Cache written: 153 repos

If you see ERROR: ... lines, those tell you exactly what went wrong. Run gh refresh after fixing the issue to retry the fetch.

Force-refresh the cache:

Type gh refresh in Alfred — this clears all caches (repos, workflows, username) and re-fetches on the next query.

Reset everything:

rm -rf ~/Library/Caches/com.runningwithcrayons.Alfred/Workflow\ Data/com.github.quick-access/

Sharing a debug log

If you're reporting an issue, attach the contents of debug.log (it doesn't contain secrets — just paths, timestamps, and error messages from gh/jq).

License

MIT

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages