Version: 1.19.0 | Updated: 2026-04-14
- CLI entry:
bun run flux <command>or directly via npm scripts - Commands are modular, each in
core/cli/commands/ - Plugins can register custom commands
- Aliases supported (e.g.,
gforgenerate)
Start full-stack development server with hot reload.
bun run dev # Full-stack (default)
bun run dev --port 4000 # Custom backend port
bun run dev --frontend-only # Vite only (port 5173)
bun run dev --backend-only # Elysia only (port 3000)
bun run dev --frontend-port 8080 # Custom Vite port| Option | Short | Type | Default | Description |
|---|---|---|---|---|
--port |
-p |
number | 3000 | Backend server port |
--frontend-port |
number | 5173 | Frontend server port | |
--frontend-only |
-f |
boolean | false | Run only Vite dev server |
--backend-only |
-b |
boolean | false | Run only Elysia server |
Build application for production.
bun run build # Full build (frontend + backend)
bun run build --frontend-only # Vite build only
bun run build --backend-only # Server bundle only| Option | Type | Default | Description |
|---|---|---|---|
--frontend-only |
boolean | false | Build only frontend |
--backend-only |
boolean | false | Build only backend |
--production |
boolean | true | Enable minification |
Output:
- Frontend:
dist/client/ - Backend:
dist/server/ - Config:
dist/config/
Generate code from templates.
bun run flux generate <type> <name> [options]
# Aliases: g, gen
bun run flux g controller user
bun run flux g component UserCard
bun run flux g service auth
bun run flux g route api/users
bun run flux g plugin my-plugin| Type | Description | Output Location |
|---|---|---|
controller |
Business logic handler | app/server/controllers/ |
route |
API endpoint | app/server/routes/ |
component |
React component | app/client/src/components/ |
service |
Reusable service | app/server/services/ |
plugin |
FluxStack plugin | plugins/ |
| Option | Short | Type | Description |
|---|---|---|---|
--path |
-p |
string | Custom output path |
--template |
-t |
string | Template variant |
--force |
-f |
boolean | Overwrite existing |
--dry-run |
boolean | Preview without creating |
Interactive generator with prompts.
bun run flux interactive
# Walks through generation options step by stepInstall and whitelist an NPM plugin securely.
bun run flux plugin:add <plugin-name> [options]
bun run flux plugin:add fluxstack-plugin-auth
bun run flux plugin:add @acme/fplugin-payments --skip-audit| Option | Description |
|---|---|
--skip-audit |
Skip npm security audit |
--skip-confirmation |
Skip confirmation prompt |
Actions performed:
- Validates plugin name
- Runs npm audit (unless skipped)
- Installs plugin
- Enables
PLUGINS_DISCOVER_NPM=true - Adds to
PLUGINS_ALLOWEDwhitelist
Remove plugin from whitelist and optionally uninstall.
bun run flux plugin:remove <plugin-name> [options]
# Alias: plugin:rm
bun run flux plugin:remove fluxstack-plugin-auth
bun run flux plugin:remove my-plugin --keep-installed| Option | Description |
|---|---|
--skip-confirmation |
Skip confirmation prompt |
--keep-installed |
Only remove from whitelist, keep package |
List all plugins (installed, whitelisted, discovered).
bun run flux plugin:list [options]
# Alias: plugin:ls
bun run flux plugin:list
bun run flux plugin:list --installed
bun run flux plugin:list --whitelisted
bun run flux plugin:list --json| Option | Description |
|---|---|
--installed |
Show only installed NPM plugins |
--whitelisted |
Show only whitelisted plugins |
--json |
Output as JSON |
Manage plugin dependencies.
bun run flux plugin:deps <subcommand> [options]
bun run flux plugin:deps install # Install all plugin deps
bun run flux plugin:deps install --dry-run # Preview installation
bun run flux plugin:deps list # List plugin dependencies
bun run flux plugin:deps list --plugin crypto-auth # Specific plugin
bun run flux plugin:deps check # Check for conflicts
bun run flux plugin:deps clean # Remove unused deps| Subcommand | Description |
|---|---|
install |
Install plugin dependencies |
list |
Show plugin dependencies |
check |
Detect dependency conflicts |
clean |
Remove unused dependencies |
Create new FluxStack project (used by create-fluxstack).
bunx create-fluxstack my-app
bunx create-fluxstack my-app --no-git
bunx create-fluxstack my-app --no-installCreate a new plugin scaffold.
bun run flux make:plugin <name>
bun run flux make:plugin my-custom-pluginCreates:
plugins/my-custom-plugin/
├── index.ts # Plugin entry
├── config/ # Plugin config
└── README.md # Documentation
Display help for commands.
bun run flux help
bun run flux help <command>
bun run flux help dev
bun run flux help generateStandard npm scripts in package.json:
# Development
bun run dev # Full-stack dev (backend + frontend)
bun run dev:frontend # Frontend only (Vite, port 5173)
bun run dev:backend # Backend only (Elysia)
# Build
bun run build # Full production build (frontend + backend)
bun run build:frontend # Frontend build only
bun run build:backend # Backend build only
bun run build:exe # Build + compile to executable
# Production
bun run start # NODE_ENV=production bun dist/index.js
# Testing
bun run test # vitest (watch mode)
bun run test:ui # vitest with browser UI (--ui)
bun run test:coverage # vitest run with coverage report
bun run test:e2e # Playwright end-to-end tests
bun run test:e2e:ui # Playwright with interactive UI
bun run test:e2e:headed # Playwright in headed browser mode
# Code Quality
bun run typecheck:api # Type-check API routes (tsconfig.api-strict.json)
# Generators & Utilities
bun run make:component # Scaffold a new component via CLI
bun run sync-version # Sync version across package.json and version.ts
bun run cli # Direct access to FluxStack CLI
bun run create # Create new FluxStack project| Variable | Effect |
|---|---|
LOG_LEVEL |
Set log verbosity (debug, info, warn, error) |
NODE_ENV |
development/production mode |
FLUXSTACK_MODE |
full-stack/backend-only/frontend-only |