# sitemd: the best way to build websites with Gemini

center:
![sitemd + gemini](/media/content/agents/sitemd+gemini.svg +height:300)
/center

# The best way to build websites with Gemini

sitemd is a **static site generator** / **website building toolkit** for AI coding agents like Gemini.\n\nIt's a complete agent-driven framework with MCP server, dev server, guardrails, best practices, and one-line integrations for essentials like SEO, analytics, content generation, doc writing, user login, content gating, dynamic data + detail pages, and more.\n\nIt's a site-building superpower for Gemini.

{#install}
## Install sitemd for Gemini

Scaffold a fresh sitemd project and open it in [Gemini CLI](https://geminicli.com+newtab):

```bash
npx @sitemd-cc/sitemd init my-site
cd my-site
gemini
```

The sitemd binary is fetched automatically as part of `npx init` (via the package's `postinstall` hook) — no separate install step. The scaffolded project ships with `gemini-extension.json` and `GEMINI.md` at the root. Gemini detects the extension on launch, registers the MCP server, and loads the sitemd context automatically — your agent has the full toolset on first use.

Extension source: [gemini-extension.json](https://github.com/sitemd-cc/sitemd/blob/main/gemini-extension.json+newtab) and [GEMINI.md](https://github.com/sitemd-cc/sitemd/blob/main/GEMINI.md+newtab) at the root of the public sitemd repo.

button: Install Now: /install +big +icon:download
button: Read the Docs: /docs +big +outline +icon:book-open

---

{#why}
## Why use sitemd with Gemini

Gemini is amazing at writing code, and will already happily build websites from scratch. Adding sitemd makes the process faster and reduces friction.

sitemd is a super-efficient toolkit for coding agents to build websites. It ships with:

- **A full suite of MCP tools** for pages, settings, content generation, SEO, deploy, auth, and more — Gemini calls them directly via the bundled extension, no manual file editing required
- **`GEMINI.md` context file** that loads the project layout, MCP tool reference, settings format, and markdown extensions into Gemini's context as soon as it enters a sitemd project
- **`SITEMD_TOKEN` env-var integration** declared in `gemini-extension.json` so Gemini handles the auth token securely without you having to wire it manually
- **A complete framework** under the hood: auth, gated content, forms, deploy targets, image handling, dynamic data, theming, premium modules — none of which you and Gemini have to invent
- **Markdown all the way down** — every page, every setting, every navigation file is human-readable `.md`. Gemini reads markdown natively, edits it confidently, and never has to reverse-engineer an external build system

---

{#scratch}
## Why not just prompt Gemini to build a site from scratch?

sitemd is a site-building superpower for Gemini. It helps Gemini build a consistent working site quickly by skipping all the scaffolding that's already baked-in to sitemd. sitemd is still very flexible and customizable, so you and Gemini can still build sites however you want. sitemd also ships with one-line integrations for essentials like SEO, analytics, content generation, doc writing, user login, content gating, dynamic data + detail pages, and more that would take considerable time for you and Gemini to build from scratch.

---

{#out-of-the-box}
## What Gemini gets out of the box

- **A full suite of MCP tools** — page CRUD, content generation, SEO audit, deploy, auth, dynamic data, batch operations
- **Gemini extension (`gemini-extension.json`)** — declares the MCP server, context file, and `SITEMD_TOKEN` env var
- **`GEMINI.md` context file** — loads the full sitemd project context so the agent doesn't waste turns rediscovering structure
- **Auto-generated SEO** — Open Graph, JSON-LD, sitemap, robots.txt, llms.txt, OG images
- **Deploy targets** — Cloudflare Pages, Netlify, Vercel, GitHub Pages with one command
- **Auth providers** — Supabase, Firebase, Clerk, Auth0, custom API
- **Dynamic data** — Supabase, Firebase, Airtable, REST API with auto-generated detail pages
- **Forms, embeds, galleries, modals, gated content, theming, dark mode, i18n-friendly markdown**

---

{#first-site}
## Build your first site with Gemini

After install, in any Gemini session inside a sitemd project:

> "Build me a documentation site for my SaaS product"

Gemini calls `sitemd_status`, then `sitemd_site_context` to learn the conventions, then `sitemd_pages_create_batch` to scaffold pages, then `sitemd_content_validate` to check quality, then `sitemd_deploy` when you confirm. The `GEMINI.md` context file provides the full project context up front so the agent doesn't waste turns rediscovering structure. You watch the dev server preview update live.

You can also run a skill directly:

```text
/kickstart a portfolio site for a freelance designer named Mira
```

That spins up a complete first-draft site — pages, navigation, settings, theme, copy — from a single sentence.

---

{#faq}
## Gemini FAQ

**Does sitemd work with Gemini CLI?**\n
Yes. The recommended path is `npx @sitemd-cc/sitemd init my-site` — that scaffolds a project, downloads the binary automatically via the npm postinstall hook, and wires up the Gemini extension, `GEMINI.md` context file, and MCP server in one step. Gemini picks the extension up automatically on first launch.

**What MCP tools does sitemd give Gemini?**\n
A full suite of tools covering page CRUD, content generation, SEO, deploy, auth, dynamic data, batch operations, content validation, and project status. See [MCP Server](/docs/mcp-server) for the full list.

**What does GEMINI.md do?**\n
It's the Gemini context file that loads the full sitemd project context — project layout, MCP tool reference, settings format, markdown extension reference — so Gemini doesn't have to rediscover the structure every session.

**How is the auth token handled?**\n
The Gemini extension declares `SITEMD_TOKEN` as a sensitive env var in `gemini-extension.json`. Gemini prompts for it once and stores it securely; sitemd's MCP tools pick it up automatically when you deploy.

**Do I have to host my site with sitemd?**\n
No, and you couldn't even if you wanted to. sitemd isn't a website hosting service — it's a website building toolkit you install on your machine. You'll build your site locally, then [deploy & host wherever you want](/docs/deploy#deploy-targets).

**Is there a free version/trial?**\n
Yes. sitemd can run in [free trial mode](/docs/build-modes#trial-mode) forever. You can preview [all features](/docs/build-modes#all-features-work-in-both-modes) in trial mode. You only need to pay when it's time to deploy your site.

**Can I use sitemd for client sites?**\n
Absolutely. 15% bulk discount when purchasing 50+ site slots at one time.

**What other agents does sitemd support?**\n
[Claude Code](/for/claude-code), [Cursor](/for/cursor), [Codex](/for/codex), [OpenClaw](/for/openclaw), and any MCP-capable agent. The same MCP server and skill format work across all of them.

---

# Get Started
card: Try it in your browser
card-icon: panel-top
card-link: Demo sandbox: https://demo.sitemd.cc+newtab
card: Read all about it
card-icon: book-open
card-link: Docs: /docs
card: Try it on your machine
card-icon: download
card-link: Install: /install
card: Buy it
card-icon: shopping-cart
card-link: Purchase: /upgrade