Get  50% OFF GitKraken Pro
Take Advantage to Save

Git Blog

Releasing the Power of Git

Save time with our new AI-focused CLI Commands

Our CLI team has been cooking up some awesome new AI functionality that we think you will love. The latest release includes several new commands such as changelog, commit, pr, and a command to check the remaining tokens on your subscription. They are all nested under a new top level command, gk ai.

List of new AI commands

Changing how you create Change logs with AI

You might not generate changelogs very often. Maybe when you push out a new numbered release or when you are getting ready for the end of a sprint. But, the time you spend manually doing that is probably time that you would rather spend doing almost anything else. If you’re lucky, your team at least leaves good commit messages and your issue tracker can show you which tickets were closed recently. If you’re unlucky, you end up needing to reach out to your teammates or go digging through the repo’s commit history. The changelog command is here to help. It detects changes between two branches or commit hashes. If you don’t pass any arguments it will default to checking the current branch against your default branch. In the screenshot below, you can see the output from one of our current GitLens PRs.

The output of a changelog command when run against a current GitLens PR.

We are Committed to Making Commits Better

If you’re already familiar with our CLI app, you probably know we have had some AI commit functionality nested in the Work Item commands. We still think Work Items are a major time saver for developers but they require you to opt into them from the start of a fix or feature. But, developers don’t always work that way. Sometimes you are just hacking on the main branch and pulling changes out to separate branches in an ad-hoc way. The new gk ai commit command is a flexible utility to aid in that workflow. You can run the bare command to get just the message and if you want to add a description, just pass the -d flag.

The AI commit command run against a recent set of changes to GitLens.

Pull Requests Made Easy

Just like commits, we have had AI pull request functionality for Work Items. Now, we have it for other workflows, too. Simply run gk ai pr create and the CLI will look at your commits and code changes to generate an appropriate PR title and description. Similar to the commit command as well, we prompt you for confirmation just to make sure the generated content meets your expectations. Even if you don’t confirm the generation, it can really help inspire your own custom title and description. In the following screenshot, you can see what it generated from a README change to one of our microsites.

A screenshot of the output from running the pr command on a README change to an internal project.

Show Me the Tokens!

Our subscriptions include a generous amount of tokens to use our AI features, but the more you use AI the more you might wonder how many tokens you have left for the week. You can go out to GitKraken Desktop or gitkraken.dev to check your balance but we wanted to save you that time, so we put a tokens command into the CLI as well. When you run gk ai tokens, you’ll see how many tokens you have used, your total allowed, and when your balance will reset back to zero.

The output of the gk ai tokens command.

Get Crackin’ with the GitKraken CLI

All these features are available today. If you already have the CLI installed, simply update through your OS package manager like WinGet, Homebrew, or Snap. If you haven’t installed it yet and want to know more, head on over to our CLI page to get started. We think these new features will save you a lot of time and we would love to hear about your experiences with them. Let us know on social media or through our feedback site.

Like this post? Share it!

Read More Articles

Make Git Easier, Safer &
More Powerful

with GitKraken
Visual Studio Code is required to install GitLens.

Don’t have Visual Studio Code? Get it now.

Team Collaboration Services

Secure cloud-backed services that span across all products in the DevEx platform to keep your workflows connected across projects, repos, and team members
Launchpad – All your PRs, issues, & tasks in one spot to kick off a focused, unblocked day. Code Suggest – Real code suggestions anywhere in your project, as simple as in Google Docs. Cloud Patches – Speed up PR reviews by enabling early collaboration on work-in-progress. Workspaces – Group & sync repos to simplify multi-repo actions, & get new devs coding faster. DORA Insights – Data-driven code insights to track & improve development velocity. Security & Admin – Easily set up SSO, manage access, & streamline IdP integrations.
winget install gitkraken.cli