Duxt CLI

Duxt CLI#

Command-line tools for Duxt - create, develop, generate, and deploy Duxt applications from the terminal.

What is Duxt CLI?#

The Duxt CLI is your primary tool for working with Duxt projects. It handles project creation, development server with hot reload, code generation (modules, pages, components, full CRUD scaffolds), production builds, and deployment. One tool for the entire workflow.

Why Duxt CLI?#

Zero Config Dev Server#

duxt dev starts a hot-reload server with Tailwind compilation, file watching, and route generation. No setup needed.

Code Generators#

Generate modules, pages, components, layouts, models, and APIs with a single command. Full CRUD scaffolding included.

Smart Builds#

Production builds with SSR or SSG output, optimized assets, and Tailwind purging.

Integrated Docs#

Generate API documentation from your code, or create doc pages and tutorials.

Quick Start#

Install globally and create a project:

dart pub global activate duxt
duxt create my-app
cd my-app && duxt dev

Your app is running at http://localhost:4000.

Commands#


Project#

$ duxt create <project-name>

Create a new Duxt project from template. Learn more

$ duxt update

Update Duxt CLI to the latest version. Learn more

$ duxt version

Show the currently installed version. Learn more


Development#

$ duxt dev

Start the development server with hot reload, Tailwind compilation, and file watching. Learn more

$ duxt preview

Preview a production build locally before deploying. Learn more

$ duxt start

Start the production server. Learn more


Build#

$ duxt build

Build your app for production deployment (SSR). Learn more

$ duxt generate

Generate a static site (SSG) with pre-rendered HTML. Learn more


Generators#

$ duxt scaffold <name>

Generate a full CRUD module — model, pages, API routes, and components. Learn more

$ duxt g <type> <name>

Generate individual files: module, page, component, model, api, layout. Learn more

$ duxt d <type> <name>

Delete previously generated files. Learn more


Documentation#

$ duxt docs generate

Generate API documentation from your code. Learn more

$ duxt docs page <name>

Create a new documentation page. Learn more

$ duxt docs tutorial <name>

Create a new tutorial page. Learn more


Utilities#

$ duxt info

Show project information and configuration. Learn more

$ duxt doctor

Check your environment and dependencies for issues. Learn more

$ duxt clean

Clean build artifacts and caches. Learn more


Next Steps#

For help with any command:

$ duxt help
$ duxt help <command>
  • Create - Project creation options
  • Dev - Development server details
  • Generators - Code generation guide
  • Build - Production builds