GitLab Duo CLI (duo)
- Tier: Premium, Ultimate
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
The GitLab Duo CLI is a command-line interface tool that brings GitLab Duo Agentic Chat to your terminal. Available for use with any operating system and editor, use the CLI to ask complex questions about your codebase and to autonomously perform actions on your behalf.
The GitLab Duo CLI can help you:
- Understand your codebase structure, cross-file functionality, and individual code snippets.
- Build, modify, refactor, and modernize code.
- Troubleshoot errors and fix code issues.
- Automate CI/CD configuration, troubleshoot pipeline errors, and optimize pipelines.
- Perform multi-step development tasks autonomously.
The GitLab Duo CLI is now generally available. Update to GitLab Duo CLI 9.0.0 or later for the full generally available experience.
You can use the GitLab Duo CLI through the GitLab CLI (glab),
or install and use the GitLab Duo CLI (duo) as a standalone AI tool.
The GitLab Duo CLI offers two modes:
- Interactive mode: Provides a chat experience similar to GitLab Duo Chat in the GitLab UI or in editor extensions. Supports build and plan modes.
- Headless mode: Enables non-interactive use in runners, scripts, and other automated workflows.
It also supports custom instructions set for
the GitLab Duo Agent Platform, including chat-rules.md, AGENTS.md, and SKILL.md files.
Get started
- Set up the GitLab Duo CLI.
- Use the GitLab Duo CLI, either in interactive or headless mode.
- Customize the GitLab Duo CLI to better fit your workflow or use case.
- Review the reference documentation to learn more about how you can use the GitLab Duo CLI.
Manage GitLab Duo CLI access
- Offering: GitLab Self-Managed, GitLab Dedicated
By default, GitLab Duo CLI access is turned on.
On GitLab Self-Managed and GitLab Dedicated, you can turn GitLab Duo CLI access on or off for an instance.
Prerequisites:
- You must be an administrator.
- In the upper-right corner, select Admin.
- In the left sidebar, select GitLab Duo.
- Select Change configuration.
- Under GitLab Duo CLI, select or clear the Turn on GitLab Duo CLI access checkbox.
- Select Save changes.
Update the GitLab Duo CLI
To manually update the GitLab Duo CLI to the latest version, run the command for your setup:
glab duo cli --updatenpm install --global @gitlab/duo-cli@latestContribute to the GitLab Duo CLI
For information on contributing to the GitLab Duo CLI, see the development guide.