top | item 46965065

Show HN: Cosmic CLI – Build, deploy, and manage apps from your terminal with AI

2 points| tonyspiro | 20 days ago |github.com

Hi HN, I'm Tony, founder of Cosmic (a headless CMS). We just open-sourced a CLI that covers the full lifecycle of a content-driven app from creating the content model to deploying to production to updating the codebase all without leaving the terminal.

Here's what the full workflow looks like:

  # Create a project with an AI-generated content model
  cosmic projects create
  # → "A recipe blog with recipes, categories, and authors"

  # Generate content
  cosmic content -p "Create 5 recipes with images across different categories"

  # Build a full-stack app wired to your content
  cosmic build -p "A modern recipe blog with search and category filtering"
  # → Generates a Next.js app, pushes to GitHub

  # Deploy
  cosmic deploy start --watch
  # → Deployed to Vercel

  # Later: update the existing codebase with natural language
  cosmic update recipe-blog -p "Add dark mode and a favorites feature" -b feature-branch

  # Create a PR and merge
  cosmic repos pr create <repoId>
  cosmic repos pr merge <repoId> 1
  # → Auto-deploys to production
That's the part I think is interesting: it's not just one step, it's the full loop. Create content, build the app, ship it, iterate on it, merge and redeploy. Each step is a single command.

A few of the more technically interesting pieces:

AI agents. You can create three types: content agents (CMS operations), repository agents (code changes on branches), and computer use agents (browser automation via Puppeteer with AI vision). Chain them into multi-step workflows with scheduling.

Interactive shell. "cosmic shell" drops into a REPL where you navigate workspaces and projects like a filesystem: cd, ls, pwd. System commands with ! prefix. No cosmic prefix needed.

Multi-model. Supports Claude Opus/Sonnet/Haiku, GPT-5/5.2/5-mini/4o, and Gemini 3 Pro. Set a default or specify per-command.

It also handles the day-to-day stuff you'd normally do in a dashboard: billing, team roles, webhooks, domain/DNS config, environment variables.

Built with TypeScript and Commander.js. MIT licensed.

Install: npm install -g @cosmicjs/cli

GitHub: https://github.com/cosmicjs/cli

Docs: https://www.cosmicjs.com/docs/cli

Happy to answer questions.

discuss

order

No comments yet.