Quick Start
To add Tenon to an app you already have, see Add to an existing site.
Prerequisites
- Node.js - v24 or higher. Odd-numbered versions like v23 are not supported.
- Package manager - Your preferred package manager. I like
pnpm, but anything vite supports should work. - Accounts & Infrastructure - If you're just using node, you can skip this. But depending on where you want to deploy, you will need a hosting account (e.g. cloudflare, vercel), S3-compatible storage (e.g. AWS, B2) or a db provider (like neon, turso).
How to create a new project
Run the wizard
Run the following command in your terminal to start the install wizard and configure your project as you like:
npm create tenoncms@latest
pnpm create tenoncms@latest
yarn create tenoncms
bun create tenoncms
If all goes well, you will see a success message followed by some recommended next steps. For more details on the cli, see create-tenoncms.
Go to your project
Now that your project has been created, you can cd into your new project directory to begin using Astro.
If you skipped the “Install dependencies?” step during the CLI wizard, then be sure to install your dependencies before continuing.
npm install
pnpm install
yarn install
bun install
Start the dev server
Depending on your selected configuration, you may need to add credentials to the generated .env file first. After that you can just run the following command as usual.
npm run dev
pnpm dev
yarn dev
bun run dev
Create the admin account
Open the URL the dev server prints and add /admin. Enter your name, email and a password, then select Create admin account.
The first account is the admin. After that, sign-up closes, and admins invite everyone else. If you mess up during this step or need to create a user, you can do so using the cli.
Publish your first post
The starter comes with a Posts collection. In the admin, create a post, then select Publish. Every save is a draft until you publish it.
Open the home page of your site. It lists your post, and the link opens the post's own page.
The general structure of a Tenon project
my-site/
├── .env # the secret and the database settings
├── tenon.config.ts # creates the CMS instance
├── cms/
│ └── collections/
│ └── posts.ts # the fields of a post (in an optional sub-file)
└── src/pages/ # the home page and the post page
.envholds a random secret the wizard generated, and the database settings.tenon.config.tscreates the CMS instance. See Configuration.- The
postscollection describes the fields of a post. You can also just write them into thetenon.config.ts, but it it's best practice to extrat the content types. See Collections and globals.