gitlab

Bring GitLab Duo Agent Platform to your terminal (opens in new tab)

GitLab Duo CLI, generally available in GitLab 19.2, brings GitLab Duo Agentic Chat into the terminal. It combines code assistance with project, pipeline, permissions, and agent context from GitLab, helping developers handle failures and multi-step delivery work without leaving the shell. It supports both interactive development and headless automation in CI jobs and scripts.

Why Terminal AI Needs GitLab Context

  • Many delivery problems occur after coding: failed pipelines, broken tests, vulnerabilities, dependency issues, and CI configuration problems.
  • Generic coding agents lack access to GitLab project context, pipeline data, permissions, and organization-wide agent configuration.
  • Duo CLI connects terminal work to the broader GitLab software lifecycle and provides centralized administration and identity management.

Capabilities of Duo CLI

  • Investigate codebases, refactor, troubleshoot pipelines, improve CI/CD, and complete multi-step tasks from the terminal.
  • Share conversations across Duo CLI, the GitLab web UI, and editor extensions.
  • Use Plan mode to inspect and prepare changes, then Build mode to apply them.
  • Run /doctor to diagnose setup issues and /mcp to inspect MCP configuration.
  • Available on GitLab.com, GitLab Self-Managed, and GitLab Dedicated, with instance-level controls for administrators.

Interactive and Headless Operation

  • Launch through the GitLab CLI with glab duo cli, which handles authentication, or use the standalone duo command with a personal access token.
  • Interactive mode allows users to chat, review proposed actions, and approve tools before execution.
  • Headless mode supports automation through commands such as:
    • glab duo cli run --goal
    • duo run --goal
  • A pipeline failure can be investigated directly from the shell, with Duo CLI analyzing the issue and proposing changes for review.

Customization and Adoption

  • Duo CLI follows project instructions in files such as chat-rules.md, AGENTS.md, and SKILL.md.
  • Custom slash commands can extend interactive workflows.
  • Users can install and authenticate through the Duo CLI documentation, or begin with glab duo cli.
  • GitLab offers Duo Agent Platform trials and includes credits for eligible Premium and Ultimate subscriptions.

Duo CLI is positioned as a way to extend AI assistance beyond code editing into the operational parts of software delivery. Teams can start with interactive troubleshooting and gradually use headless mode for repeatable CI and scripting workflows.