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 working directory: dust-hive worktrees are located at ~/dust-hive/{env-name}/
  2. Check for worktree: The .git file (not directory) indicates a git worktree
# Check if in worktree path
pwd | grep -q "$HOME/dust-hive/" && echo "In dust-hive environment"

Environment States

Environments can be in one of three states:

StateWhat's RunningCan Run Tests?
stoppedNothingNo
coldSDK watch onlyYes (front tests use shared test DB)
warmAll services (front, core, connectors, oauth, workers) + 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 (front:10000, core:10001, connectors:10002, 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 (Next.js)
cd front && npm run lint                                              # ESLint
cd front && NODE_OPTIONS="--max-old-space-size=8192" npx tsgo --noEmit  # Type-check
cd front && npm run build                                             # Build

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

# Connectors
cd connectors && npm run lint   # ESLint
cd connectors && npm run build  # Type-check + build

# OAuth (Rust)
cd oauth && cargo check && cargo clippy

Quick health check after warming:

curl -sf http://localhost:10000/api/healthz  # front
curl -sf http://localhost:10001/             # 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)
  • A shared Redis container runs on port 6479 (started by dust-hive up)
  • 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

IMPORTANT: You must set NODE_ENV=test when running front tests.

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

# Run specific test file
cd front && NODE_ENV=test npm test lib/resources/user_resource.test.ts

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

No need to warm the environment - the shared test Postgres and Redis are always available.

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 it: docker start dust-hive-test-postgres
  3. Verify the database exists: docker exec dust-hive-test-postgres psql -U test -l

Known Issues

Node modules structure

In dust-hive environments, node_modules for front and connectors uses a shallow copy structure:

  • A real node_modules directory with symlinks to packages from the main repo
  • @dust-tt/client is overridden to point to the worktree's SDK (ensuring correct type resolution)

Running npm install requires manual cleanup:

rm -rf node_modules && npm install

SDK watcher doesn't detect changes after git rebase

The SDK watcher uses nodemon which relies on filesystem events. When running git rebase, git pull, or git checkout, nodemon 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)16moReviewIntermediate
supabase-local-dev-loop026dCautionBeginner
manage-infra05moReviewBeginner
fly-io-deployer03moCautionAdvanced

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