agentleFS
bohanwoodbohanwood/debi/CLAUDE.md

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
  1. Distinctive:

    No external dependencies beyond standard Linux utilities

    line 52
  2. Distinctive:

    Test on real systems: - No test suite exists; changes require VM or physical testing

    line 76
  3. Distinctive:

    Document all options: - Update README.md for any new configuration options

    line 78
  4. Distinctive:

    Handle errors gracefully: - Always provide rollback paths for critical operations

    line 79
  5. Distinctive:

    Add option to the case statement in the argument parsing section

    line 84
  6. Very specific:

    Use --dry-run to generate and inspect preseed configuration

    line 90
  7. Very specific:

    Check /boot/debian-$VERSION/ for downloaded components

    line 92

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

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 required

Architecture

The script operates in distinct phases:

  1. Configuration Phase: Parses command-line arguments and validates environment
  2. Download Phase: Fetches Debian installer components to /boot/debian-$VERSION/
  3. Preseed Generation: Creates automated installation configuration
  4. GRUB Modification: Adds installer entry to bootloader menu
  5. Initramfs Injection: Embeds preseed and network configuration into installer
  6. 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 URLs
  • configure_sshd(): Sets up SSH access during installation for remote monitoring
  • in_target(): Executes commands within the target installation environment
  • prompt_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

  1. Maintain POSIX compliance - Script must work with dash/sh, not just bash
  2. Test on real systems - No test suite exists; changes require VM or physical testing
  3. Preserve backward compatibility - Many users rely on specific option behaviors
  4. Document all options - Update README.md for any new configuration options
  5. Handle errors gracefully - Always provide rollback paths for critical operations

Common Development Tasks

Adding New Configuration Options

  1. Add option to the case statement in the argument parsing section
  2. Define corresponding variable with sensible default
  3. Implement logic in appropriate phase function
  4. Update README.md documentation

Debugging Installation Issues

  1. Use --dry-run to generate and inspect preseed configuration
  2. Enable network console with --ssh for remote debugging
  3. Check /boot/debian-$VERSION/ for downloaded components
  4. 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

Download now (ZIP)

Trending

Quiet this year.thin dataabout the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the bohanwood/debi repository that our weekly crawl found: only 1 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.