DU

Tool for running multiple isolated Dust development environments using git worktrees and Docker.

Install

mkdir -p .claude/skills/dust-hive && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/2373" && unzip -o skill.zip -d .claude/skills/dust-hive && rm skill.zip

Installs to .claude/skills/dust-hive

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Information about dust-hive, a CLI tool for running multiple isolated Dust development environments. ALWAYS enable this skill when the working directory is under ~/dust-hive/. Use for understanding port allocation, running tests, and working with the environment.
263 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Intermediate

Key capabilities

  • →Run multiple isolated Dust development environments simultaneously
  • →Check the current state of a dust-hive environment
  • →Automatically load environment variables using direnv
  • →Understand port allocation for different services within an environment
  • →Run linters, type checks, and builds for Dust apps
  • →Execute front tests in cold environments using shared test containers

How it works

dust-hive is a CLI tool that creates isolated Dust development environments, each with its own Git worktree, port range, Docker containers, and database instances, managed via direnv for environment variables.

Inputs & outputs

You give it
commands for managing Dust development environments
You get back
environment status, port configurations, test results, or build outputs

When to use dust-hive

  • →Checking environment status
  • →Managing port conflicts
  • →Running tests in isolated environments

About this skill

dust-hive

What is dust-hive?

dust-hive is a CLI tool for running multiple isolated Dust development environments simultaneously. Each environment gets its own:

  • Git worktree (separate branch)
  • Port range (no conflicts between environments)
  • Docker containers (isolated volumes)
  • Database instances (Postgres, Qdrant, Elasticsearch)

Detecting a dust-hive Environment

To check if you're currently running in a dust-hive environment:

  1. Check registered environments: run dust-hive list
  2. Check the current environment: Hive-owned worktrees normally live at <repo>/.hives/{env-name}/; adopted worktrees can live elsewhere under the main repository root, and older environments may still use ~/dust-hive/{env-name}/
dust-hive status [ENV_NAME]

Environment States

Environments can be in one of three states:

StateWhat's RunningCan Run Tests?
stoppedNothingNo
coldSDK and Sparkle watchesYes (front tests use shared test DB)
warmSDK/Sparkle, application services except Viz/Storybook, and DockerYes

Check the current state:

dust-hive status [ENV_NAME]

Environment Variables (direnv)

Each dust-hive worktree contains a .envrc file that automatically loads environment variables when you cd into the directory. This is powered by direnv.

What this means:

  • Environment variables (ports, database URIs, API keys, etc.) are automatically available
  • Variables like FRONT_DATABASE_URI, CORE_API, CONNECTORS_API are pre-configured for the environment's port range

If environment variables are missing, manually source the environment:

source ~/.dust-hive/envs/{ENV_NAME}/env.sh

Port Allocation

Each environment gets a 1000-port range starting at 10000:

  • 1st env: 10000-10999 (proxy:10000, core:10001, connectors:10002, front-api:10003, oauth:10006)
  • 2nd env: 11000-11999
  • 3rd env: 12000-12999

Running Linters, Type Checks, and Builds

For dust-hive itself (in x/henry/dust-hive/):

# Run ALL checks before committing (MANDATORY)
bun run check

# Individual checks
bun run typecheck    # TypeScript strict checks
bun run lint         # Biome linting
bun run lint:fix     # Auto-fix lint issues
bun run format       # Code formatting
bun run test         # All tests

For Dust apps (in worktree or main repo):

# TypeScript SDK (watch is running - check logs if issues after SDK changes)
dust-hive logs [ENV_NAME] sdk

# Front library and services
npm -w front run tsgo -- --noEmit
npm -w front-api run tsgo -- --noEmit
npm -w front-spa run tsgo -- --noEmit

# Format and lint changed files (from the repository root)
npm run format:changed

# Core and OAuth (Rust)
cd core && cargo check && cargo clippy

# Connectors
npm -w connectors run build  # Type-check + build

Quick health check after warming:

curl -sf "$DUST_FRONT_API/api/healthz"  # front API
curl -sf "$CORE_API/"                    # core

Running Front Tests in Cold Environments

