TECHNOLOGY

Dlvhdr/gh-speed: An resplendent CLI dashboard for GitHub

✨ A GitHub (gh) CLI extension to indicate a dashboard with pull requests and disorders by filters you care about.

Latest Release

  • 🌅 entirely configurable – outline sections the usage of github filters
  • 🔍 survey every prs and disorders
  • 📝 customise columns with hidden, width and develop props
  • ⚡️ act on prs and disorders with checkout, comment, start, merge, diff, etc…
  • ⌨️ put of residing personalized actions with new keybindings
  • 💅 spend personalized topics
  • 🔭 study particulars just a few pr/scenario with an intensive sidebar
  • 🪟 write just a few configuration files to without considerations change between entirely diversified dashboards
  • ♻️ put of residing an interval for auto refreshing the dashboard
  1. Set up the gh CLI – study the installation

    Set up requires a minimum version (2.0.0) of the the GitHub CLI that helps extensions.

  2. Set up this extension:

    gh extension install dlvhdr/gh-speed
  3. To rep the icons to render wisely you ought to nonetheless fetch and install a Nerd font from https://www.nerdfonts.com/.
    Then, settle that font as your font for the terminal.

Installing Manually

If that you simply must install this extension manually, apply these steps:

  1. Clone the repo

    # git
    git clone https://github.com/dlvhdr/gh-speed
    
    # GitHub CLI
    gh repo clone dlvhdr/gh-speed
  2. Cd into it

  3. Invent it

  4. Set up it in the neighborhood

How make I rep these actual colors and font?

I am the usage of Alacritty with the tokyonight theme and the Fira Code Nerd Font.
For my plump setup test out my dotfiles.

Spin

Then press ? for help.

Spin gh speed --help for more information:

Usage:
  gh speed [flags]

Flags:
  -c, --config string   spend this configuration file (default is $GH_DASH_CONFIG, or if now no longer put of residing, $XDG_CONFIG_HOME/gh-speed/config.yml)
      --debug           passing this flag will enable writing debug output to debug.log
  -h, --help            help for gh-speed

A part is outlined by a:

  • title – proven in the TUI
  • filters – how the repo’s PRs ought to nonetheless be filtered – these are straightforward github filters

All configuration is supplied within a config.yml file below the extension’s itemizing (either $XDG_CONFIG_HOME/gh-speed or ~/.config/gh-speed/ or your OS config dir) or $GH_DASH_CONFIG.

An instance config.yml file contains:

🗃 Working with a diversified config file

You would dart gh speed --config to dart gh-speed in opposition to one more config file.

This lets you without considerations outline just a few dashboards with diversified sections.


It shall be precious ought to you may presumably should agree with a 🧳 work and 👩‍💻 private dashboards, or ought to that you simply must study just a few dashboards at the same time.

Outline your have personalized keybindings to dart bash instructions the usage of Prance Templates.
Right here’s readily accessible for every PRs and Considerations.

For PRs, the readily accessible arguments are:

Argument Description
RepoName The plump name of the repo (e.g. dlvhdr/gh-speed)
RepoPath The path to the Repo, the usage of the config.yml repoPaths key to rep the mapping
PrNumber The PR number
HeadRefName The PR’s far-off branch name
BaseRefName The PR’s injurious branch name

For Considerations, the readily accessible arguments are:

Argument Description
RepoName The plump name of the repo (e.g. dlvhdr/gh-speed)
RepoPath The path to the Repo, the usage of the config.yml repoPaths key to rep the mapping
IssueNumber The Misfortune number

To agree with a look at a PR with either Neovim or VSCode contain the following on your config.yml file:

' - key: v portray: > cd {{.RepoPath}} && code . && gh pr checkout {{.PrNumber}}

To pin a scenario contain the following on your config.yml file:

keybindings:
  disorders:
    - key: P
      portray: gh scenario pin {{.IssueNumber}} --repo {{.RepoName}}

Repo name to path mappings shall be actual match (plump name, plump path) or wildcard matched the usage of the proprietor and partial path.

An actual match for the plump repo name to a plump path takes priority over a matching wildcard, and wildcard suits must match to a wildcard path.

An :proprietor/:repo template shall be specified as a generic fallback.

repoPaths:
  :proprietor/:repo: ~/src/github.com/:proprietor/:repo # template ought to you continuously clone github repos in a fixed location
  dlvhdr/*: ~/code/repos/dlvhdr/# will match dlvhdr/repo-name to ~/code/repos/dlvhdr/repo-name
  dlvhdr/gh-speed: ~/code/gh-speed # is now no longer going to compare wildcard and blueprint to specified path

The RepoName and RepoPath keybinding arguments are entirely expanded when sent to the portray.

To override the default put of residing of terminal colors and as an different place your have color blueprint, you presumably can outline one on your config.yml file.
If you settle to dawdle this route, you agree with got got to specify all of the following keys as colors in hex structure (#RRGGBB), in any other case validation will fail.

theme:
  ui:
    table:
      showSeparator: factual
  colors:
    text:
      predominant: "#E2E1ED"
      secondary: "#666CA6"
      inverted: "#242347"
      faint: "#3E4057"
      warning: "#F23D5C"
      success: "#3DF294"
    background:
      selected: "#39386B"
    border:
      predominant: "#383B5B"
      secondary: "#39386B"
      faint: "#2B2B40"

You would customise all the issues’s layout as well to the arena layout.

For instance, to conceal the creator column for all PR sections, contain the following on your config.yml.

defaults:
  layout:
    prs:
      creator:
        hidden: factual
  • For prs the column names are: updatedAt, repo, creator, title, reviewStatus, affirm, ci, traces, assignees, injurious.
  • For disorders the column names are: updatedAt, affirm, repo, title, creator, assignees, comments, reactions.
  • The readily accessible properties to manipulate are: develop (fraudulent, factual), width (selection of cells), and hidden (fraudulent, factual).

Dolev Hadar dolevc2@gmail.com

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button