Top 10 CLIs for Platform Engineers in the AI Agent Era
TL;DR
Platform engineers used to run AI agents through a chat window. Now, those agents run right alongside them in the terminal. Here are the CLIs that matter in 2026 and give those agents a clean, scriptable way into your infrastructure:
- StackGen CLI
- kubectl
- Terraform / OpenTofu
- Crossplane
- Argo CD
- Vault
- GitHub CLI (gh)
- Pulumi
- Claude Code
- OpenCode for compliance-sensitive teams
Why AI Agents Are Bringing CLIs Back into Focus
Most lists like this one focus on one of two things.
Coding-agent roundups compare tools like Claude Code, Codex, Cursor CLI, and OpenCode on benchmarks, pricing, and developer experience.
Platform engineering roundups focus on tools like Backstage, Port, Crossplane, Spacelift, and Terraform, evaluating governance, self-service, and day-to-day operations.
But another question is becoming increasingly important: which CLIs are well-suited for automation?
Platform engineering has spent years making infrastructure easier to consume through Backstage catalogs, self-service portals, and golden paths. Those abstractions remain valuable, but the CLI has become just as important because automation increasingly depends on it.
A good infrastructure CLI doesn't just execute commands. It also needs to:
- Expose structured output such as JSON
- Support reliable authentication
- Run repeatedly as part of larger workflows
That's why platform teams are taking a fresh look at their CLI surface area. One comparison of 75 matched tasks across MCP-based and CLI-based agents found the CLI approach used roughly 10 to 32 times fewer tokens for equivalent work, with reliability close to 100% compared to a much rougher run for MCP.
With that in mind, here are ten CLIs every platform engineer should know in 2026.
Top 10 CLIs for Platform Engineers Back into Focus
1. StackGen CLI (Aiden for SRE and Infrastructure)
As more infrastructure workflows become automated, the CLI is becoming more than a deployment tool. StackGen CLI gives you a single interface to configure, deploy, and manage infrastructure while connecting StackGen to tools like Claude Code, Cursor, and VS Code through MCP.
Instead of switching between your terminal, IDE, and the StackGen UI, you can work with the same interface across development, deployment, and day-to-day operations.
With the StackGen CLI, you can:
- Configure, deploy, and manage infrastructure from the terminal
- Integrates with CI/CD pipelines to automate infrastructure workflows
- Starts a local MCP server with
stackgen mcp, allowing supported IDEs to interact with StackGen through a standard interface - Works with live StackGen context and performs approved actions while respecting your existing permissions
The result is less context switching. You use the same CLI to manage infrastructure from your terminal, automate deployments in CI/CD, and connect supported IDEs through MCP.
2. kubectl
Kubernetes is still the operating system of platform engineering, and kubectl remains the CLI most teams rely on every day. It's also one of the easiest tools for AI agents to work with because of its predictable design.
A consistent command pattern runs across almost every resource type, from Pods to custom CRDs. Whether an agent needs to inspect, create, update, or remove a resource, the workflow stays familiar.
Some of the reasons it works well for agents include:
- A consistent get, describe, apply, and delete pattern across resource types
- Structured output with
-o jsonor-o yaml, making it easy to parse without scraping terminal text
That consistency extends beyond Kubernetes itself. Teams building agent-ready internal platforms on top of kcp have found they can use kubectl to export, bind, and interact with APIs across the platform because every workspace behaves like a Kubernetes cluster.
If you're planning to use the StackGen CLI with Cursor, this walkthrough covers the complete MCP setup and a few practical infrastructure workflows.
3. Terraform / OpenTofu CLI
Terraform's CLI remains the backbone of infrastructure as code, while OpenTofu has become a strong open-source alternative if you prefer to avoid licensing uncertainty.
Both are well-suited to AI-assisted workflows because they follow a predictable, reviewable execution model. For you, that means:
- They provision infrastructure across thousands of cloud and SaaS providers.
- They generate execution plans that show every proposed change before anything is applied.
The plan-then-apply workflow allows an AI agent to generate a plan while a human or policy gate reviews it, keeping infrastructure changes transparent and auditable.
Whether you choose Terraform or OpenTofu, the workflow stays familiar. That's one reason both are widely regarded as foundational tools for platform engineering in 2026.
If you've worked with Terraform long enough, you've probably run into state drift. Here's how to find it and fix it.
4. Crossplane CLI
If your team is already Kubernetes-native, Crossplane helps you manage cloud infrastructure without switching between kubectl and a separate infrastructure-as-code tool. You define cloud resources using the same declarative YAML and workflows you already use for Kubernetes applications.
Crossplane extends Kubernetes so you can manage infrastructure such as:
- Databases
- Networks
- Storage
It also introduces Compositions, which let platform teams combine multiple resources into a single, simplified API that works consistently across AWS, Azure, and GCP.
For AI agents, that consistency is one of Crossplane's biggest strengths. Instead of reasoning across multiple cloud-specific CLIs, an agent can interact with a single control plane and a consistent API surface.
5. Argo CD CLI
GitOps is built on a simple idea: Git is the source of truth, and your cluster should always converge back to it. The Argo CD CLI carries that same approach into AI-assisted workflows.
When an agent opens a pull request that updates a manifest, the GitOps workflow provides a built-in review and deployment process instead of allowing changes to go directly into the cluster.
The CLI also makes it easy to:
- Compare what's running in the cluster with what's stored in Git
- Sync changes when you're ready
- Roll back quickly if a deployment doesn't go as expected
For AI-assisted operations, that combination of visibility, review, and rollback makes Argo CD more than a deployment tool. It also provides a reliable safety net for both human operators and AI agents.
6. Vault CLI
The more operational work you hand off to AI agents, the more important secrets management becomes. If an agent is running unattended, the way it receives credentials matters just as much as the tasks it's performing.
The Vault CLI helps you manage that access more securely by:
- Issuing short-lived, scoped credentials instead of long-lived static secrets
- Allowing agents to request credentials only when they're needed
- Reducing the impact of a leaked credential because temporary credentials expire automatically
This approach also makes it easier to follow the principle of least privilege. Instead of giving an agent broad, persistent access, you can grant only the permissions it needs for a specific task.
If you're running Kubernetes, Vault also works well with tools like External Secrets Operator. Together, they let you keep secrets out of Git while giving your applications and AI agents a secure, programmatic way to request credentials when they're needed.
As you automate more operational workflows, this model lets you give AI agents the access they need without creating another set of long-lived secrets to manage.
If you're exploring MCP beyond the CLI, here's a roundup of the most useful MCP servers for platform engineering.
7. GitHub CLI (gh)
If you're already using GitHub to manage your development workflow, the GitHub CLI (gh) can become one of the most useful tools in your platform engineering toolkit. As automation becomes more common in development workflows, much of their work, whether it's updating code, fixing configuration, or suggesting changes, eventually shows up as a pull request.
The GitHub CLI gives you and your AI agents a consistent way to work with GitHub from the terminal. You can:
- Create and review pull requests
- Manage issues
- Work with releases
- Monitor GitHub Actions runs
If you use GitHub Copilot CLI, you also get access to GitHub context, such as pull request history, open issues, and gists, making it easier for an agent to understand the state of your repository without leaving GitHub.
Keeping these workflows in a single command-line interface makes automation much simpler. Instead of switching between browser tabs and dashboards, you can script, review, and automate common GitHub tasks through a predictable set of commands that work well for both you and your AI agents.
8. Pulumi CLI
If you prefer writing infrastructure as code in a programming language instead of HCL or YAML, the Pulumi CLI is well worth considering. It lets you define and manage infrastructure using languages like TypeScript, Python, Go, and C#, while keeping the same infrastructure-as-code workflow.
That also makes Pulumi a natural fit for AI-assisted development. Large language models generally perform better when generating and reasoning about widely used programming languages than they do with declarative configuration languages.
The Pulumi CLI supports that workflow by giving you:
- Infrastructure definitions in familiar programming languages
- A preview step to review proposed changes before they're applied
- A consistent preview-then-up workflow that keeps human review or policy checks in place before infrastructure is updated
If you're introducing AI agents into your infrastructure workflows, that review step remains just as important. An agent can generate the proposed changes, while you or your policy controls decide whether they're ready to be applied.
If you're deciding between Terraform, Pulumi, and AWS CDK, this comparison goes into the trade-offs in more detail.
9. Claude Code
Claude Code is a terminal-based coding tool that can inspect repositories, edit files, run shell commands, and work across large codebases from the command line.
For platform engineers, that makes it useful beyond application development. Infrastructure repositories often contain Terraform, Kubernetes manifests, Helm charts, deployment scripts, CI/CD pipelines, and internal tooling. Instead of switching between a chat window and your terminal, you can work on those resources from the same session.
Key capabilities include:
- Search and edit files across a repository
- Execute shell commands with approval for privileged operations
- Maintain context across long-running tasks
- Connect to external systems through MCP servers
- Reuse operational workflows through Skills and Subagents
Skills are particularly useful for platform teams. Instead of rewriting the same instructions for recurring tasks, you can save them as markdown-based Skills. For example, you can document how to validate a Terraform plan, investigate a failed deployment, or troubleshoot a Kubernetes service. Claude Code can then follow the same workflow whenever that task comes up.
If much of your engineering work already begins in the terminal, Claude Code lets you stay there while working across your code, infrastructure, and connected tools.
10. Model-Flexible Coding CLIs (OpenCode/Kilo CLI)
Some platform teams prefer not to tie their engineering workflows to a single model provider. Model-flexible coding CLIs solve that by providing a consistent command-line interface while letting you choose which model powers it.
Two popular examples are:
- Kilo CLI, which supports multiple hosted models, bring-your-own-key configurations for providers such as Anthropic, OpenAI, and Google, and integrates with tools like VS Code, JetBrains, GitHub, and Slack.
- OpenCode, an open-source, terminal-first coding CLI that supports multiple model providers through your own API keys.
The advantage is consistency. Your engineers learn one CLI while you retain the option to evaluate new models, switch providers, or meet compliance requirements without changing how your team interacts with the tool.
If you're evaluating coding CLIs today, choosing one that isn't tied to a single model provider gives you more flexibility as both your infrastructure and model requirements evolve.
How to Choose Which CLIs to Standardize On
Before adding another CLI to your platform, evaluate it against these criteria:
- Structured output: JSON or YAML should be available for every command you plan to automate.
- Plan or preview support: Look for
plan,diff, ordry-runcommands before making changes. - Idempotency: Running the same command twice should produce predictable results.
- Reliable exit codes: Your CI/CD pipelines should be able to determine success or failure without parsing logs.
- Authentication: Prefer short-lived credentials, workload identity, or SSO over long-lived API keys.
- Automation compatibility: Commands should be easy to chain in scripts, pipelines, and GitOps workflows.
- Consistent command structure: Stable syntax and flags reduce maintenance as your automation grows.
- State inspection: You should be able to inspect, compare, and troubleshoot infrastructure programmatically.
If a CLI checks most of these boxes, it's likely to be easier to standardize across your team and more reliable as you introduce AI-assisted workflows into your platform.
Work Across Your Infrastructure from One CLI
If you're already using infrastructure CLIs like kubectl, terraform, and gh, the StackGen CLI complements them rather than replacing them.
It gives you a single interface to work with StackGen across your terminal, CI/CD pipelines, and supported IDEs through MCP, so you can manage infrastructure and deployment workflows without changing the way you work.
You can get started with the StackGen CLI in a few minutes:
- Install: Install the StackGen CLI using Homebrew or download the binary for macOS, Linux, or Windows.
- Configure: Authenticate using a Personal Access Token (PAT) and configure your StackGen environment.
- Start using it: Explore the available commands to provision infrastructure, automate workflows, or start the local MCP server with
stackgen mcpto connect supported IDEs.
Get started for free here, or book some time with our team to know more!
FAQs
Do AI agents replace CLIs like kubectl and terraform?
No. AI agents use CLIs to execute actions on infrastructure. Tools like kubectl, terraform, aws, and gh remain the execution layer for provisioning, deployments, and operational workflows.
How is the StackGen CLI different from kubectl or terraform?
The StackGen CLI doesn't replace tools like kubectl or terraform. It provides a single interface for working with StackGen, including infrastructure management, deployment workflows, and MCP connectivity. You continue using your existing infrastructure tools while using the StackGen CLI to interact with StackGen services.
What makes a CLI automation-friendly?
Look for structured output (JSON or YAML), consistent command patterns, preview or dry-run support, predictable exit codes, idempotent operations, and authentication methods that integrate with your existing identity provider.
Should I standardize on one coding agent or use multiple?
It depends on your requirements. Many engineering teams use one primary coding agent for day-to-day development and keep a model-flexible CLI available for evaluating different model providers, meeting compliance requirements, or testing new capabilities.
How do I decide which CLIs to standardize on?
Prioritize CLIs with structured output, predictable command patterns, preview or dry-run support, secure authentication, stable exit codes, and good integration with your CI/CD and automation workflows. These characteristics make them easier to automate, govern, and maintain at scale.
About StackGen:
StackGen is the pioneer in Autonomous Infrastructure Platform (AIP) technology, helping enterprises transition from manual Infrastructure-as-Code (IaC) management to fully autonomous operations. Founded by infrastructure automation experts and headquartered in the San Francisco Bay Area, StackGen serves leading companies across technology, financial services, manufacturing, and entertainment industries.