Skip to content

feat(gh-aliases): add GitHub CLI aliases plugin #13194

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

3dyuval
Copy link

@3dyuval 3dyuval commented Jul 1, 2025

Summary

Add gh-aliases plugin providing convenient aliases for GitHub CLI commands.

What it does

This plugin adds short, memorable aliases for common GitHub CLI operations:

  • Repository management (clone, create, view, etc.)
  • Issues and pull requests
  • Workflows and releases
  • Authentication and configuration
  • Helper functions for common workflows

Why add this

GitHub CLI has become essential for many developers' workflows. This plugin makes those commands faster to type and easier to remember, similar to how the git plugin provides aliases for git commands.

Examples

ghrc user/repo     # gh repo clone user/repo
ghpc               # gh pr create  
ghil               # gh issue list
ghwl               # gh workflow list

The plugin includes 100+ aliases covering the full GitHub CLI feature set, plus helper functions like ghrc-cd (clone and cd into repo).

3dyuval and others added 3 commits June 30, 2025 11:34
- Add complete documentation for all 100+ aliases and functions
- Include usage examples and workflow demonstrations
- Document helper functions with error handling improvements
- Add standardized $0 handling per Zsh Plugin Standard
- Improve completion setup with error handling
- Enhance function robustness with better error checking

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@ohmyzsh ohmyzsh bot added Area: plugin Issue or PR related to a plugin Topic: alias Pull Request or issue regarding aliases Type: documentation Documentation issue or Pull Request New: plugin Request for a plugin or Pull Request that adds one labels Jul 1, 2025
@ohmyzsh ohmyzsh bot added this to Main project Jul 1, 2025
@github-project-automation github-project-automation bot moved this to Backlog in Main project Jul 1, 2025
@3dyuval
Copy link
Author

3dyuval commented Jul 1, 2025

📚 I've also submitted a corresponding documentation PR to add this plugin to the wiki plugins list: ohmyzsh/wiki#74

@adamchainz
Copy link
Contributor

adamchainz commented Jul 4, 2025

Hi, thanks for your work !

I'm not a big contributor to oh-my-zsh, but I did some work and review for the git plugin.

I would like to ship some gh aliases, too! However, I think we can refine the approach here.

First, you've aliased most of the gh subcommands, but I think we should limit the list to the most popular 10 or so aliases, especially at first. The gh auth login command, for example, is pretty useless, as it only needs to be run once, when setting up gh. I also think most of the shell functions could be removed.

Second, some key aliases are missing, at least gh issue develop --checkout. That's a very neat workflow command for going from issue number to local branch ready to make a PR.

Third, I think placing the aliases in the existing gh plugin would be fine.

@3dyuval
Copy link
Author

3dyuval commented Jul 6, 2025

Yes, thanks! I mostly agree.
It's very personal. I actually have many usecases for ghat, just tody I did this:

docker run -i --rm \
  -e GITHUB_PERSONAL_ACCESS_TOKEN=$(ghat) \
  -e GITHUB_DYNAMIC_TOOLSETS=1 \
  ghcr.io/github/github-mcp-server

Looking at the full plugin, I see an opportunity for customization.
Do you know of any plugins that allows to opt-in/out of features?

@adamchainz
Copy link
Contributor

It's very personal. I actually have many usecases for ghat, just tody I did this:

Yeah, that one seems useful.

Do you know of any plugins that allows to opt-in/out of features?

No, I believe the goal of oh-my-zsh is to provide minimal configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: plugin Issue or PR related to a plugin New: plugin Request for a plugin or Pull Request that adds one Topic: alias Pull Request or issue regarding aliases Type: documentation Documentation issue or Pull Request
Projects
Status: Backlog
Development

Successfully merging this pull request may close these issues.

2 participants