for developers

Structured APIs. TypeScript-native. Build locally with AI.

SleekCMS is a headless CMS with a REST API, a TypeScript-friendly client, and a CLI that lets you build and maintain entire sites locally in VS Code or Cursor — with full AI-agent support baked in.

npm install @sleekcms/client · REST API · TypeScript-native · Full AI-agent support

Model content your way

Define typed schemas — pages, entries, blocks, option sets — in a visual editor. The API reflects exactly what you modeled. No surprises, no resolver complexity.

Fetch with a single call

One authenticated endpoint returns your entire content graph as JSON. No N+1 queries. Environment-scoped. Cache by _tag for instant invalidation.

Your stack — or ours

Integrate with Next.js, Astro, Nuxt, 11ty, or any framework. Or skip the frontend entirely and use the built-in site generator with EJS templates.

@sleekcms/client

One package. Two modes. Any framework.

Sync client for SSG, async for SSR. Both ship full TypeScript types. Both backed by the same content model.

import { createSyncClient } from '@sleekcms/client';

const client = await createSyncClient({
  siteToken: 'YOUR_SITE_TOKEN',
  env: 'production'
});

// All methods are synchronous after init
const page  = client.getPage('/blog/hello-world');
const slugs = client.getSlugs('/blog');
const posts = client.getPages('/blog', { collection: true });

// Perfect for Next.js SSG, Astro, 11ty
// Fetches all content upfront, zero latency per call
Fetches all content upfront. Ideal for Next.js SSG, Astro, and 11ty.
import { createAsyncClient } from '@sleekcms/client';

const client = createAsyncClient({
  siteToken: 'YOUR_SITE_TOKEN'
});

// Fetches on demand — fresh content per request
const page = await client.getPage('/products/widget');
const tags = await client.getEntry('tags');
Fetches on demand. Fresh content per request. Ideal for SSR.
import { usePage } from '@sleekcms/react';

export default function BlogPost({ slug }: { slug: string }) {
  const { page, loading, error } = usePage(`/blog/${slug}`);

  if (loading) return <Skeleton />;
  if (error)   return <ErrorState />;

  return (
    <article>
      <h1>{page.title}</h1>
      <img src={page.hero.url} alt={page.hero.alt} />
    </article>
  );
}
Loading states, error handling, and automatic refetching built in.
API design

One endpoint. One JSON payload. Everything your frontend needs.

No N+1 queries. No resolver trees. No waterfalls. A single authenticated request returns your entire content graph — pages, entries, images, option sets, and site config.

pages All routable content with _path, _slug, and all field data
entries Keyed by handle — single objects or arrays
images Named site-level images accessible by key
options Option sets as [{ label, value }] arrays
_tag Changes on every publish — use for cache invalidation
Image transformation pipeline
transforms.ts
const page = client.getPage('/');

// 1200×600 WebP hero
const heroUrl = `${page.hero_image.raw}
  ?w=1200&h=600&fit=cover&fmt=webp`;

// Retina OG image
const ogUrl = `${page.hero_image.raw}
  ?w=1200&h=630&dpr=2&fmt=jpg&q=85`;

// Blurred background
const bgUrl = `${page.hero_image.raw}
  ?w=1920&blur=20&q=40`;
w= h= fit= fmt= q= dpr= blur=
cms-cli

Your editor. Your AI. Your site — syncing live.

Pull your entire site into a local workspace and work with it like any other project — real files, real editors, real AI tools.

AI context injected automatically

First run writes AGENT.md (Copilot), CLAUDE.md (Claude), and .vscode/copilot-instructions.md into your workspace. Your AI already understands your models, syntax, and conventions.

Build a site from plain English

"Build a portfolio with hero, projects, contact form, shared header/footer, Tailwind CSS, and SEO tags." The AI creates all files. The watcher syncs each one. Live before the AI finishes.

Zero lock-in

Every file is plain — EJS templates, JSON, CSS. No proprietary format. Edit any line in any editor. The AI context persists so future sessions pick up from where you left off.

terminal
npx @sleekcms/cli --token YOUR_AUTH_TOKEN

# ✓ Connected to SleekCMS
# ✓ Workspace initialized — files synced
# ✓ AGENT.md written (GitHub Copilot)
# ✓ CLAUDE.md written (Claude / Claude Code)
# ✓ .vscode/copilot-instructions.md written
# 
# Watching for changes... save a file to sync.
Environments

Environments as first-class concepts

latest Always reflects current content — use for local dev and preview
staging Named alias pointing to a published content snapshot
production Your live site reads from this alias — nothing changes until you publish
_tag Changes on every publish — use for CDN cache invalidation
Multi-language

Internationalization built in

const clients = {
  en: await createSyncClient({
    siteToken: 'YOUR_SITE_TOKEN',
    lang: 'en'
  }),
  es: await createSyncClient({
    siteToken: 'YOUR_SITE_TOKEN',
    lang: 'es'
  }),
};

const page = clients[userLocale].getPage('/about');

Configure locales, translate content per field, API respects the lang parameter.

Full API access on every plan

Free plan includes the REST API, site builder, all field types, and the cms-cli. No limits on content or API calls.

forever
Free
$0
  • Full API
  • Site builder
  • All field types
  • cms-cli
recommended
Plus
$20/mo
  • No badge
  • Version revert
  • Netlify / Vercel deploy
  • Email support
for agencies
Business
$100/mo
  • Advanced roles
  • CRM webhooks
  • Priority support
  • Multi-site scale
Partner program available for agencies — [email protected]

Start building with APIs in minutes

Free plan. Full API. TypeScript client included.