cairncms

CairnCMS is a real-time API and App dashboard for managing SQL database content
2,273 24
Install
npm install cairncms
Latest Version:1.6.2
License:GPL-3.0-only
Last Updated:Oct 23, 2026
Links: GitHub  ·  npm
Maintainer: cairncms-dev

cairncms

cairncms is the distributable CLI for CairnCMS, a self-hosted headless CMS that serves a REST and GraphQL API with a no-code admin app on top of an SQL database. Installing this package gives you a single binary that runs the API, serves the admin app, and handles database bootstrap and migrations.

Install

npm install -g cairncms

Node 22 or newer is required. pnpm and yarn work too.

Quick start

For a quick local run against SQLite:

export KEY=$(openssl rand -hex 16)
export SECRET=$(openssl rand -hex 32)
export DB_CLIENT=sqlite3
export DB_FILENAME=./cairncms.db

cairncms bootstrap
cairncms start
  • KEY and SECRET sign and encrypt auth tokens. Any random strings work; keep them stable across restarts.
  • DB_CLIENT selects the database driver. Each driver expects its own vendor-specific variables (DB_FILENAME for SQLite, DB_HOST / DB_USER / DB_PASSWORD for networked databases, etc.).
  • bootstrap runs first-time setup: applies migrations and creates the admin tables and default admin user. Safe to run on an empty database; skip it on subsequent starts.
  • start serves the API and admin app.

After start, the admin app is available at http://localhost:8055.

Supported databases

  • SQLite 3
  • PostgreSQL (current release and 10.x LTS)
  • MySQL 8 and MySQL 5.7
  • MariaDB

Documentation

See the CairnCMS documentation for configuration, authentication, extension development, and API reference details.

Issues, contributing, security

License

GPLv3.

Related Packages

@cairncms/api

CairnCMS is a real-time API and App dashboard for managing SQL database content

3,575 24
@db-studio/api

DB Studio (formerly Directus v9) is a real-time API and App dashboard for managi...

984 1
directus

Directus is a real-time API and App dashboard for managing SQL database content

913,890 38,640
@directus/api

Directus is a real-time API and App dashboard for managing SQL database content

910,406 38,640
@wbce-d9/api

Directus is a real-time API and App dashboard for managing SQL database content

27,212 177

Version History

Version Released License
1.6.2 GPL-3.0-only
1.6.1 GPL-3.0-only
1.6.0 GPL-3.0-only
1.5.0 GPL-3.0-only
1.4.0 GPL-3.0-only
Pre-releases (5)
Version Released License
1.0.0-beta.5 GPL-3.0-only
1.0.0-beta.4 GPL-3.0-only
1.0.0-beta.3 GPL-3.0-only
1.0.0-beta.2 GPL-3.0-only
1.0.0-beta.1 GPL-3.0-only