From 9627f1b50fe8589a4bf4aef1d646149f516a7bc7 Mon Sep 17 00:00:00 2001 From: Jonathan Glassman Date: Thu, 4 Sep 2025 11:48:31 +0100 Subject: [PATCH 1/4] Add docs on 3rd party AI CLI tools --- doc/editor_extensions/gitlab_cli/_index.md | 14 ++++ .../duo_agent_platform/agent_assistant.md | 4 ++ .../duo_agent_platform/duo_cli_third_party.md | 69 +++++++++++++++++++ 3 files changed, 87 insertions(+) create mode 100644 doc/user/duo_agent_platform/duo_cli_third_party.md diff --git a/doc/editor_extensions/gitlab_cli/_index.md b/doc/editor_extensions/gitlab_cli/_index.md index fcda02ac1e00b8..5cb98469a8b0c8 100644 --- a/doc/editor_extensions/gitlab_cli/_index.md +++ b/doc/editor_extensions/gitlab_cli/_index.md @@ -95,12 +95,16 @@ glab mr merge - Changed to require GitLab Duo add-on in GitLab 17.6 and later. - Changed to include Premium in GitLab 18.0. +- Ability to authenticate with third-party AI developer CLI tools [added](link) in GitLab 18.4. {{< /history >}} The GitLab CLI includes features powered by [GitLab Duo](../../user/gitlab_duo/_index.md). These include: - [`glab duo ask`](https://gitlab.com/gitlab-org/cli/-/blob/main/docs/source/duo/ask.md) +- `glab duo ` + +### `glab duo ask` To ask questions about `git` commands while you work, type: @@ -109,6 +113,16 @@ To ask questions about `git` commands while you work, type: The `glab duo ask` command can help you remember a `git` command you forgot, or provide suggestions on how to run `git` commands to perform other tasks. +### `glab duo ` + +To use GitLab as an authentication provider to access third-party AI developer CLI tools, type: + + `glab duo ` + +Third-party AI developer CLI tools integrate AI assistance directly into your development workflow. + +For more information, see how to [use the GitLab CLI with third-party AI CLI tools](../../user/duo_agent_platform/duo_cli_third_party.md). + ## Install the CLI Installation instructions are available in the `glab` diff --git a/doc/user/duo_agent_platform/agent_assistant.md b/doc/user/duo_agent_platform/agent_assistant.md index 4e458c297180f7..67153b813bf362 100644 --- a/doc/user/duo_agent_platform/agent_assistant.md +++ b/doc/user/duo_agent_platform/agent_assistant.md @@ -576,3 +576,7 @@ Prerequisites: is displayed. You can select **here** to see the pipeline in progress. 1. After the CLI agent has completed the task, you see a confirmation, and either a ready-to-merge change or an inline comment. + +## Related topics + +- [Use GitLab CLI with third-party AI CLI tools](duo_cli_third_party.md) diff --git a/doc/user/duo_agent_platform/duo_cli_third_party.md b/doc/user/duo_agent_platform/duo_cli_third_party.md new file mode 100644 index 00000000000000..cbc502d87b7aaf --- /dev/null +++ b/doc/user/duo_agent_platform/duo_cli_third_party.md @@ -0,0 +1,69 @@ +--- +stage: AI-powered +group: Agent Foundations +info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments +title: Use GitLab CLI with third-party AI CLI tools +--- + +{{< details >}} + +- Tier: Ultimate +- Add-on: GitLab Duo Enterprise, GitLab Duo with Amazon Q +- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated +- Status: Experiment +- Available on [GitLab Duo with self-hosted models](../../administration/gitlab_duo_self_hosted/_index.md): No + +{{< /details >}} + +{{< history >}} + +- [Introduced](link) in GitLab 18.4 [with a flag](../../administration/feature_flags/_index.md) named `agent_platform_claude_code`. Disabled by default. + +{{< /history >}} + +Third-party AI developer command line interface (CLI) tools integrate AI assistance +directly into your development workflow, allowing the AI to understand your codebase +context and execute tasks without you having to switch between different interfaces. + +You can use GitLab as an authentication provider to access these tools directly +through the GitLab.com AI gateway. This is an alternative to creating a +[CLI agent](agent_assistant.md) to use a third-party integration like Claude Code. + +The following third-party CLI tools have been tested and are available: + +- [Anthropic Claude Code](https://docs.anthropic.com/en/docs/claude-code/overview) + +## Use third-party AI developer CLI tools + +Prerequisites + +- Install the third-party tool on your local machine: + - [Anthropic Claude code](https://docs.anthropic.com/en/docs/claude-code/setup). +- You have a [personal access token](../profile/personal_access_tokens.md#create-a-personal-access-token) + with the following scopes: + - `api` + - `ai_features` + +To use third-party CLI tools: + +1. [Authenticate with GitLab](../../editor_extensions/gitlab_cli/_index.md#authenticate-with-gitlab): + + ```bash + glab auth login + ``` + + Enter your personal access token when prompted. + +1. To start the third-party CLI tool, run: + + ```bash + glab duo + ``` + + For example, to start Claude Code, run `glab duo claude`. + +## Related topics + +- [GitLab Duo for the CLI](../../editor_extensions/gitlab_cli/_index.md#gitlab-duo-for-the-cli) +- [Personal access tokens](../profile/personal_access_tokens.md) +- [AI gateway](../../administration/gitlab_duo/gateway.md) -- GitLab From 959d420bdcf0297a97fa1f8037cdf7a55d5210fc Mon Sep 17 00:00:00 2001 From: Jonathan Glassman Date: Thu, 4 Sep 2025 11:58:45 +0100 Subject: [PATCH 2/4] Correct a typo --- doc/user/duo_agent_platform/duo_cli_third_party.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/user/duo_agent_platform/duo_cli_third_party.md b/doc/user/duo_agent_platform/duo_cli_third_party.md index cbc502d87b7aaf..44731009cc2b2a 100644 --- a/doc/user/duo_agent_platform/duo_cli_third_party.md +++ b/doc/user/duo_agent_platform/duo_cli_third_party.md @@ -35,7 +35,7 @@ The following third-party CLI tools have been tested and are available: ## Use third-party AI developer CLI tools -Prerequisites +Prerequisites: - Install the third-party tool on your local machine: - [Anthropic Claude code](https://docs.anthropic.com/en/docs/claude-code/setup). -- GitLab From e84493efd8a990aa5ea1d08d7e142203222f1806 Mon Sep 17 00:00:00 2001 From: Ashraf Khamis Date: Thu, 11 Sep 2025 10:03:56 +0100 Subject: [PATCH 3/4] Clean up the docs and fix the pipeline --- doc/editor_extensions/gitlab_cli/_index.md | 10 +++-- .../duo_agent_platform/agent_assistant.md | 2 +- .../duo_agent_platform/duo_cli_third_party.md | 37 +++++++++---------- 3 files changed, 25 insertions(+), 24 deletions(-) diff --git a/doc/editor_extensions/gitlab_cli/_index.md b/doc/editor_extensions/gitlab_cli/_index.md index 5cb98469a8b0c8..4ceb39aea54c5c 100644 --- a/doc/editor_extensions/gitlab_cli/_index.md +++ b/doc/editor_extensions/gitlab_cli/_index.md @@ -95,11 +95,11 @@ glab mr merge - Changed to require GitLab Duo add-on in GitLab 17.6 and later. - Changed to include Premium in GitLab 18.0. -- Ability to authenticate with third-party AI developer CLI tools [added](link) in GitLab 18.4. +- Authentication with third-party AI developer CLI tools [added]() in GitLab 18.4. {{< /history >}} -The GitLab CLI includes features powered by [GitLab Duo](../../user/gitlab_duo/_index.md). These include: +The GitLab CLI includes features powered by [GitLab Duo](../../user/gitlab_duo/_index.md): - [`glab duo ask`](https://gitlab.com/gitlab-org/cli/-/blob/main/docs/source/duo/ask.md) - `glab duo ` @@ -117,11 +117,13 @@ or provide suggestions on how to run `git` commands to perform other tasks. To use GitLab as an authentication provider to access third-party AI developer CLI tools, type: - `glab duo ` +```plaintext +glab duo +``` Third-party AI developer CLI tools integrate AI assistance directly into your development workflow. -For more information, see how to [use the GitLab CLI with third-party AI CLI tools](../../user/duo_agent_platform/duo_cli_third_party.md). +For more information, see [use the GitLab CLI with third-party AI CLI tools](../../user/duo_agent_platform/duo_cli_third_party.md). ## Install the CLI diff --git a/doc/user/duo_agent_platform/agent_assistant.md b/doc/user/duo_agent_platform/agent_assistant.md index 67153b813bf362..cccfb2d70b098e 100644 --- a/doc/user/duo_agent_platform/agent_assistant.md +++ b/doc/user/duo_agent_platform/agent_assistant.md @@ -579,4 +579,4 @@ Prerequisites: ## Related topics -- [Use GitLab CLI with third-party AI CLI tools](duo_cli_third_party.md) +- [Use the GitLab CLI with third-party AI CLI tools](duo_cli_third_party.md) diff --git a/doc/user/duo_agent_platform/duo_cli_third_party.md b/doc/user/duo_agent_platform/duo_cli_third_party.md index 44731009cc2b2a..aede6061ef4a9f 100644 --- a/doc/user/duo_agent_platform/duo_cli_third_party.md +++ b/doc/user/duo_agent_platform/duo_cli_third_party.md @@ -2,7 +2,7 @@ stage: AI-powered group: Agent Foundations info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments -title: Use GitLab CLI with third-party AI CLI tools +title: Use the GitLab CLI with third-party AI CLI tools --- {{< details >}} @@ -17,29 +17,29 @@ title: Use GitLab CLI with third-party AI CLI tools {{< history >}} -- [Introduced](link) in GitLab 18.4 [with a flag](../../administration/feature_flags/_index.md) named `agent_platform_claude_code`. Disabled by default. +- [Introduced]() in GitLab 18.4 [with a flag](../../administration/feature_flags/_index.md) named `agent_platform_claude_code`. Disabled by default. {{< /history >}} -Third-party AI developer command line interface (CLI) tools integrate AI assistance -directly into your development workflow, allowing the AI to understand your codebase -context and execute tasks without you having to switch between different interfaces. +Third-party AI developer command-line interface (CLI) tools integrate +AI assistance directly into your development workflow. +These tools help AI understand your codebase context and execute tasks +without you having to switch between different interfaces. -You can use GitLab as an authentication provider to access these tools directly -through the GitLab.com AI gateway. This is an alternative to creating a -[CLI agent](agent_assistant.md) to use a third-party integration like Claude Code. +You can use GitLab as an authentication provider to access +these tools directly through the GitLab.com AI gateway. +This method is an alternative to creating a +[CLI agent](agent_assistant.md) for a third-party integration. -The following third-party CLI tools have been tested and are available: - -- [Anthropic Claude Code](https://docs.anthropic.com/en/docs/claude-code/overview) +[Anthropic Claude Code](https://docs.anthropic.com/en/docs/claude-code/overview) has been tested +and is available as a third-party CLI tool. ## Use third-party AI developer CLI tools Prerequisites: -- Install the third-party tool on your local machine: - - [Anthropic Claude code](https://docs.anthropic.com/en/docs/claude-code/setup). -- You have a [personal access token](../profile/personal_access_tokens.md#create-a-personal-access-token) +- Install the third-party tool on your local machine (for example, [Anthropic Claude Code](https://docs.anthropic.com/en/docs/claude-code/setup)). +- [Create a personal access token](../profile/personal_access_tokens.md#create-a-personal-access-token) with the following scopes: - `api` - `ai_features` @@ -48,22 +48,21 @@ To use third-party CLI tools: 1. [Authenticate with GitLab](../../editor_extensions/gitlab_cli/_index.md#authenticate-with-gitlab): - ```bash + ```shell glab auth login ``` Enter your personal access token when prompted. -1. To start the third-party CLI tool, run: +1. Start the third-party CLI tool: - ```bash + ```shell glab duo ``` - For example, to start Claude Code, run `glab duo claude`. + For example, to start Anthropic Claude Code, run `glab duo claude`. ## Related topics - [GitLab Duo for the CLI](../../editor_extensions/gitlab_cli/_index.md#gitlab-duo-for-the-cli) -- [Personal access tokens](../profile/personal_access_tokens.md) - [AI gateway](../../administration/gitlab_duo/gateway.md) -- GitLab From 253702fa0b0463b37144ad4c97d1be5c6d02d7fa Mon Sep 17 00:00:00 2001 From: Ashraf Khamis Date: Thu, 11 Sep 2025 10:51:50 +0100 Subject: [PATCH 4/4] Clean up the docs and fix the pipeline --- doc/user/duo_agent_platform/duo_cli_third_party.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/user/duo_agent_platform/duo_cli_third_party.md b/doc/user/duo_agent_platform/duo_cli_third_party.md index aede6061ef4a9f..7d691ab091e882 100644 --- a/doc/user/duo_agent_platform/duo_cli_third_party.md +++ b/doc/user/duo_agent_platform/duo_cli_third_party.md @@ -38,7 +38,8 @@ and is available as a third-party CLI tool. Prerequisites: -- Install the third-party tool on your local machine (for example, [Anthropic Claude Code](https://docs.anthropic.com/en/docs/claude-code/setup)). +- Install the third-party tool on your local machine + (for example, [Anthropic Claude Code](https://docs.anthropic.com/en/docs/claude-code/setup)). - [Create a personal access token](../profile/personal_access_tokens.md#create-a-personal-access-token) with the following scopes: - `api` -- GitLab