Back to blog
Blog

Introducing the Cosmic CLI: AI-Powered Content and Code Management from Your Terminal

Cosmic's avatar

Cosmic

February 10, 2026

cover image

Meet the Cosmic CLI, an AI-powered command-line interface that brings the full capabilities of the Cosmic platform to your terminal. Build apps, manage content, deploy to production, and orchestrate AI agents, all without leaving your command line.

Install in one command


cosmic-cli-screenshot-1.png

From zero to production in minutes

The Cosmic CLI is designed to collapse the traditional development workflow into a handful of commands. What used to require designing schemas, building admin interfaces, writing frontend code, configuring hosting, and setting up CI/CD now looks like this:


That is a complete, production-ready application with content, a GitHub repository, and a live Vercel deployment.

Why a CLI?

The Cosmic dashboard is a powerful visual environment for managing content and building applications. But developers live in the terminal. Whether you are scripting automations, integrating with CI/CD pipelines, or simply prefer the speed of keyboard-driven workflows, the Cosmic CLI puts every platform capability at your fingertips.

This is not just a wrapper around API calls. The CLI includes an interactive shell, AI-powered chat modes, natural language commands, and shortcut workflows that condense complex multi-step processes into single commands.

What you can do

Manage content at scale

The command provides AI-powered content creation and management:


The Content Agent researches topics, matches your existing content style, and creates properly structured objects in your Cosmic bucket. You can also use interactive content chat mode for ongoing content operations.

Build complete applications with natural language

The command lets you describe what you want, and the CLI generates a complete, production-ready application connected to your Cosmic project:


The CLI generates the application, creates a GitHub repository, and prepares everything for deployment. What used to take hours of scaffolding, configuration, and wiring up API calls now takes a single command.

Update existing code with AI

Already have a project? The command connects to your repository and makes intelligent changes based on your instructions:


The Code Agent analyzes your codebase, creates a feature branch, and commits the changes. From there, you can create a pull request and deploy a preview, all from the terminal.

Deploy with a single command

Deploy your applications directly to Vercel with built-in environment variable management, custom domains, and real-time log streaming:


The CLI handles Vercel integration, environment configuration, preview deployments, and production releases. Monitor deployment progress, manage custom domains, and configure environment variables in real time.

Run AI agents from the command line

Create, run, and manage all three agent types directly from the terminal. AI Agents that previously required dashboard access are now fully controllable via CLI:


You can also capture browser authentication sessions for Computer Use Agents, approve pending operations, and follow up on agent work with additional instructions.

Orchestrate multi-step workflows

Chain multiple agents into automated AI Workflows:


Monitor workflow executions, review step-by-step progress, and cancel runs when needed.

Key features

Interactive shell

Start an interactive session where you can run commands without the prefix, navigate your workspace like a filesystem, and execute system commands with the prefix:



The shell includes command history, context-aware prompts showing your current workspace and bucket, and tab-friendly navigation.

AI chat modes

Start a conversational AI session with full context awareness of your content:


Provide additional context to the AI using flags:


Filesystem-style navigation

Navigate your Cosmic workspace hierarchy just like a filesystem:


Full repository management

Manage GitHub repositories, branches, pull requests, environment variables, and custom domains:


The command automatically configures your local environment with the correct Cosmic API keys, including variants for Next.js applications.

Multiple AI models

Choose from multiple AI providers and set your default:


Available models include Claude (Anthropic), GPT (OpenAI), and Gemini (Google).

Full walkthrough: zero to production

Here is a complete example showing the full lifecycle from nothing to a live, deployed application:


The entire process, from project creation to a live production application with content, takes minutes.

Getting started

Install the Cosmic CLI globally:


Or with bun:


Then log in and start building:


The CLI supports two authentication methods. User authentication provides full dashboard access with your Cosmic account:


Bucket key authentication provides quick access to a specific bucket without logging in:


Limits and access

The Cosmic CLI respects the same plan-based limits as the dashboard:

  • AI Agents: 2 agents per project on the Free plan, higher limits on paid plans
  • Scheduled Agents: Requires Starter plan or higher
  • AI Token Usage: Based on your plan allocation
  • Role-Based Access: Admin and Developer roles have full CLI access

What's next

The Cosmic CLI brings the full power of the Cosmic AI Platform to the command line, making it faster than ever to build, manage, and deploy content-driven applications. Whether you are automating content pipelines, building new features, or managing deployments across environments, the CLI fits naturally into your development workflow.

We are looking forward to seeing what you build. Join the conversation on the Cosmic Discord server to share your feedback and see what others are creating.

Resources

Ready to get started? Install the Cosmic CLI and start shipping faster.

Try Cosmic Free | Browse Projects

Ready to get started?

Build your next project with Cosmic and start creating content faster.

No credit card required • 75,000+ developers