Gitlab Cli

3 posts

gitlab3 min readCurated summary

GitLab 19.2 release notes | GitLab Docs

GitLab 19.2, released July 16, 2026, focuses heavily on AI-assisted development, workflow automation, and centralized security controls. Major additions include the generally available GitLab Duo CLI and custom flows, scheduled pipeline execution policies, and Agentic Chat integrations. Several security features remain in beta, including automated dependency remediation and vulnerability tracking on non-default branches. ## AI-Assisted Development - **GitLab Duo CLI is generally available** for Premium and Ultimate users across GitLab.com, Self-Managed, and Dedicated. - Provides interactive chat and headless CI/CD modes. - Understands GitLab projects, pipelines, and agent configurations. - Supports model selection, shared sessions, tool approvals, MCP connections, slash commands, skills, and `AGENTS.md`. - Can be installed through `glab` or as a standalone tool. - **Custom flows are generally available** across all tiers. - Define reusable, YAML-based workflows for complex multi-step tasks. - Support multi-agent orchestration and human approval checkpoints. - Trigger from mentions, assignments, pipelines, and merge request events. - Offer project or AI Catalog management, visibility controls, secure service-account execution, and YAML validation. - **Foundational flows can now start from Agentic Chat.** - Developer Flow can implement changes or open merge requests. - Code Review Flow can review merge requests. - Fix CI/CD Pipeline Flow can diagnose and repair failed pipelines. - Users approve the handoff and monitor progress in chat or under AI sessions. ## Centralized Pipeline Automation - **Scheduled pipeline execution policies are generally available for Ultimate.** - Define schedules centrally in a security policy project. - Apply them across projects without modifying each project’s `.gitlab-ci.yml`. - Run compliance scripts, security scans, and other jobs independently of commit activity. - Support daily, weekly, or monthly schedules, time zones, time windows, and branch targeting. - Each policy creates a separate pipeline. ## Dependency and Vulnerability Management - **Dependency scanning auto-remediation is in beta.** - Automatically opens merge requests for vulnerable dependency upgrades. - Defaults to patch and minor version updates. - Agentic Breaking Change Resolution can address failed pipelines caused by complex or major upgrades. - GitLab Duo analyzes errors, changelogs, and code usage, commits fixes to the same merge request, and reruns the pipeline. - The feature creates an end-to-end remediation loop, from vulnerability detection through upgrade and repair. - **Non-default branch vulnerability tracking is in beta.** - Supports long-lived branches such as `project-qa`, `project-prod`, `project-iOS`, and `project-android`. - Allows branch-specific filtering in vulnerability reports and dashboards. - Tracks all vulnerability types, including CVEs. - Preserves vulnerability metadata when branches merge into the default branch. - Allows up to twice as many tracked branches as projects in the namespace. ## Governance and Administration - **Selective GitLab Duo availability is available for GitLab Dedicated and Dedicated for Government.** - Administrators can lock selected subgroups and descendants into an “Always off” state. - Other subgroups can retain the option to enable Duo according to their permissions. - The model provides a per-subgroup allowlist rather than disabling AI for the entire instance. - Owners receive clear messaging when a parent group has disabled the features. ## Contributor Recognition - GitLab recognized **vivekshukl007** as the month’s Notable Contributor. - Their contribution added Scala language support to GitLab Orbit, improving code graph capabilities for Scala projects. GitLab 19.2 is especially valuable for teams adopting AI-driven development and centralized security automation. Organizations should evaluate Duo CLI and custom flows for productivity gains, while testing the dependency remediation and non-default branch features carefully because they remain in beta.

Read original(opens in new tab)
gitlab2 min readCurated summary

Bring GitLab Duo Agent Platform to your terminal

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.

Read original(opens in new tab)
gitlab3 min readCurated summary

Give your AI agent direct GitLab access with glab CLI

The post argues that connecting AI agents to GitLab through the `glab` CLI gives them reliable, current, structured project data instead of forcing them to rely on copied UI content or stale assumptions. Through Model Context Protocol (MCP), agents can inspect issues, merge requests, discussions, and pipelines, then take actions such as commenting or resolving review threads. This reduces friction and enables faster code review and issue triage. ## Why AI Agents Need Direct GitLab Access - Without direct access, agents may: - Hallucinate issue or merge request details. - Rely on outdated training data. - Require developers to manually copy information from GitLab. - `glab` lets agents fetch live project data, act on it, and report results. - The approach supports tools such as GitLab Duo, Claude, Cursor, and other AI assistants. ## Connecting an Agent Through MCP - Model Context Protocol allows AI tools to discover and use external capabilities at runtime. - Start the `glab` MCP server with: ```bash glab mcp serve ``` - Once configured, an agent can answer questions such as: - “What’s the status of my open merge requests?” - “Are there failing pipelines on `main`?” - When used through MCP, `glab` automatically adds `--output json` where supported, giving agents clean, structured responses. - Interactive commands are excluded from MCP so agents do not hang waiting for terminal input. - The implementation uses the official MCP SDK for compatibility with protocol changes. ## Using AI for Merge Request Review - Agents can inspect unresolved review feedback with: ```bash glab mr view 2677 --comments --unresolved --output json ``` - The response includes: - Merge request metadata and description. - Labels and author information. - Unresolved discussions and reviewer comments. - Whether blocking discussions remain unresolved. - The agent can turn this data into a prioritized list of required fixes and suggested changes. ## Resolving Review Discussions Programmatically - Agents can list discussions in structured form: ```bash glab mr note list 456 --output json ``` - After verifying that feedback has been addressed, they can resolve a discussion: ```bash glab mr note resolve 456 3107030349 ``` - Discussions can be reopened when further review is needed: ```bash glab mr note reopen 456 3107030349 ``` - Discussion IDs are available in the GitLab UI and API, so no additional lookup is required. ## Feeding AI Better GitLab Context Without MCP - Even without an MCP server, developers can use `glab` to provide agents with richer, more accurate data. - Instead of pasting a short summary such as issue counts, milestones, and labels, command output can provide structured issue, merge request, or pipeline details. - This gives the agent more context for triage and debugging while avoiding manual browser-based copying. ## Practical Recommendation Use `glab` as the structured interface between GitLab and AI agents. MCP is the most capable option for agents that need to query and modify GitLab directly, while ordinary JSON-producing `glab` commands are a useful fallback for supplying accurate context manually.

Read original(opens in new tab)