GitLab Duo CLI: Agentic AI now in the terminal (opens in new tab)
GitLab Duo CLI brings GitLab’s agentic AI capabilities into the terminal, extending AI assistance beyond interactive coding in an IDE. Its public beta supports both human-guided sessions and unattended automation across the software development lifecycle, including coding, CI/CD, testing, and troubleshooting. GitLab emphasizes security through approvals, prompt-injection detection, auditing, and configurable permissions.
Terminal-Based Agentic Development
- The CLI is designed for work outside the IDE and GitLab UI.
- Terminals are well suited to:
- Automation and scripting
- Piping and chaining commands
- Portable workflows
- Reproducible debugging
- IDEs remain better for interactive, context-rich development, while Duo CLI targets automation and machine-driven workflows.
Installation
- Users with GitLab’s
glabCLI can start Duo CLI with:glab duo cli - GitLab Duo CLI can also be installed as a standalone tool.
Capabilities and Operating Modes
- Duo CLI can build, modify, refactor, and modernize code.
- It can access agents and flows defined in GitLab Duo Agent Platform.
- Potential uses include:
- Creating and optimizing CI/CD configurations
- Running multi-step development tasks
- Debugging failed pipelines
- Integrating AI into unattended workflows
Interactive Mode
- Provides editor-independent terminal chat.
- Keeps a human in the loop by requiring approval before actions.
- Supports codebase exploration, code creation, error fixing, and pipeline troubleshooting.
Headless Mode
- Runs without user interaction.
- Designed for CI/CD runners, scripts, and automated workflows.
- Enables agents to operate in environments where no developer is present.
Security and Governance
- Interactive actions require human approval by default.
- Prompt-injection detection is built into the Duo Agent Platform.
- Composite identity controls agent access and makes AI-driven actions auditable.
- Instruction files such as
chat-rules.md,AGENTS.md, andSKILL.mddefine permitted tasks, resources, context, and actions. - These controls apply least-privilege principles to AI agents.
Availability
- Duo CLI is available through a free trial of GitLab Duo Agent Platform.
- Free-tier GitLab users can sign up for the platform.
- GitLab Premium and Ultimate subscribers can enable Duo Agent Platform and use included GitLab Credits.
GitLab Duo CLI is best suited to teams that want AI assistance across the full development lifecycle rather than only inside an editor. Its combination of interactive approvals, headless execution, and platform-level security makes it useful for both developer support and automated DevSecOps workflows.