The front project requires a Postgres database and Redis to run tests. dust-hive provides shared test containers that allow running front tests without warming up the full environment.

How it works

  • A shared Postgres container runs on port 5433 (started by dust-hive up from the clean main repository)
  • A shared Redis container runs on port 6479 (started by dust-hive up from the clean main repository)
  • Each environment gets its own test database: dust_front_test_{env_name}
  • TEST_FRONT_DATABASE_URI and TEST_REDIS_URI are already set in each environment's env.sh

Running front tests

# From any cold environment, run front tests directly
cd front && npm run test

# Run specific test file
cd front && npm run test -- lib/resources/user_resource.test.ts

# Run with verbose output
cd front && npm run test -- --reporter verbose path/to/test.test.ts

No need to warm the environment - dust-hive up, run from the clean main repository, starts the shared test Postgres and Redis.

Troubleshooting front tests

If front tests fail with database connection errors:

  1. Check if test postgres is running: docker ps | grep dust-hive-test-postgres
  2. If not running, start the shared services from the clean main repository: dust-hive up
  3. Verify the database exists: docker exec dust-hive-test-postgres psql -U test -l

Known Issues

Node modules structure

In dust-hive environments, dependencies are shared with the main repo:

  • Root packages resolve from the main repo's node_modules
  • Workspace-level node_modules use shallow copies when needed
  • @dust-tt packages point to the current worktree

Do not run npm install directly in a Hive worktree:

# From a clean main repository
dust-hive sync
dust-hive refresh [ENV_NAME]

Do not use dust-hive refresh with a legacy ~/dust-hive/ worktree; move or recreate it under the main repository first.

SDK watcher doesn't detect changes after git rebase

The SDK watcher relies on filesystem events. When running git rebase, git pull, or git checkout, it may not detect file changes.

Symptoms: Type errors in front about missing types that should exist in the SDK.

Solution: Restart the SDK watcher after git operations that change SDK files:

dust-hive restart [ENV_NAME] sdk

Or manually trigger a rebuild:

touch sdks/js/src/types.ts

Prerequisites

direnvDocker

Limitations

  • →Node modules structure uses shallow copy with symlinks
  • →SDK watcher may not detect changes after git rebase or pull
  • →Requires manual cleanup for `npm install` due to node_modules structure

How it compares

This tool provides isolated development environments with automatic port and database management, simplifying concurrent development compared to a single, shared setup.

Compared to similar skills

dust-hive side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
dust-hive (this skill)18moReviewIntermediate
supabase-local-dev-loop02moCautionBeginner
manage-infra07moReviewBeginner
fly-io-deployer05moCautionAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

supabase-local-dev-loop

jeremylongshore

Configure Supabase local development with hot reload and testing. Use when setting up a development environment, configuring test workflows, or establishing a fast iteration cycle with Supabase. Trigger with phrases like "supabase dev setup", "supabase local development", "supabase dev environment", "develop with supabase".

01

manage-infra

jpmolinamatute

Starts or stops the Docker Compose infrastructure (Postgres 17).

00

fly-io-deployer

LeoYeAI

Deploy and operate Node, Python, Go, Rust, Elixir, and Docker apps on Fly.io with production-grade fly.toml authoring, Machines API orchestration, region selection (latency vs sovereignty vs egress), Fly Postgres clustering, LiteFS for SQLite replication, Upstash Redis bindings, Tigris object storag

00

test-with-postgres

storj

Run unit tests that require PostgreSQL. Use this skill when the user wants to run tests with PostgreSQL database backend. Automatically handles checking for and configuring a PostgreSQL Docker container.

13

local-env

dailydotdev

Local environment management - run SQL queries, set up fake payments, reset test data. Use when the user needs help with local database operations or test data setup.

12

supabase-multi-env-setup

jeremylongshore

Configure Supabase across development, staging, and production environments. Use when setting up multi-environment deployments, configuring per-environment secrets, or implementing environment-specific Supabase configurations. Trigger with phrases like "supabase environments", "supabase staging", "supabase dev prod", "supabase environment setup", "supabase config by env".

10

Search skills

Search the agent skills registry