Skip to content

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

  1. Modify Script: Edit scripts/bootstrap/setup.sh or other config files.
  2. Rebuild Workspace:
    • If utilizing Coder: Stop and Rebuild the workspace.
    • The startup_script in Terraform will re-execute (if configured to do so on start) or you may need to manually re-run setup.
  3. 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.

Released under the MIT License.