Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/nuejs/nue/llms.txt

Use this file to discover all available pages before exploring further.

Nue runs on Bun, a fast JavaScript runtime and package manager. Installing Nue is a two-step process: install Bun if you don’t have it, then install nuekit globally. The entire Nue ecosystem — build tool, Markdown renderer, component runtime, syntax highlighter, and state manager — arrives in under 1MB with zero nested node_modules.

System requirements

RequirementMinimum version
Bun>= 1.2.2
Operating systemmacOS, Linux, or Windows (WSL recommended)
Nue does not support Node.js as a runtime. The CLI shebang is #!/usr/bin/env bun and several features depend on Bun-specific APIs such as Bun.file, Bun.write, and Bun.spawn. Running nue under node will fail.

Install Bun

1

Install Bun

curl -fsSL https://bun.sh/install | bash
After installation, restart your terminal or source your shell configuration file so that the bun command is available on your PATH.
2

Verify Bun version

bun --version
The output should show 1.2.2 or higher. If it shows an older version, upgrade with:
bun upgrade

Install Nue

1

Install nuekit globally

bun install -g nuekit
Bun downloads and links the nue binary to your global PATH. No node_modules directory is created in your projects — nuekit and all its sub-packages live in Bun’s global cache.
The nuekit package includes nuemark, nuedom, nuestate, nue-glow, and nueyaml as dependencies. You install one package and get the full ecosystem.
2

Verify the installation

nue --version
You should see output like:
Nue 2.0.0-beta.2 • Bun 1.2.2
Both the Nue version and the active Bun version are printed. If the command is not found, check that Bun’s global bin directory is on your PATH (typically ~/.bun/bin).

Confirm the install works

Run nue --help to see all available commands and options:
nue --help
Usage
  nue [command] [options] [file_matches]

Commands
  serve     Start development server (default command)
  build     Build a production site
  preview   Preview the production site
  create    Use a project starter template

Options
  -p or --port          Serve/preview the site on this port
  -n or --dry-run       Show what would be built
  -s or --silent        Suppress output messages
      --verbose         Show detailed output
      --clean           Clean output directory before building

Upgrading Nue

To upgrade to the latest version of nuekit:
bun install -g nuekit@latest

The 1MB footprint

A typical React or Next.js project installs 500MB or more of node_modules before you write a single line of code. Nue’s entire dependency tree — including the Markdown renderer, syntax highlighter, reactive component runtime, and state manager — is under 1MB as a global install. This has practical consequences:
  • No per-project installs. You don’t run bun install or npm install when creating a new Nue project. The global install is shared across every project on your machine.
  • Instant cold starts. The CLI starts in milliseconds because there is no module resolution graph to traverse at startup.
  • No lockfile drift. There is no package-lock.json or bun.lockb to keep in sync across team members for the framework itself.
Some templates (such as full) include their own package.json for project-specific server dependencies. These are separate from the Nue framework and only needed for those specific features.

Troubleshooting

Bun installs global binaries to ~/.bun/bin. Make sure this directory is on your PATH:
export PATH="$HOME/.bun/bin:$PATH"
Add this line to your ~/.bashrc, ~/.zshrc, or equivalent shell configuration file, then restart your terminal.
Run bun upgrade to update to the latest stable release. If you installed Bun through a package manager (Homebrew, APT, etc.), upgrade through that package manager instead to avoid version conflicts.
Nue’s serve and build commands require either a site.yaml file or an index.html / index.md in the current directory. If neither is present, Nue exits with this message. Create one of those files or navigate to your project directory before running nue.

Next steps

Quickstart

Create your first project and start the dev server in under a minute.

Introduction

Learn what Nue is, how it compares to React, and which packages it includes.

Build docs developers (and LLMs) love