### Full GitKraken CLI Setup Workflow Source: https://context7.com/gitkraken/gk-cli-docs/llms.txt A comprehensive workflow for a new developer joining a multi-repository workspace and executing an AI-assisted work item. This includes installation, authentication, organization setup, provider sync, workspace configuration, cloning, work item management, and cleanup. ```bash # 1. Install (macOS example) brew install gitkraken-cli # 2. Authenticate gk auth login # → browser opens, complete login at gk.dev # 3. Confirm and set organization gk organization list gk organization set MyOrg # 4. Sync providers gk provider list --sync # 5. Set workspace and clone repositories gk workspace set frontend-squad gk ws clone frontend-squad ~/workspaces/frontend # 6. Start a work item spanning all repos gk work start update-api-client # 7. Make changes in each repo (standard git) cd ~/workspaces/frontend/repo-a git add . # 8. Review state across all repos gk work info # 9. Commit with AI-generated messages gk work commit --ai # 10. Open PRs with AI-generated descriptions gk work pr create --ai # 11. Clean up gk work end ``` -------------------------------- ### Install GitKraken CLI to User Directory on Linux/Unix Source: https://github.com/gitkraken/gk-cli-docs/blob/main/cli/cli-home.md Install the GitKraken CLI into a user-owned directory and update the PATH environment variable for a portable setup on Linux or Unix systems. ```bash mkdir "$HOME/cli" mv ~/Downloads/gk "$HOME/cli" export PATH="$HOME/gk:$PATH" ``` -------------------------------- ### Install GitKraken CLI with Winget on Windows Source: https://github.com/gitkraken/gk-cli-docs/blob/main/llms-full.txt Install the GitKraken CLI on Windows using the Winget package manager for standard installation and management. ```bash winget install gitkraken.cli ``` -------------------------------- ### Install GitKraken CLI with Snap on Linux Source: https://github.com/gitkraken/gk-cli-docs/blob/main/llms-full.txt Install the GitKraken CLI on Linux using Snap for a managed installation through the system package runtime. ```bash sudo snap install gitkraken-cli ``` -------------------------------- ### Install GitKraken CLI from Downloaded Binary Source: https://context7.com/gitkraken/gk-cli-docs/llms.txt Manually install `gk` on any platform by placing the binary in a directory included in your system's PATH. ```bash # macOS / Linux — move binary to a system path mv ~/Downloads/gk /usr/local/bin/gk chmod +x /usr/local/bin/gk # Or install to a user-owned directory without admin access mkdir "$HOME/cli" mv ~/Downloads/gk "$HOME/cli/gk" export PATH="$HOME/cli:$PATH" # Verify gk --version ``` -------------------------------- ### Install GitKraken CLI on Windows via Winget Source: https://context7.com/gitkraken/gk-cli-docs/llms.txt Install `gk` on Windows using the Winget package manager. ```powershell # Install via Winget winget install gitkraken.cli # Verify installation gk --version ``` -------------------------------- ### Manually Install GitKraken CLI Binary on macOS/Linux/Unix Source: https://github.com/gitkraken/gk-cli-docs/blob/main/llms-full.txt Install the GitKraken CLI by moving the downloaded binary to a directory in your system's PATH. This method is useful for manual installations or when package managers are unavailable. ```bash mv ~/Downloads/gk /usr/local/bin/gk ``` -------------------------------- ### Install GitKraken CLI from .rpm Package on Linux Source: https://github.com/gitkraken/gk-cli-docs/blob/main/cli/cli-home.md Install the GitKraken CLI on RPM-based Linux systems using a downloaded .rpm package. This command requires administrator privileges. ```bash sudo rpm -i ./gk.rpm ``` -------------------------------- ### Install GitKraken CLI from .deb Package on Linux Source: https://github.com/gitkraken/gk-cli-docs/blob/main/cli/cli-home.md Install the GitKraken CLI on Debian-based Linux systems using a downloaded .deb package. This command requires administrator privileges. ```bash sudo apt install ./gk.deb ``` -------------------------------- ### Install GitKraken CLI with Homebrew on macOS Source: https://github.com/gitkraken/gk-cli-docs/blob/main/llms-full.txt Install the GitKraken CLI on macOS using the Homebrew package manager for standard installation and managed updates. ```bash brew install gitkraken-cli ``` -------------------------------- ### Install GitKraken CLI with Native Linux Packages Source: https://github.com/gitkraken/gk-cli-docs/blob/main/llms-full.txt Install the GitKraken CLI on Linux using native package managers like apt or rpm, provided you have the release artifact (.deb or .rpm). ```bash sudo apt install ./gk.deb ``` ```bash sudo rpm -i ./gk.rpm ``` -------------------------------- ### Start a GitKraken CLI Work Item Source: https://github.com/gitkraken/gk-cli-docs/blob/main/cli/GK-CLI-work-items.md Initializes a new work item with a given name across all repositories in the active workspace. This command checks for pending commits, pull requests, or open work items before proceeding. ```bash gk work start ``` -------------------------------- ### Start a new work item Source: https://context7.com/gitkraken/gk-cli-docs/llms.txt Initialize a named work item across all repositories in the active workspace. This command checks for pending commits, open pull requests, or existing work items before proceeding. ```bash # Start a work item named "fix-auth-token-refresh" across the entire workspace gk work start fix-auth-token-refresh ``` -------------------------------- ### Set GitKraken Workspace and Clone Repository Source: https://github.com/gitkraken/gk-cli-docs/blob/main/llms-full.txt Configure your active GitKraken workspace and clone repositories into a specified root path. This is part of the initial setup for managing projects with the CLI. ```bash gk workspace set ``` ```bash gk ws clone ``` -------------------------------- ### Uninstall GitKraken CLI AI Hooks on OpenCode Source: https://github.com/gitkraken/gk-cli-docs/blob/main/cli/cli-home.md Use this command to remove GitKraken CLI AI hooks specifically configured for OpenCode environments. Ensure you have the GitKraken CLI installed and configured. ```bash gk ai hook uninstall opencode ``` -------------------------------- ### List Available Workspaces Source: https://github.com/gitkraken/gk-cli-docs/blob/main/llms-full.txt Lists all available GitKraken workspaces. Use this to identify the workspace you want to interact with. ```bash gk workspace list ``` -------------------------------- ### Sync Git Provider and Jira Integrations Source: https://github.com/gitkraken/gk-cli-docs/blob/main/llms-full.txt Synchronize your GitKraken CLI with connected Git providers (GitHub, GitLab, Bitbucket) and Jira accounts. This command discovers and lists available integrations. ```bash gk provider list --sync ``` -------------------------------- ### Sync and Add Git Providers Source: https://context7.com/gitkraken/gk-cli-docs/llms.txt Discover and synchronize connected Git providers (GitHub, GitLab, Bitbucket) and Jira accounts, or add a new provider manually through an interactive prompt. ```bash # Sync all connected providers automatically gk provider list --sync # Expected output: # Syncing providers... # ✓ GitHub (connected) # ✓ GitLab (connected) # ✓ Jira (connected) # Add a provider manually (interactive prompt) gk provider add # Prompts for provider type and credentials # List all providers without syncing gk provider list ``` -------------------------------- ### List, Set, and Clone GitKraken Workspaces Source: https://context7.com/gitkraken/gk-cli-docs/llms.txt List available GitKraken workspaces, set the active workspace, and clone repositories into it. This ensures `gk work` commands operate on the correct set of repositories. ```bash # List all workspaces available to the authenticated user gk workspace list # Expected output: # 1. frontend-squad # 2. platform-team (active) # 3. data-services # Set the active workspace gk workspace set frontend-squad # Expected output: # Workspace set to: frontend-squad ``` -------------------------------- ### Clone all repositories in a workspace Source: https://context7.com/gitkraken/gk-cli-docs/llms.txt Use this command to clone all repositories within a specified workspace to a local root path. Ensure the workspace and path are correctly defined. ```bash gk ws clone frontend-squad ~/workspaces/frontend ``` -------------------------------- ### Authenticate with GitKraken CLI Source: https://github.com/gitkraken/gk-cli-docs/blob/main/llms-full.txt Log in to your GitKraken account to enable cloud workspaces, MCP integration, or synchronized providers. This command opens a browser for authentication. ```bash gk auth login ``` -------------------------------- ### List and Set GitKraken Organization Source: https://github.com/gitkraken/gk-cli-docs/blob/main/llms-full.txt Verify your current GitKraken organization and set a new one. Setting an organization is required for AI-powered features on paid plans. ```bash gk organization list ``` ```bash gk organization set ``` -------------------------------- ### Create pull requests with AI descriptions Source: https://context7.com/gitkraken/gk-cli-docs/llms.txt Open pull requests for every repository in the active work item using AI-generated PR titles and descriptions. This requires authentication, an active organization, and a paid plan. ```bash # Create pull requests for all repositories in the work item gk work pr create --ai ``` -------------------------------- ### Clone Repository into Workspace Source: https://github.com/gitkraken/gk-cli-docs/blob/main/llms-full.txt Clones a specified repository into the root path of the active GitKraken workspace. Replace and accordingly. ```bash gk ws clone ``` -------------------------------- ### Authenticate GitKraken CLI with `gk auth login` Source: https://context7.com/gitkraken/gk-cli-docs/llms.txt Authenticate `gk` with your GitKraken account to enable cloud features. This command typically opens a browser for login, or provides a URL and code if no browser is available. ```bash # Authenticate via browser (default) gk auth login # Expected: Opens default browser → complete login at gk.dev # If no browser is available, a URL is printed to the terminal — open it manually and enter the code shown # After login, verify authentication status gk auth status # Expected output: # Logged in as: your-username@example.com # Organization: MyOrg ``` -------------------------------- ### Create Pull Requests with AI Assistance Source: https://github.com/gitkraken/gk-cli-docs/blob/main/cli/GK-CLI-work-items.md Opens pull requests for the current work item across all repositories with changes. This feature requires authentication, a configured organization, and a paid plan for AI assistance. ```bash gk work pr create --ai ``` -------------------------------- ### List and Set GitKraken Organization Source: https://context7.com/gitkraken/gk-cli-docs/llms.txt List all organizations linked to your authenticated account and set the active organization, which is required for AI-powered features on paid plans. ```bash # List all organizations linked to the authenticated account gk organization list # Expected output: # 1. MyOrg (active) # 2. AnotherOrg # Set the active organization (required for AI features on paid plans) gk organization set MyOrg # Expected output: # Organization set to: MyOrg # Verify active organization gk organization list ``` -------------------------------- ### List GitKraken Organizations Source: https://github.com/gitkraken/gk-cli-docs/blob/main/cli/cli-home.md Verify your current GitKraken organization. This is required for AI-powered features. ```bash gk organization list ``` -------------------------------- ### Add a Git Provider Manually Source: https://github.com/gitkraken/gk-cli-docs/blob/main/llms-full.txt Manually add a Git provider integration to your GitKraken CLI configuration. This is an alternative to automatic synchronization. ```bash gk provider add ``` -------------------------------- ### Set GitKraken Organization Source: https://github.com/gitkraken/gk-cli-docs/blob/main/cli/cli-home.md Set your active GitKraken organization, which is necessary for AI features. ```bash gk organization set ``` -------------------------------- ### Set Active Workspace Source: https://github.com/gitkraken/gk-cli-docs/blob/main/llms-full.txt Sets the desired GitKraken workspace as the active one for subsequent commands. Replace with the actual workspace name. ```bash gk workspace set ``` -------------------------------- ### Commit Changes with AI-Generated Messages Source: https://github.com/gitkraken/gk-cli-docs/blob/main/cli/GK-CLI-work-items.md Stages changes and creates commits across all affected repositories using AI-generated commit messages. This requires authentication, a configured organization, and a paid plan. ```bash gk work commit --ai ``` -------------------------------- ### Review GitKraken CLI Work Item Status Source: https://github.com/gitkraken/gk-cli-docs/blob/main/cli/GK-CLI-work-items.md Displays the current state of the work item across all repositories in the workspace. Use this command to review pending changes before committing or opening pull requests. ```bash gk work info ``` -------------------------------- ### Fix Oh-My-Zsh `gk` Alias Conflict Source: https://context7.com/gitkraken/gk-cli-docs/llms.txt Remove the Oh-My-Zsh alias for `gk` if it conflicts with the GitKraken CLI binary. Add the unalias command to `~/.zshrc` to persist the change. ```bash # Oh-My-Zsh aliases `gitk` as `gk` — remove it to use GitKraken CLI unalias gk # Add to ~/.zshrc to persist across sessions echo "unalias gk" >> ~/.zshrc ``` -------------------------------- ### Review current work item state Source: https://context7.com/gitkraken/gk-cli-docs/llms.txt Review the current state of the active work item, including pending changes, staged files, and open pull requests across all workspace repositories before committing. This provides a summary of the work item's status. ```bash # Review workspace state before committing gk work info ``` -------------------------------- ### End and Clean Up a GitKraken CLI Work Item Source: https://github.com/gitkraken/gk-cli-docs/blob/main/cli/GK-CLI-work-items.md Finalizes the current work item and cleans up temporary resources. This command offers options for tidying up after the task is complete. ```bash gk work end ``` -------------------------------- ### Uninstall GitKraken CLI AI Hooks on Claude Code Source: https://github.com/gitkraken/gk-cli-docs/blob/main/cli/cli-home.md Remove GitKraken CLI AI hooks specifically for Claude Code. These hooks manage the forwarding of lifecycle events to the local `gk` process. ```bash gk ai hook uninstall claude-code ``` -------------------------------- ### Commit staged changes with AI messages Source: https://context7.com/gitkraken/gk-cli-docs/llms.txt Commit staged changes across all workspace repositories using AI-generated, context-aware commit messages. This requires authentication, an active organization, and a paid plan. Ensure changes are staged first using standard git commands. ```bash # Stage changes in each repo first (standard git) cd ~/workspaces/frontend/repo-a && git add src/auth/tokenRefresh.ts cd ~/workspaces/frontend/repo-b && git add config/auth.yaml # Then commit across all repos with AI-generated messages gk work commit --ai ``` -------------------------------- ### Uninstall GitKraken CLI AI hooks Source: https://context7.com/gitkraken/gk-cli-docs/llms.txt Remove GitKraken CLI lifecycle hooks from AI coding agents. These hooks were registered to forward session and tool-use events to the local `gk` process. Specify the AI agent to uninstall hooks from. ```bash # Uninstall hooks from Claude Code gk ai hook uninstall claude-code ``` ```bash # Uninstall hooks from OpenCode gk ai hook uninstall opencode ``` -------------------------------- ### End and clean up work item Source: https://context7.com/gitkraken/gk-cli-docs/llms.txt Close the active work item and clean up temporary resources. This command provides options to retain or discard local changes, and prompts for confirmation before deleting local branches. ```bash # Finalize and clean up the work item gk work end ``` -------------------------------- ### Remove Oh-My-Zsh gk Alias Conflict Source: https://github.com/gitkraken/gk-cli-docs/blob/main/llms-full.txt Unalias the 'gk' command in Oh-My-Zsh if it conflicts with the GitKraken CLI. This resolves issues where the alias prevents the CLI from running. ```bash unalias gk ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.