# Apache Superset Development Commands: Essential CLI Reference for the Bun Monorepo

> Master Apache Superset development with essential Bun monorepo CLI commands. Learn to start services with bun dev, run tests with bun test, and ensure code quality with bun run lint.

- Repository: [Superset/superset](https://github.com/superset-sh/superset)
- Tags: api-reference
- Published: 2026-03-08

---

**Apache Superset development commands center on Bun and Turbo, using `bun dev` to start all services, `bun test` for testing, and `bun run lint` for code quality across the monorepo.**

The superset-sh/superset repository is organized as a high-performance Bun + Turbo monorepo that streamlines modern data visualization development. Mastering the essential Apache Superset development commands enables contributors to efficiently manage the full stack—from the Next.js 16 web interface defined in [`apps/web/package.json`](https://github.com/superset-sh/superset/blob/main/apps/web/package.json) to the database schema migrations in `packages/db/src/schema/`.

## Understanding the Bun + Turbo Architecture

Before executing commands, it is important to understand the underlying architecture. The project uses **Bun** as its JavaScript runtime and package manager, replacing the traditional Node/npm stack. **Turbo** orchestrates tasks across workspaces defined in [`turbo.json`](https://github.com/superset-sh/superset/blob/main/turbo.json) at the repository root.

This architecture allows commands like `bun dev` to execute `turbo run dev --parallel`, which simultaneously starts the Next.js 16 web application, the Fastify/Express API server ([`apps/api/package.json`](https://github.com/superset-sh/superset/blob/main/apps/api/package.json)), and other workspaces in watch mode.

## Core Apache Superset Development Commands

### Starting the Development Environment

The primary command for local development is `bun dev`. This script invokes Turbo to run all development servers in parallel, including the web UI, API, desktop, mobile, and documentation sites.

```bash

# Start all development servers in watch mode

bun dev

```

Internally, this executes `turbo run dev --parallel` as referenced in [`AGENTS.md`](https://github.com/superset-sh/superset/blob/main/AGENTS.md), respecting the pipeline configuration in [`turbo.json`](https://github.com/superset-sh/superset/blob/main/turbo.json).

### Running Tests

To execute the test suite across the entire monorepo, use `bun test`. This command leverages Turbo’s test pipeline to run Jest or Vitest configurations in each workspace.

```bash

# Run all tests in parallel across workspaces

bun test

```

### Building for Production

The `bun build` command prepares all packages for deployment. It triggers `turbo run build --parallel`, which executes each workspace’s build script—such as Next.js 16 compilation for the web app and bundling for the Electron desktop wrapper.

```bash

# Build all packages for production

bun build

```

## Code Quality and Formatting Commands

Apache Superset uses **Biome** as its unified linting and formatting engine, configured in [`.biome.json`](https://github.com/superset-sh/superset/blob/main/.biome.json) at the repository root.

### Linting

To check code style without modifying files:

```bash

# Report linting issues only

bun run lint

```

To automatically fix resolvable issues (such as import ordering and unused variables):

```bash

# Auto-fix linting issues where possible

bun run lint:fix

```

### Formatting

To apply code formatting across the entire tree:

```bash

# Format all files with Biome

bun run format

```

To verify formatting without making changes (useful for CI pipelines):

```bash

# Check formatting compliance

bun run format:check

```

## Type Safety Commands

Ensuring TypeScript type safety across package boundaries is handled by `bun run typecheck`. This executes `tsc --noEmit` for the entire monorepo, catching type errors before runtime.

```bash

# Type-check the entire monorepo

bun run typecheck

```

## Database Migration Commands

Database schema management relies on **Drizzle ORM**, with schema definitions located in `packages/db/src/schema/`.

### Generating Migrations

After modifying schema files, generate a migration using `drizzle-kit`:

```bash

# Generate a new migration after schema changes

bunx drizzle-kit generate --name="add_user_last_login"

```

This creates migration files in `packages/db/drizzle/` based on the current schema state.

### Applying Migrations

To execute pending migrations against the configured Neon PostgreSQL instance (or local SQLite for desktop):

```bash

# Apply pending migrations to the database

bunx drizzle-kit migrate

```

## Maintenance and Cleanup Commands

When dependency issues arise or after upgrading Bun, clean the workspace node_modules:

```bash

# Remove root node_modules

bun run clean

# Remove all workspace node_modules

bun run clean:workspaces

```

These commands help recover from corrupted installs or stale dependency trees.

## Summary

- **Apache Superset development commands** revolve around Bun as the JavaScript runtime and Turbo for monorepo task orchestration.
- Use **`bun dev`** to start all development servers in parallel, **`bun test`** for testing, and **`bun build`** for production builds.
- Maintain code quality with **`bun run lint`**, **`bun run format`**, and **`bun run typecheck`**, all powered by Biome and TypeScript.
- Manage database schema changes using **`bunx drizzle-kit generate`** and **`bunx drizzle-kit migrate`** against the schema defined in `packages/db/src/schema/`.
- Reference [`AGENTS.md`](https://github.com/superset-sh/superset/blob/main/AGENTS.md) and [`turbo.json`](https://github.com/superset-sh/superset/blob/main/turbo.json) for command definitions and pipeline configuration.

## Frequently Asked Questions

### What is the difference between `bun dev` and `bun build` in Apache Superset?

`bun dev` starts all development servers in watch mode using `turbo run dev --parallel`, enabling hot reloading for the Next.js 16 web app, API server, and other workspaces. In contrast, `bun build` executes `turbo run build --parallel` to create optimized production bundles for deployment, invoking each workspace’s build script without watch mode.

### How do I fix linting errors automatically in the Superset monorepo?

Run **`bun run lint:fix`** to automatically resolve issues that Biome can fix, such as import ordering, unused variables, and style violations. This command modifies files in place according to the rules defined in [`.biome.json`](https://github.com/superset-sh/superset/blob/main/.biome.json) at the repository root. For issues that cannot be auto-fixed, the command will report remaining violations for manual correction.

### Where are database schemas defined in Apache Superset?

Database schemas are defined in **`packages/db/src/schema/`**, which serves as the source of truth for the Drizzle ORM configuration. When you modify files in this directory, you must generate a new migration using `bunx drizzle-kit generate --name="<description>"`, which creates migration files in `packages/db/drizzle/` based on the current schema state.

### Can I run individual workspace commands instead of the full monorepo?

Yes, you can navigate to specific workspace directories such as `apps/web` or `apps/api` and run Bun commands directly within those folders. However, using the root-level `bun dev` or `bun test` commands is recommended because Turbo orchestrates dependencies and runs tasks in the correct order across workspaces, as configured in [`turbo.json`](https://github.com/superset-sh/superset/blob/main/turbo.json).