Install.doctor
A glorious combination of application / theme settings and a performant cross-platform, desktop-oriented software suite.
Install / Use
/learn @HeyMegabyte/Install.doctorREADME
<br/><h4 align="center"><strong>A performant, cross-platform desktop provisioning system combining application settings, themes, and automated software installation.</strong></h4><br/>
<a href="#table-of-contents" style="width:100%"><img style="width:100%" src="https://gitlab.com/megabyte-labs/assets/-/raw/master/png/aqua-divider.png" /></a>
Table of Contents
- Overview
- Quick Start
- Environment Variables
- Architecture
- Chezmoi-Based
- Security Focused
- Cross-Platform
- Gas Station
- Chezmoi
- Contributing
- License
<a href="#overview" style="width:100%"><img style="width:100%" src="https://gitlab.com/megabyte-labs/assets/-/raw/master/png/aqua-divider.png" /></a>
Overview
Install Doctor is a cross-platform development environment provisioning system that combines application settings, theme files, and a performant software installer written with ZX. It uses Chezmoi to manage dotfiles and apply configuration changes across systems.
The project is built around the philosophy that you should be able to reformat your computer and fully restore it by storing stateful data in an encrypted S3 bucket and automating desktop configuration. It supports macOS, most Linux distributions, and has Windows support on the roadmap.
Install Doctor is intended for:
- Power users who want to maximize efficiency by incorporating popular open-source tools into their stack
- Distro hoppers who want consistent tooling across macOS, Windows, and Linux
- Automation enthusiasts who want to reformat and restore their systems with minimal effort
- CLI users who want a portable, reproducible terminal environment
- Security-conscious users who regularly reformat and need fast, reliable reprovisioning
<a href="#quick-start" style="width:100%"><img style="width:100%" src="https://gitlab.com/megabyte-labs/assets/-/raw/master/png/aqua-divider.png" /></a>
Quick Start
To provision your workstation with interactive prompts:
bash <(curl -sSL https://install.doctor/start)
Headless Installation
To run completely unattended with no interactive prompts (all prompts auto-proceed with defaults after a 30-second timeout):
HEADLESS_INSTALL=true bash <(curl -sSL https://install.doctor/start)
For full control over the headless installation:
HEADLESS_INSTALL=true \
SOFTWARE_GROUP=Full \
SUDO_PASSWORD=your_password \
FULL_NAME="Your Name" \
PRIMARY_EMAIL="you@example.com" \
bash <(curl -sSL https://install.doctor/start)
Using a Fork
If you fork this repository and would like to use your fork as the source, set the START_REPO environment variable:
# GitHub shorthand (user/repo)
START_REPO=my-gh-user/my-fork-name bash <(curl -sSL https://install.doctor/start)
# Full git URL
START_REPO=git@gitlab.com:my-user/install.doctor.git bash <(curl -sSL https://install.doctor/start)
# GitHub username only (assumes repo name is install.doctor)
START_REPO=my-gh-user bash <(curl -sSL https://install.doctor/start)
Quick Start Notes
- Tested on latest versions of Archlinux, CentOS, Debian, Fedora, macOS, and Ubuntu
- The quick start script is the preferred method of provisioning
- All interactive prompts have timeouts and will auto-proceed with sensible defaults
- Windows support is on the roadmap
<a href="#environment-variables" style="width:100%"><img style="width:100%" src="https://gitlab.com/megabyte-labs/assets/-/raw/master/png/aqua-divider.png" /></a>
Environment Variables
The following environment variables can be used to customize the provisioning process:
| Variable | Description | Default |
|---|---|---|
| START_REPO (or REPO) | Git repository URL or GitHub user/repo shorthand | megabyte-labs/install.doctor |
| HEADLESS_INSTALL | Skip all interactive prompts and use defaults | unset |
| SOFTWARE_GROUP | Software group to install: Basic, Server, Standard, or Full | Full |
| SUDO_PASSWORD | Sudo password for automated passwordless sudo setup | unset (prompts with 30s timeout) |
| CI or TEST_INSTALL | Enable CI mode with predefined test defaults | unset |
| NO_RESTART | Prevent automatic reboots after system updates | unset |
| FULL_NAME | User's full name for git config and other tools | unset |
| PRIMARY_EMAIL | User's primary email address | unset |
| AGE_PASSWORD | Passphrase for decrypting Age-encrypted secrets | unset |
| DEBUG_MODE (or DEBUG) | Enable verbose logging and debug output | unset |
| KEEP_GOING | Continue provisioning even if errors occur | unset |
| ANSIBLE_PROVISION_VM | Qubes only: Name of the VM used for provisioning | provision |
| NO_INSTALL_HOMEBREW | Skip Homebrew installation entirely | unset |
For a full list of variables, see the Customization and Secrets documentation.
<a href="#architecture" style="width:100%"><img style="width:100%" src="https://gitlab.com/megabyte-labs/assets/-/raw/master/png/aqua-divider.png" /></a>
Architecture
Provisioning Flow
bash <(curl -sSL https://install.doctor/start)
|
v
scripts/provision.sh (main orchestrator)
|-- ensureBasicDeps() - Install system packages (curl, git, etc.)
|-- ensureHomebrew() - Install and configure Homebrew
|-- setupPasswordlessSudo() - Temporary passwordless sudo (with 30s timeout)
|-- cloneChezmoiSourceRepo() - Clone/update the Install Doctor repository
|-- ensureHomebrewDeps() - Install Chezmoi, Gum, Glow, Node.js, ZX
|-- initChezmoiAndPrompt() - Initialize Chezmoi configuration
|-- runChezmoi() - Apply dotfiles and run provisioning scripts
| |
| v
| home/.chezmoiscripts/
| |-- run_before_01-prepare.sh - System preparation
| |-- run_before_02-homebrew.sh - Homebrew setup
| |-- run_before_03-decrypt-age-key.sh - Secret decryption
| |-- run_before_04-requirements.sh - System requirements
| |-- run_before_05-system.sh - System tweaks
| |-- run_after_01-pre-install.sh - Pre-install tasks
| |-- run_after_10-install.sh - Software installation
| |-- run_after_15-chezmoi-system.sh - System-level chezmoi
| |-- run_after_20-post-install.sh - Post-install configuration
| |-- run_after_24-cleanup.sh - Cleanup tasks
|
|-- removePasswordlessSudo() - Remove temporary sudo privileges
|-- handleRequiredReboot() - Reboot if system updates require it
v
Done
Dependencies
The following tools are installed automatically during provisioning:
| Dependency | Required | Descript
