cairncms
| Install | |
|---|---|
npm install cairncms |
|
| Latest Version: | 1.6.2 |
| License: | GPL-3.0-only |
| Last Updated: | Oct 23, 2026 |
| Links: | GitHub · npm |
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
KEYandSECRETsign and encrypt auth tokens. Any random strings work; keep them stable across restarts.DB_CLIENTselects the database driver. Each driver expects its own vendor-specific variables (DB_FILENAMEfor SQLite,DB_HOST/DB_USER/DB_PASSWORDfor networked databases, etc.).bootstrapruns 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.startserves 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
- Bug reports: GitHub Issues
- Contributing guide: CONTRIBUTING.md
- Security vulnerabilities: security policy or email security@cairncms.dev
License
Related Packages
CairnCMS is a real-time API and App dashboard for managing SQL database content
DB Studio (formerly Directus v9) is a real-time API and App dashboard for managi...
Directus is a real-time API and App dashboard for managing SQL database content
Directus is a real-time API and App dashboard for managing SQL database content
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 | |
| 1.3.1 | GPL-3.0-only | |
| 1.3.0 | GPL-3.0-only | |
| 1.2.0 | GPL-3.0-only | |
| 1.1.0 | GPL-3.0-only | |
| 1.0.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 |