Development Guide: Bootstrap Scripts
Component: scripts/bootstrap/Scope: Environment Configuration
Overview
The bootstrap scripts control the developer experience inside the workspace. Changes here affect the software available to developers.
Key Files
scripts/bootstrap/setup.sh: The main entry point. Modify this to add global packages (npm, pip, apt), configure shells, or set up tools.config/aliases.sh: Add shell shortcuts here..mcp.json: Configure Model Context Protocol servers.
Testing Changes
- Modify Script: Edit
scripts/bootstrap/setup.shor other config files. - Rebuild Workspace:
- If utilizing Coder: Stop and Rebuild the workspace.
- The
startup_scriptin Terraform will re-execute (if configured to do so on start) or you may need to manually re-run setup.
- Verify: Log in to the workspace and check if the new tool/alias is present.
Best Practices
- Idempotency: Ensure scripts can be run multiple times without failure (use checks like
if [ ! -f ... ]). - Performance: Avoid heavy operations in the critical path of startup if possible.