██████╗ ██╗███████╗████████╗██████╗ ██████╗ ███████╗ ██████╗ ██████╗ ██████╗ ███████╗
██╔══██╗██║██╔════╝╚══██╔══╝██╔══██╗██╔═══██╗██╔════╝██╔═══██╗██╔══██╗██╔════╝ ██╔════╝
██║ ██║██║███████╗ ██║ ██████╔╝██║ ██║█████╗ ██║ ██║██████╔╝██║ ███╗█████╗
██║ ██║██║╚════██║ ██║ ██╔══██╗██║ ██║██╔══╝ ██║ ██║██╔══██╗██║ ██║██╔══╝
██████╔╝██║███████║ ██║ ██║ ██║╚██████╔╝██║ ╚██████╔╝██║ ██║╚██████╔╝███████╗
╚═════╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝
A professional terminal-based Linux distro setup automation tool.
DistroForge automates the complete setup of a fresh Linux installation — from system updates and driver verification to dev environment, gaming layer, and quality-of-life configuration. One command, fully configured machine.
Built by Hamid at Reza Labs HQ
- Ubuntu-based (Ubuntu, Pop!_OS, Linux Mint, Elementary OS, Zorin)
- Fedora-based (Fedora, Nobara) — adapter ready, testing in progress
- Arch-based (Arch, Manjaro, EndeavourOS) — planned
bash <(curl -fsSL https://raw.githubusercontent.com/rezalabshq/DistroForge/main/install.sh)This clones the repo to ~/.local/share/distroforge, creates an isolated Python environment, installs dependencies, and drops a distroforge launcher into ~/.local/bin. Your shell config is updated automatically if needed.
After install, open a new terminal (or source ~/.zshrc) and run:
distroforge --listRe-run the same one-liner — it pulls the latest changes and rebuilds the environment.
pipx install git+https://github.com/rezalabshq/DistroForge.gitgit clone https://github.com/rezalabshq/DistroForge.git
cd DistroForge
pip install -r requirements.txt
python3 distroforge.pydistroforge # Interactive mode (choose phases)
distroforge --list # Show all available phases
distroforge --phases system,shell,dev # Run specific phases
distroforge --dry-run --yes # Preview everything without changing anything
distroforge --phases verify # Health check — see what's installed
distroforge --verbose # Show full command output
distroforge --yes # Skip confirmation prompts
distroforge --config my-setup.yaml # Use a custom config file
distroforge --distro fedora # Override distro detection| Phase | What it does |
|---|---|
system |
System updates, essential packages, GPU driver verification |
shell |
zsh, Oh My Zsh, Starship prompt, plugins |
dev |
Node.js (fnm), Python (pyenv), Docker, Git, VS Code, Rust, Go, Java, .NET |
gaming |
Steam, Proton, ProtonUp-Qt, Gamemode, MangoHud, Lutris |
apps |
Flatpak applications, Nerd Fonts, peripheral tools (OpenRGB, Solaar, Piper) |
qol |
Firewall (UFW), SSD trim, swappiness tuning, i2c modules |
verify |
Post-setup health check — version report of everything installed |
All preferences live in config.yaml. Create config.local.yaml for personal overrides — it's gitignored and merges on top of the template.
cp config.yaml config.local.yaml
nano config.local.yamlConfig merge priority (highest wins): --config <path> > config.local.yaml > config.yaml
# config.local.yaml
user:
name: "Hamid"
email: "hamid@rezalabs.com"
gaming:
enabled: false
dev:
languages:
rust: falsedistro-forge/
├── distroforge.py # Entry point + CLI
├── config.yaml # Template config (committed)
├── pyproject.toml # Python packaging + tool config
├── core/
│ ├── detector.py # Distro & hardware auto-detection
│ ├── runner.py # Command execution (logging, retries, dry-run)
│ ├── logger.py # Dual-output logging (Rich console + file)
│ └── ui.py # Terminal UI (banner, selectors, prompts)
├── phases/
│ ├── __init__.py # Base Phase class (abstract)
│ ├── system.py # System updates, essentials, GPU drivers
│ ├── shell.py # zsh, Oh My Zsh, Starship, plugins
│ ├── dev.py # Node, Python, Docker, Git, editors, languages
│ ├── gaming.py # Steam, Proton, Gamemode, MangoHud
│ ├── apps.py # Flatpak apps, Nerd Fonts, peripherals
│ ├── qol.py # Firewall, SSD trim, swappiness, i2c
│ └── verify.py # Post-setup verification & health check
├── distros/
│ └── __init__.py # Distro adapters (Ubuntu apt, Fedora dnf)
└── tests/ # 60 unit tests
├── test_config.py
├── test_detector.py
├── test_distros.py
└── test_phases.py
pip install -r requirements-dev.txt
python -m pytest tests/ -v # Run tests
python -m pytest tests/ --cov=core --cov=phases # With coverage
ruff check . # Lint
ruff format . # Format- Create
phases/my_phase.pyinheriting fromPhase - Implement
execute()withself.step()andself.cmd()calls - Register in
PHASE_REGISTRYindistroforge.py - Add tests in
tests/
- Add adapter class in
distros/__init__.pyimplementingDistroAdapter - Register in
get_adapter()factory - Add detection in
core/detector.py
- Config-driven — preferences in YAML, not hardcoded
- Idempotent — checks before installing, safe to re-run
- Logged — Rich terminal output + file logs in
~/.distroforge/logs/ - Dry-run — preview every command with
--dry-run - Modular — phases are independent, distro adapters are swappable
- Tested — 60 unit tests covering core modules
- Linux (tested on Pop!_OS 24.04, Ubuntu 24.04)
- Python 3.10+ (
sudo apt install python3if missing) git(sudo apt install gitif missing)- sudo access
MIT — see LICENSE