Setup & Teardown Scripts

Overview

Run commands automatically when creating or deleting workspaces.

Create .superset/config.json in your project:

{
  "setup": ["bun install", "cp \"$SUPERSET_ROOT_PATH/.env\" .env"],
  "teardown": ["docker-compose down"]
}

How It Works

  1. Create workspace → setup commands run
  2. Delete workspace → teardown commands run

Commands run sequentially in the workspace directory.

Environment Variables

VariableDescription
SUPERSET_ROOT_PATHPath to root repository
SUPERSET_WORKSPACE_NAMECurrent workspace name

Examples

Node.js:

{ "setup": ["bun install", "cp \"$SUPERSET_ROOT_PATH/.env\" .env"] }

Docker:

{
  "setup": ["docker-compose up -d", "bun run db:migrate"],
  "teardown": ["docker-compose down -v"]
}

Tips

  • Keep setup fast—runs every workspace creation
  • Commit .superset/ to share with team
  • Use shell scripts for complex logic: "setup": ["./.superset/setup.sh"]

On this page