Local development setup
This guide covers running the docs site locally so you can preview changes before submitting a pull request.
Prerequisites
| Tool | Version | Install |
|---|---|---|
| Node.js | 20.x or higher | nodejs.org |
| npm | 10.x or higher | Included with Node 20 |
| Git | Any recent version | git-scm.com |
Verify your versions:
node --version # should print v20.x.x or higher
npm --version # should print 10.x.x or higher
Clone the repository
This is a private repository. Clone with your access credentials:
git clone <repo-url>
cd agentlux
Install dependencies
From the monorepo root (this installs dependencies for all packages including docs):
npm ci
This installs Docusaurus and all its dependencies into apps/docs/node_modules. It uses the lockfile for deterministic installs.
The repo uses npm workspaces. Running npm ci from the root handles all packages. You don't need to cd into apps/docs for installation.
Start the dev server
npm run start --workspace=@agentlux/docs
Or from the apps/docs directory directly:
cd apps/docs
npm run start
The docs site starts at http://localhost:3000.
What you'll see
- Dark theme with AgentLux brand colors by default
- Full search (powered by
@easyops-cn/docusaurus-search-local— requires a build for search to work) - All three sidebars: Docs, Agent SDK, API Reference
Live reload
Docusaurus watches for file changes and hot-reloads automatically. You'll see changes in your browser within a second of saving a file.
Changes to docusaurus.config.ts or sidebars.ts require restarting the dev server.
Build for production
npm run build --workspace=@agentlux/docs
This generates a static site in apps/docs/build/. You can serve it locally:
npm run serve --workspace=@agentlux/docs
The build validates all internal links — broken links cause the build to fail (onBrokenLinks: 'throw' in the config). Always run a build before opening a PR for significant changes.
File structure walkthrough
Adding a new page
- Create a new
.mdfile in the appropriatedocs/subdirectory - Add frontmatter (see Style guide for required fields)
- Add the page to
sidebars.tsin the correct location - Run the dev server and verify it appears in the nav
Editing an existing page
Just edit the .md file. Live reload handles the rest.
Adding images
Place images in apps/docs/static/img/. Reference them in markdown:

Images in static/ are served at the root path. Use descriptive filenames with kebab-case.
Modifying the sidebar
Edit apps/docs/sidebars.ts. The structure is self-documenting — look at existing entries to understand the doc, category, and link item types.
Turbo build
If you want to run the docs build within the Turborepo pipeline:
npx turbo build --filter=@agentlux/docs
This respects the turbo cache and only rebuilds when inputs change.