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
- Create workspace → setup commands run
- Delete workspace → teardown commands run
Commands run sequentially in the workspace directory.
Environment Variables
| Variable | Description |
|---|---|
SUPERSET_ROOT_PATH | Path to root repository |
SUPERSET_WORKSPACE_NAME | Current 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"]