v1 The modular release is here — everything is a module now. →

Open-source CMS powered by Go v1

Lesstruct

Everything is a module. The Go CMS you can shrink, extend, and ship as one binary — for humans and AI agents.

The Lesstruct admin panel: rich-text editor with custom fields and an SEO panel.

What’s new in v1

The 1.0 rewrite turned every feature into a first-class module with a frozen, versioned contract at its center.

Features

A single binary runs the whole CMS. Configure content types and fields in config.toml, extend with WebAssembly, and drive it from the terminal. See the full list →

One binary, no Docker

A static Go binary plus embedded SQLite. No runtime, no container, no node_modules in production.

Modular & lean

Eleven built-in modules with a declared graph — disable what you don't need and the binary stays one lean whole.

Headless mode

Flip [headless] enabled = true to serve only the admin panel and REST API — a pure headless CMS.

Two-layer configuration

config.toml holds your content schema; .env holds deployment state. Only JWT_SECRET is required.

Custom post types & fields

Define post types and fields in config.toml. The admin form, storage, and queries all read from it.

Importers & Exporters

Migrate from WordPress (WXR) or Hugo — posts, custom fields, media, authors — via async jobs. Export everything as a Hugo-compatible archive and HTML static files.

WebAssembly plugins

Drop a .wasm into plugins/ to hook before_save, after_create, after_publish.

Media & WebP

A media library with automatic WebP conversion, configurable thumbnail variants, and dedup.

AI built in

Generate images, enhance & translate text, and author on-brand HTML/CSS from a prompt — reusing your theme's design tokens. Bring your own key.

i18n by default

Multilingual content with translation groups and hreflang in the sitemap.

SSR, SSG & AMP

Server-rendered and SEO-friendly. Generate a static site with AMP variants via the admin or lesstruct-cli ssg.

REST API & CLI

A versioned /api/v1 with API keys, plus lesstruct-cli for agents and terminals.

Roles & security

JWT auth, failed-login lockout, Argon2id, rate limits, and security headers.

Custom roles

Add custom roles or override the built-ins with [[role]] entries in config.toml — per-post-type manage, publish, media, and comment capabilities.

Safe by default

HTML sanitized on write and read, a configurable CSP, and safe-link policies — secure without a security degree.

One server, one CLI

One product, one companion tool. SQLite is built in by default; PostgreSQL and MySQL are a configuration away. The API and CLI in the docs →

lesstruct server

The whole CMS as one static binary: admin panel, REST API, and the rendered content site. SQLite by default; PostgreSQL and MySQL via DB_DRIVER.

lesstruct-cli cli

The companion command line for AI agents: content, media, and export operations straight from the terminal.

Quick start#

1
2
3
go install github.com/aristorinjuang/lesstruct@latest
export JWT_SECRET="$(head -c 48 /dev/urandom | base64)"
lesstruct

Open http://localhost:8080/admin, register the first account, and start publishing. Full configuration reference lives in the Configuration docs.

Install the CLI#

lesstruct-cli is a terminal client for the REST API — useful for scripts and AI agents.

1
go install github.com/aristorinjuang/lesstruct/cmd/lesstruct-cli@latest

Point it at a running server and create an API key from the admin panel. The full command reference lives in the API Reference.

Where to go next#

AI agent ingestion#

This site is designed to be crawlable by AI agents in addition to humans.

  • /llms.txt — index of every documentation page with a one-line summary.
  • /llms-full.txt — every page concatenated in section order, suitable as a single context window.
  • Per-page markdown is also served at the canonical path (e.g. /docs/api-reference/index.md) for retrieval pipelines that prefer per-page fetches.
  • /sitemap.xml — Hugo’s built-in sitemap.

For an LLM working inside the repo, the source tree is the contract: docs/ is developer-facing, skills/*/references/ is the user-facing snapshot that ships in the binary.