gitkraken / gk-cli

GitKraken CLI Releases and Documentation

Home Page:https://www.gitkraken.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸš€ GitKraken CLI

gk is GitKraken on the command line. It makes working across multiple repos easier with Workspaces, provides access to pull requests and issues from multiple services (GitHub, GitLab, Bitbucket, etc.), and seamlessly connects with GitKraken Client and GitLens in VS Code to visualize git information when you need it.

GitKraken CLI is available on macOS, Windows and Unix systems.

πŸ“š Documentation

Check out the installation instructions and examples below. For command usage see the docs.

Installation

macOS

gk is available from Homebrew and MacPorts with the following command:

Homebrew:

brew install gitkraken-cli

MacPorts:

sudo port install gk

Or download it from the releases page and add it to your binaries folder:

mv ~/Downloads/gk /usr/local/bin/gk

Unix / Ubuntu

gk is available as a downloadable binary from the releases page. Once you have it, add it to your binaries folder:

mv ~/Downloads/gk /usr/local/bin/gk

Or create a new directory, move the binary and add it to $PATH:

mkdir "$HOME/cli"
mv ~/Downloads/gk "$HOME/cli"
export PATH="$HOME/gk:$PATH"

You can also download your corresponding package (.deb, .rpm) and install it with:

sudo apt install ./gk.deb

or

sudo rpm -i ./gk.rpm

Windows

gk is available from Winget with the following command:

winget install gitkraken.cli

You can also download it using Chocolatey:

choco install gkcli

Or download the binary from the releases page and place the gk.exe in a desired folder. Then edit your environment variables to add it to your PATH.

  1. In Search, search for Environment Variables.
  2. Click on the Edit the system environment variables result.
  3. In the modal, click on the Environment Variables... button.
  4. In the System Variables section, scroll until you find the PATH variable. Click on it.
    • If it doesn't exist, create a variable with the name PATH.
  5. Add the path to the gk binary at the end.

βš™οΈ Configuration

Nerd Fonts

The GitKraken CLI supports Nerd Fonts to display icons for some commands. To ensure correct icon rendering, please obtain and install a Nerd Font available at https://www.nerdfonts.com/. After installation, set the selected Nerd Font as the default font for your terminal.

Troubleshooting

gk login freezes after authenticating in browser

This problem is due to the browser. Currently we know that Safari and Brave do not allow to respond to localhost through port 1314. To fix this, change your default browser or copy the URL before the redirect and open it in another browser.

gk from Oh-My-Zsh

Oh-My-Zsh has gitk aliased as gk and that can create some problems. To fix this, type in your terminal:

unalias gk

Examples

🎯 Focus View

gk focus

GitKraken Focus View is a unified dashboard that consolidates PRs, Issues, and WIPs across all of the repositories in a Cloud Workspace. You can view the details of any item and take action on your most important tasks.

Screenshot 2024-01-02 at 10 09 03β€―AM

Pin items to keep them at the top of your list

Use the shortcut p to pin any PR or Issue to the top of the list. You can unpin an item by using the same shortcut on any pinned item.

Snooze items to save them for later

Use the shortcut s to snooze any PR or Issue, removing them from the list of items. You can view snoozed items by navigating to the Snoozed tab in the Focus View. You can unsnooze items and bring them back into your Focus View lists by using the same shortcut on any snoozed item.

🀝 Create Workspaces to group repos

gk ws create

GitKraken workspaces associate groups of repos and set the context for helpful commands that can operate on, or get information for, multiple repos at once. There are two types of workspaces:

Local

Local Workspaces exist only on your machine.

Cloud

Cloud Workspaces are accessible on any machine, and can be connected to hosting and issue providers like GitHub and GitLab to get additional information about pull requests and issues. Share Cloud Workspaces with your team to improve onboarding with the ability to clone all repos at once. To enable this extra functionality, Cloud Workspaces require a free GitKraken account. We are continuing to evolve and improve GitKraken Workspaces and welcome any feedback.

gk-ws-create-demo

Adding and locating repos

gk ws add-repo

This will add a new repo to a workspace either by path or remote URL.

gk ws locate

If you're accessing a Cloud Workspace for the first time, you might need to locate the local repos on your machine. Run this command in the directory where youre repos are located so gk knows where they are.

gk ws clone

You can also clone all repos in a Workspace at once into a single directory. This is helpful for onboarding when your team works on multiple repos.

🎬 Perform git actions on multiple repos at once

gk ws [action]

In any workspace, you can perform git operations like fetch, pull, push, and checkout across all repos in the workspace.

πŸ“‹ Get pull requests and issues

gk provider add

Before fetching pull requests and issues, ensure that you have the appropriate provider (GitHub, GitLab, etc.) connected. This will open a browser to authenticate.

gk pr list

When a Cloud Workspace has a provider connected, you can list all pull requests and issues for repos in the workspace, and view details for a specific one.

gk-pr-list-demo

gk pr view

Returns a list of all pull requests for all repos in a workspace. Type to search for a specific pull request and press enter to view details.

gk-pr-view-demo

πŸ“ˆ Pull Request Insights

gk ws insights

See the following metrics for all repositories in a Cloud Workspace. The default time period is 7 days, but can be increased to 14 days with any paid GitKraken license.

  • Average Cycle Time
  • Average Throughput
  • Merge Rate
  • Opened Pull Requests
  • Merged Pull Requests
  • Closed Pull Requests

gk-ws-insights-demo

✨ Visual Commit Graph

gk ws graph

Open a visual graph of the repo in your current directory in either GitKraken Client or GitLens in VS Code.

gk-graph-demo.mov

About

GitKraken CLI Releases and Documentation

https://www.gitkraken.com

License:Other