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/...
dust-hive is a CLI tool for running multiple isolated Dust development environments simultaneously. Each environment gets its own:
To check if you're currently running in a dust-hive environment:
dust-hive list<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]
Environments can be in one of three states:
| State | What's Running | Can Run Tests? |
|---|---|---|
| stopped | Nothing | No |
| cold | SDK and Sparkle watches | Yes (front tests use shared test DB) |
| warm | SDK/Sparkle, application services except Viz/Storybook, and Docker | Yes |
Check the current state:
dust-hive status [ENV_NAME]
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:
FRONT_DATABASE_URI, CORE_API, CONNECTORS_API are pre-configured for the environment's port rangeIf environment variables are missing, manually source the environment:
source ~/.dust-hive/envs/{ENV_NAME}/env.sh
Each environment gets a 1000-port range starting at 10000:
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
# 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
curl -sf "$DUST_FRONT_API/api/healthz" # front API
curl -sf "$CORE_API/" # core
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.
dust-hive up from the clean main repository)dust-hive up from the clean main repository)dust_front_test_{env_name}TEST_FRONT_DATABASE_URI and TEST_REDIS_URI are already set in each environment's env.sh# 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.
If front tests fail with database connection errors:
docker ps | grep dust-hive-test-postgresdust-hive updocker exec dust-hive-test-postgres psql -U test -lIn dust-hive environments, dependencies are shared with the main repo:
node_modulesnode_modules use shallow copies when needed@dust-tt packages point to the current worktreeDo 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.
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