debi
CLAUDE.md1.8k starsChanged 15 months agoUnlicenseView on GitHub
Debi is a Debian Network Reinstall Script that allows reinstalling any VPS or physical machine to minimal Debian via network boot. It's a single POSIX-compliant shell script that automates the entire Debian installation process. The script operates in distinct phases: Key architectural decisions: - Single-file design for easy distribution - POSIX compliance for maximum compatibility - No external dependencies beyond standard Linux utilities - Modular function design with clear separation of concerns - Extensive error handling with rollback capabilities The…
We split this CLAUDE.md into the rules it gives an agent
7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 52
No external dependencies beyond standard Linux utilities
- Distinctive: line 76
Test on real systems: - No test suite exists; changes require VM or physical testing
- Distinctive: line 78
Document all options: - Update README.md for any new configuration options
- Distinctive: line 79
Handle errors gracefully: - Always provide rollback paths for critical operations
- Distinctive: line 84
Add option to the case statement in the argument parsing section
- Very specific: line 90
Use --dry-run to generate and inspect preseed configuration
- Very specific: line 92
Check /boot/debian-$VERSION/ for downloaded components
≈ “Common” is an estimate: at least 1 in 5 of the 25,680 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
Debi is a Debian Network Reinstall Script that allows reinstalling any VPS or physical machine to minimal Debian via network boot. It's a single POSIX-compliant shell script that automates the entire Debian installation process.
Commands
Running the Script
# Basic execution (requires root)
sudo ./debi.sh
# With options
sudo ./debi.sh --user debian --timezone UTC --cloudflare
# Dry run (generate config without installing)
sudo ./debi.sh --dry-run
# With cloud-init configuration
sudo ./debi.sh --cidata ./cidata-example/Testing Changes
# Check shell script syntax
sh -n debi.sh
# Run shellcheck for linting (if available)
shellcheck debi.sh
# Test in a VM environment (recommended)
# No automated test suite exists - manual testing requiredArchitecture
The script operates in distinct phases:
- Configuration Phase: Parses command-line arguments and validates environment
- Download Phase: Fetches Debian installer components to
/boot/debian-$VERSION/ - Preseed Generation: Creates automated installation configuration
- GRUB Modification: Adds installer entry to bootloader menu
- Initramfs Injection: Embeds preseed and network configuration into installer
- Execution: Updates GRUB and prepares for reboot
Key architectural decisions:
- Single-file design for easy distribution
- POSIX compliance for maximum compatibility
- No external dependencies beyond standard Linux utilities
- Modular function design with clear separation of concerns
- Extensive error handling with rollback capabilities
Key Functions and Their Purposes
download(): Handles file downloads with proxy support and multiple backend options (wget/curl/busybox)set_debian_version()/set_suite(): Manages Debian version selection and mirror URLsconfigure_sshd(): Sets up SSH access during installation for remote monitoringin_target(): Executes commands within the target installation environmentprompt_password(): Securely handles password input with validation
Important Configuration Variables
The script uses 80+ configuration options. Key ones include:
$suite: Debian version (bookworm, bullseye, etc.)$mirror_protocol/$mirror_host: APT repository configuration$disk: Target installation disk$authorized_keys_url: SSH key provisioning$cidata: Cloud-init configuration directory
Development Guidelines
- Maintain POSIX compliance - Script must work with dash/sh, not just bash
- Test on real systems - No test suite exists; changes require VM or physical testing
- Preserve backward compatibility - Many users rely on specific option behaviors
- Document all options - Update README.md for any new configuration options
- Handle errors gracefully - Always provide rollback paths for critical operations
Common Development Tasks
Adding New Configuration Options
- Add option to the case statement in the argument parsing section
- Define corresponding variable with sensible default
- Implement logic in appropriate phase function
- Update README.md documentation
Debugging Installation Issues
- Use
--dry-runto generate and inspect preseed configuration - Enable network console with
--sshfor remote debugging - Check
/boot/debian-$VERSION/for downloaded components - Review GRUB configuration changes in
/boot/grub/grub.cfg
Testing Platform Compatibility
Focus areas for testing:
- Network configuration (static IP vs DHCP)
- Disk detection and partitioning
- GRUB installation and boot entries
- Architecture-specific installer components
Trending
Quiet this year.thin dataabout the whole repository
Who's talking about bohanwood/debi
The biggest 1 of 1 mention linking to the repository that our crawl found. Each line is their own headline.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

