Guidance for agentic coding tools working in this repository.
LinuxWizards is a collection of Bash scripts that automate Linux environment setup for developers. Scripts aim for POSIX compatibility where possible but use Bash features and are run from the repo root.
- Make minimal, targeted changes that follow existing script structure and messaging.
- Preserve interactive flow, prompts, and user-facing output.
- Prefer updates that are safe for repeat runs.
common.sh: shared helpers (colors, print_message, print_success/error/warning, dots, command_exists, print_link).*.shin repo root: main wizard scripts.scripts/: helper executables and the.aliasesfile copied byaliasWizard.sh.README.md: user-facing usage and alias reference.CLAUDE.md: legacy duplicate guidance; treatAGENTS.mdas source of truth.
#!/usr/bin/env bashsource ./common.shwelcome()banner with colors and a 5-second pause- Helper functions for the script's tasks
main()orchestrates the flow- Call
mainat the end
- Color constants and
NO_COLORhandling; disables colors when not a TTY. print_message,print_success,print_error,print_warningfor consistent output.command_existsfor dependency checks.dotsfor progress indicators, with optionalDOTS_COUNTandDOTS_DELAY.print_linkfor clickable terminal links (OSC 8).
softwareWizard.sh: apt updates and installs, plus manual install links (requires sudo).gitWizard.sh: global git config and SSH key creation.aliasWizard.sh: manages~/.aliases, updates shell rc, and installs helper scripts to~/bin.repoWizard.sh: creates repo scaffolding and performs initial commit.debianWizard.sh: Debian system setup tasks (requires sudo).z.sh: zsh/oh-my-zsh/powerlevel10k setup.test.sh: small demo ofprint_linkoutput.
- Run from the repo root so
./common.shresolves correctly. - Make executable:
chmod +x scriptName.sh. - Execute:
./scriptName.sh. - Expect interactive prompts; most scripts are not meant for non-interactive use.
softwareWizard.shanddebianWizard.shrequire sudo or root.
- Most scripts assume Debian or Ubuntu tooling (apt, systemctl, timedatectl).
- Network access is required for downloads (curl, git clone).
debianWizard.shre-execs with sudo when not root.- Avoid running these scripts in CI without explicit safeguards.
aliasWizard.shcopiesscripts/.aliasesto~/.aliases; keep README alias docs in sync.aliasWizard.shadds source blocks to.bashrcor.zshrcusinggrep -qFfor idempotency.aliasWizard.shinstallsscripts/run,scripts/mkrun,scripts/autocommit,scripts/autopushto~/bin.gitWizard.shwrites SSH keys under~/.ssh; do not print or log secrets.softwareWizard.shinstallsuvand agent tools via curl; keep links inmanual_links()up to date.z.shwrites~/.dircolorsand may append to Ghostty config; ensure parent dirs exist.repoWizard.shwrites scaffold files and .gitignore entries; keep defaults consistent.
Build:
- No build step; scripts are executed directly.
Lint (optional, if tools installed):
- All scripts:
shellcheck *.sh scripts/*. - Single file:
shellcheck gitWizard.sh. - Syntax-only:
bash -n gitWizard.sh.
Format:
- No enforced formatter. If you use
shfmt, keep the existing indentation in the file you touch.
Tests:
- No automated tests in this repo.
- Manual smoke test: run the target script from the repo root (example:
./aliasWizard.sh). - Single-test equivalent:
bash -n path/to/script.shorshellcheck path/to/script.sh.
Imports and structure:
- Always
source ./common.shnear the top; do not change the relative path. - Keep shared logic in
common.shrather than duplicating helpers. - End scripts with a
mainfunction call.
Formatting:
- Use
printfinstead ofechofor consistent output. - Quote variables and expansions:
"$var","$@". - Prefer
[[ ... ]]andcasewhere already in use. - Use
localfor function-scoped variables. - Keep blank lines between top-level functions.
- Preserve existing indentation and wrapping in the file you edit.
Naming and types:
- Functions use lower_snake_case verbs (
install_packages,git_test). - Globals use lower_snake_case; constants and env vars use UPPER_SNAKE_CASE.
- Keep types simple (strings, integers); avoid arrays unless needed.
User interaction:
- Use
read -erp "Prompt: " varfor prompts. - Validate required input in loops; default yes with
[Yy]*|"". - Use
print_success,print_error, andprint_warningfor status output. - Use
dotsbefore long-running commands. - Keep the 5-second pause after welcome banners for readability.
common.shhandles colors based on TTY andNO_COLOR.
Error handling:
- Prefer explicit checks:
if ! command; then ...; return 1; fi. - Use
cmd || { print_error "..."; exit 1; }for fatal failures. - Avoid
set -ein wizard scripts unless the whole script is designed for it. - Use
return 0for success; return non-zero on failure.
External commands and safety:
- Prefer bash built-ins over external commands when practical.
- Quote paths and use
--before path arguments where supported. - Avoid destructive commands without user confirmation.
Files and paths:
- Use absolute paths when writing to user locations (
$HOME,~/.ssh). - Expand
~using parameter expansion when needed (${var/#\~/$HOME}). - Use
mkdir -pand check write permissions before creating files.
Output and logging:
- Keep user-facing messages short and actionable.
- Prefer
print_*helpers for consistency and color handling. - When printing links, use
print_linkfor clickable output.
Security and secrets:
- Do not print passwords or passphrases to the terminal.
- Never write secrets to tracked files without explicit user request.
- Keep SSH keys under
~/.sshand ensure permissions are locked down.
Documentation updates:
- Update
README.mdwhen changing user-facing behavior or aliases. - Keep alias lists in
scripts/.aliasesand README in sync.
- Default git branch is
main. repoWizard.shperforms an initial commit and switches todev.- Git settings in
gitWizard.shuse SSH-based signing when available. repoWizard.shscaffolding writes.gitignoreand.dockerignorewith standard entries.- Devcontainer layout (when opted in):
docker/dev,docker/prod,.devcontainer,.vscode.
- No
.cursor/rules/,.cursorrules, or.github/copilot-instructions.mdfiles exist in this repo.