GitHub In The Terminal
Let’s integrate GitHub into the terminal using the GitHub CLI, gh-dash, and the Octo Neovim plugin. In this live stream I experiment with adding new features to my tools to improve my experience with using GitHub on the command line.
A beautiful CLI dashboard for GitHub 🚀
Here are a couple of features I added to gh-dash:
Also, in order to keep gh dash up-to-date, run the following command:
Edit and review GitHub issues and pull requests from the comfort of your favorite editor
Here is how I configure Octo.nvim using the Lazy.nvim plugin manager:
I had previously created many custom leader key bindings but found I wasn’t using them. So, thanks to this issue I opened, I can simplify it down to
<leader>o which opens Telescope with all the potential Octo commands.
A lua neovim plugin to generate shareable file permalinks (with line ranges) for several git web frontend hosts. Inspired by tpope/vim-fugitive's :GBrowse
This plugin makes it easy to get a unique GitHub URL to a line of code in a repo. You can use the following lines to install it with lazy.nvim:
Now, you can press
<leader>gy and it will automatically detect the line your cursor is on and copy a unique GitHub URL to that source code to your clipboard.
Git integration for buffers
This is my favorite git plugin for Neovim. It has many features, primarily showing git diff status in the sign column. Here is how I configure it using lazy.nvim:
The commands I hightlight in the live stream are
[g to navigate between hunks,
<leader>gx to stage and reset hunks, and
<leader>gG to stage the entire buffer.
simple terminal UI for git commands
Lastly, I integrated Octo more into my favorite git CLI tool, lazygit, by overwritting the “o” command with a custom command and setting the origional command to “O”.
Overall this was fun exploring these tools on the live stream. Each of the tools explored have different features to offer and I can see myself replacing a lot of my time on github.com with gh-dash, octo.nvim, and lazygit.
Sign-Up for New Posts
Stay in the loop and get the latest blog posts about dotfiles sent to your inbox.