Skip to content
@cosmicjs

Cosmic

All-in-one web development and deployment platform. Go from idea to production in minutes.
Cosmic headless CMS

Cosmic: The AI-Native Headless CMS

Build content-powered websites, apps, and AI agents with a flexible content API, AI generation built in, and a CLI that goes from idea to production in minutes.

npm downloads X

WebsiteDocsTemplatesBlogX


Why developers choose Cosmic

  • Content API: A flexible REST and content API and toolkit backed by a fast, globally distributed CDN.
  • AI content generation: Generate text, images, and video directly from the dashboard or via the SDK.
  • AI-powered CLI: Manage content, media, deployments, and AI agents through natural language or direct commands.
  • MCP server: Connect Cosmic content to Claude, Cursor, and any MCP-compatible client.
  • JavaScript SDK: First-class TypeScript support for Node, browsers, and native apps.
  • Framework agnostic: Works with Next.js, Astro, Remix, SvelteKit, React Native, or any framework.

Get started in 30 seconds

npm install -g @cosmicjs/cli
cosmic login

Or sign up in seconds with your AI assistant.

Or install the SDK in an existing project:

npm install @cosmicjs/sdk
import { createBucketClient } from "@cosmicjs/sdk";

const cosmic = createBucketClient({
  bucketSlug: "your-bucket-slug",
  readKey: "your-read-key",
});

const { objects: posts } = await cosmic.objects
  .find({ type: "posts" })
  .props(["slug", "title", "metadata"])
  .limit(10);

Key repositories

  • cosmic-sdk-js: Official JavaScript/TypeScript SDK.
  • cli: AI-powered CLI for managing content, media, deployments, and agents.
  • mcp: Model Context Protocol server for Cosmic.
  • skills: Agent skills for working with Cosmic content.
  • cosmic-sdk-swift: Swift SDK for iOS and macOS.

Templates & examples

Browse all community projects on cosmicjs.com.

Community

Contributing

We welcome contributions across all our repos. Each project has its own CONTRIBUTING.md. For bugs or feature requests, open an issue in the relevant repository.


Build content-powered apps faster. From idea to production in minutes.

Pinned Loading

  1. cosmic-sdk-js cosmic-sdk-js Public

    The official JavaScript SDK for Cosmic. Use it to power content server-side, in the browser, and in native apps.

    TypeScript 18 4

  2. simple-nextjs-blog simple-nextjs-blog Public template

    A simple blog powered by Next.js and the Cosmic headless CMS

    TypeScript 67 27

  3. simple-astro-blog simple-astro-blog Public template

    A simple astro blog powered by the Cosmic CMS

    Astro 55 16

  4. nextjs-developer-portfolio nextjs-developer-portfolio Public template

    A developer portfolio template powered by the Cosmic headless CMS.

    JavaScript 45 16

  5. blocks blocks Public

    React components for building Cosmic powered websites and apps.

    TypeScript 22 4

  6. agency-template agency-template Public

    A website template built using Cosmic's React components, Blocks.

    TypeScript 29 23

Repositories

Showing 10 of 195 repositories

Top languages

Loading…

Most used topics

Loading…