Getting Started
This guide walks you through creating your first Syntext documentation site. By the end, you'll have a live docs site with hot-reload development and production deployment.
Prerequisites
- Node.js 18+ or Bun installed
- A code editor (VS Code recommended)
- A terminal
Installation
Install the Syntext CLI globally:
curl -fsSL https://get.syntext.dev | sh
brew install syntext-dev/tap/stx
npm install -g @syntext/cli
Verify the installation:
stx --version
Create Your First Docs Site
Step 1: Initialize
Navigate to your project directory and run:
cd my-project
stx init --name "My Docs" --create
The --create flag creates a project on Syntext and links it automatically. If you prefer to do this manually, omit the flag and use stx connect later.
This creates the following structure:
my-project/
├── syntext.json # Site configuration
├── docs/
│ ├── index.mdx # Home page
│ └── guides/
│ └── getting-started.mdx
└── public/ # Static assets
Step 2: Start Development
stx dev
This deploys a preview build and outputs your URL:
✓ Preview: https://dev--my-project.syntext.dev
The preview updates automatically as you save files.
Step 3: Edit Your First Page
Open docs/index.mdx and make changes. The browser updates instantly.
---
title: Welcome to My Docs
description: Get started with our product.
---
# Welcome
This is my documentation site powered by Syntext.
<Note>
Edit this file at `docs/index.mdx` to customize your home page.
</Note>
Step 4: Deploy to Production
When you're ready to publish:
stx deploy
Your docs are now live at your-project-docs.syntext.dev.
Set up a custom domain like docs.yourcompany.com in the dashboard.
Project Layouts
Syntext supports two project layouts:
Standalone Docs Repo
Configuration at the repository root:
my-docs/
├── syntext.json
├── docs/
├── public/
└── openapi.json
Embedded in App Repo
Documentation inside .syntext/ or .stx/:
my-api/
├── src/
├── package.json
└── .syntext/
├── syntext.json
├── docs/
└── public/
The CLI auto-detects which layout is in use. Commands like stx dev and stx deploy work identically in both cases.
Next Steps
Learn how to organize your documentation
Master MDX syntax and components
Explore all CLI commands
Discover available MDX components