Complete guide to scripts and utilities in this dotfiles repository.
Last Updated: 2026-04-12
dotfiles/
├── bin/ # User utilities (stowed to ~/bin)
│ └── bin/
│ ├── docker-clean # Docker cleanup utility
│ ├── dotfiles-backup # Quick dotfiles backup
│ ├── dotfiles-update # Update and restow dotfiles
│ └── switch-theme # Oh-my-posh theme switcher
│
├── scripts/ # Installation & maintenance (NOT stowed)
│ ├── setup/
│ │ ├── bootstrap.sh # Automated initial setup
│ │ ├── install-docker.sh # Docker Engine installation
│ │ ├── install-fonts.sh # Nerd Fonts installation
│ │ ├── install-ghostty.sh # Ghostty terminal installation
│ │ ├── install-node.sh # Node.js + npm globals
│ │ ├── install-uv-tools.sh # UV Python tools
│ │ └── uninstall.sh # Remove all dotfiles and installed components
│ │
│ ├── maintenance/
│ │ ├── verify-installation.sh # Verify dotfiles installation
│ │ └── verify-auth.sh # Verify authentication setup
│ │
│ └── utils/
│ └── manual-backup.sh # Manual backup utility
│
└── [other stow packages...]
Location: ~/dotfiles/bin/bin/ → Stowed to ~/bin/
In PATH: ✅ Yes (added by .bash/path)
Purpose: Daily-use utilities you can run from anywhere
| Command | Description | Usage |
|---|---|---|
dotfiles-update |
Pull latest changes and restow | dotfiles-update |
dotfiles-backup |
Create timestamped backup | dotfiles-backup [dir] |
docker-clean |
Clean Docker cache and images | docker-clean [--all] |
switch-theme |
Change oh-my-posh theme | switch-theme |
Example Usage:
# Update dotfiles from git
dotfiles-update
# Create quick backup
dotfiles-backup
# Clean Docker (keep images)
docker-clean
# Clean Docker (remove all)
docker-clean --all
# Switch prompt theme
switch-themeLocation: ~/dotfiles/scripts/setup/
In PATH: ❌ No (run with explicit path)
Purpose: One-time installation and setup
Purpose: Automated dotfiles installation and configuration
What it does:
- Checks prerequisites (git, stow)
- Optionally installs Homebrew
- Detects and handles conflicts
- Installs all dotfiles packages via stow
- Verifies installation
- Creates machine-specific config files
Usage:
cd ~/dotfiles
./scripts/setup/bootstrap.shWhen to use:
- Fresh machine setup
- Initial dotfiles installation
- After cloning dotfiles to new system
Purpose: Install Docker Engine via official repository
What it does:
- Removes old Docker packages
- Adds Docker's GPG key and repository
- Installs Docker CE, CLI, and plugins
- Adds user to docker group
- Enables Docker service
Usage:
cd ~/dotfiles
./scripts/setup/install-docker.sh
# Log out and back in for group changesInstalled:
- Docker CE, Docker Compose, Docker Buildx (latest stable versions)
Purpose: Download and install Nerd Fonts
What it does:
- Downloads JetBrainsMono, FiraCode, Meslo
- Extracts to
~/.local/share/fonts/ - Updates font cache
Usage:
cd ~/dotfiles
./scripts/setup/install-fonts.shInstalled: JetBrainsMono, FiraCode, Meslo (Nerd Fonts, latest version)
Purpose: Install the Ghostty terminal emulator on Linux
What it does:
- Prompts for install method: snap, Ubuntu
.deb(community-maintained), or build from source - For
.deb: pulls the latest release from themkasberg/ghostty-ubuntuGitHub releases and installs it viaapt - For build-from-source: checks/installs build dependencies (zig, etc.) and compiles
- Cleans up temp files on exit
Usage:
cd ~/dotfiles
./scripts/setup/install-ghostty.shWhen to use:
- Fresh machine where Ghostty isn't available via Homebrew
- Upgrading Ghostty to a newer community build than what's in the repos
Purpose: Install Node.js via fnm and global npm packages
What it does:
- Installs Node.js 20 (default) and 22 via fnm
- Sets Node 20 as default version
- Installs global npm packages with detailed output
Usage:
cd ~/dotfiles
./scripts/setup/install-node.shInstalled:
- Node.js v20 (default)
- Node.js v22
NPM Global Packages:
| Package | Command | Description |
|---|---|---|
| @anthropic-ai/claude-code | claude |
AI coding assistant CLI |
Purpose: Install Python CLI tools via uv
What it does:
- Displays package manifest with all provided commands
- Installs packages via uv tool
- Verifies installation
Usage:
cd ~/dotfiles
./scripts/setup/install-uv-tools.shUV Tool Packages:
| Package | Command | Description |
|---|---|---|
| claude-code-tools | tmux-cli |
Terminal multiplexer CLI control |
aichat |
Claude Code session management | |
env-safe |
Safe .env inspection (no secret exposure) | |
gdoc2md |
Google Docs to Markdown | |
md2gdoc |
Markdown to Google Docs | |
vault |
Encrypted .env backup/sync |
Purpose: Safely remove all dotfiles and installed components
What it does:
- Scans for installed components (stowed dotfiles, Homebrew, Ghostty, fonts, etc.)
- Shows what will be removed
- Asks for confirmation before proceeding
- Unstows all packages, removes components, restores system defaults
Usage:
cd ~/dotfiles
./scripts/setup/uninstall.sh # Full uninstall (with confirmation)
./scripts/setup/uninstall.sh --dry-run # Preview only, no changesLocation: ~/dotfiles/scripts/maintenance/
In PATH: ❌ No (run with explicit path)
Purpose: Verification and system checks
Purpose: Comprehensive dotfiles installation verification
What it checks:
- Prerequisites (git, stow, Homebrew)
- Repository status
- All 19 stow packages (bash, bin, btop, claude, dippy, eza, fzf, ghostty, git, glow, gtk, htop, lazydocker, lazygit, micro, oh-my-posh, ripgrep, tmux, yazi)
- 22 critical symlinks (includes ~/bin utilities and tool configs)
- Broken symlinks
- Homebrew packages
- Key tools availability (13 tools including gh, glab, composer, bw)
- Shell configuration (PATH, Homebrew, ~/bin)
- Authentication setup (Bitwarden, tokens, SSH agent)
- System configuration (sudoers)
- Security (no secrets committed)
- Documentation completeness
Usage:
cd ~/dotfiles
./scripts/maintenance/verify-installation.shOutput: Pass/Warn/Fail report with detailed analysis
Purpose: Comprehensive authentication setup verification
What it checks:
- Bitwarden CLI installation and session
- Development tokens (GITHUB_TOKEN, GITLAB_TOKEN, COMPOSER_AUTH)
- SSH agent (Bitwarden SSH Agent)
- GitHub CLI (gh) configuration and authentication
- GitLab CLI (glab) configuration for self-hosted instance
- Composer authentication
- tmpfs storage (RAM-only secrets in /run/user/$UID/)
- System configuration (Homebrew sudoers)
Usage:
cd ~/dotfiles
./scripts/maintenance/verify-auth.sh
# Or via Makefile
make verify-authOutput: Comprehensive authentication status with color-coded results
When to use:
- After initial authentication setup
- Troubleshooting authentication issues
- Verifying Bitwarden integration
- Checking token availability
Location: ~/dotfiles/scripts/utils/
In PATH: ❌ No (run with explicit path)
Purpose: Miscellaneous helper scripts
Purpose: Manual backup with custom options
Usage:
cd ~/dotfiles
./scripts/utils/manual-backup.shFrom ~/.bash/path:
if [ -d "$HOME/bin" ]; then
export PATH="$HOME/bin:$PATH"
fiAfter sourcing ~/.bashrc:
$ which dotfiles-update
/home/sebastian/bin/dotfiles-update
$ which docker-clean
/home/sebastian/bin/docker-clean- Create script in
~/dotfiles/bin/bin/:
cd ~/dotfiles/bin/bin
nano my-script
chmod +x my-script- Restow bin package:
cd ~/dotfiles
stow -R bin- Test:
which my-script
my-script --help- Create in
~/dotfiles/scripts/setup/:
cd ~/dotfiles/scripts/setup
nano install-something.sh
chmod +x install-something.sh-
Document it in this file (SCRIPTS.md)
-
Run explicitly:
./scripts/setup/install-something.sh- Create in
~/dotfiles/scripts/maintenance/:
cd ~/dotfiles/scripts/maintenance
nano check-something.sh
chmod +x check-something.sh- Call from Makefile if appropriate
The Makefile provides shortcuts for common operations:
make install # Installs all packages (includes bin/)
make uninstall # Removes all symlinks
make update # Git pull + restow
make test # Dry run
make bin # Install only bin/ packageRelevant targets:
# PACKAGES variable (defined once, used by install/uninstall/update):
PACKAGES := bash bin claude dippy git gtk ghostty oh-my-posh tmux yazi micro htop btop eza fzf glow lazygit lazydocker ripgrep- Shebang: Always start with
#!/bin/bash - Error handling: Use
set -eto exit on errors - Functions: Use colored output functions (info, warn, error)
- Idempotency: Safe to run multiple times
- Documentation: Add usage comment at top
- Permissions: Make executable with
chmod +x
#!/bin/bash
# script-name - Brief description
# Usage: script-name [options]
set -e
# Colors
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
RED='\033[0;31m'
NC='\033[0m'
info() { echo -e "${GREEN}[INFO]${NC} $1"; }
warn() { echo -e "${YELLOW}[WARN]${NC} $1"; }
error() { echo -e "${RED}[ERROR]${NC} $1"; }
# Main logic here
info "Starting..."
# ...
info "✓ Complete!"Problem: dotfiles-update: command not found
Solutions:
# 1. Reload shell
source ~/.bashrc
# Or
exec bash
# 2. Verify ~/bin exists
ls -la ~/bin
# 3. Check PATH
echo $PATH | tr ':' '\n' | grep bin
# 4. Restow bin package
cd ~/dotfiles && stow -R binProblem: bash: ./script: Permission denied
Solution:
chmod +x ~/dotfiles/bin/bin/script-name
# Or
chmod +x ~/dotfiles/scripts/setup/script-name.shProblem: Stowed but script doesn't appear in ~/bin
Solution:
# Check stow structure
ls -la ~/dotfiles/bin/bin/
# Unstow and restow
cd ~/dotfiles
stow -D bin
stow -v bin
# Verify symlinks
ls -la ~/bin/Before:
dotfiles/
├── bootstrap.sh
├── install-docker.sh
├── install-fonts.sh
├── manual-backup.sh
├── verify-installation.sh
└── ghostty/.config/ghostty/
├── install-glow.sh
├── install-simple.sh
├── install-terminal-tools.sh
└── install-yazi.sh
After:
dotfiles/
├── bin/bin/ # NEW: User utilities
├── scripts/
│ ├── setup/ # Moved: Installation scripts
│ ├── maintenance/ # Moved: Verification scripts
│ └── utils/ # Moved: Helper scripts (manual-backup.sh)
Benefits:
- ✅ Clear separation of concerns
- ✅ User scripts in PATH via ~/bin
- ✅ Installation scripts organized
- ✅ Easy to find and maintain
- ✅ Follows Unix best practices
| Task | Command |
|---|---|
| Update dotfiles | dotfiles-update |
| Backup dotfiles | dotfiles-backup |
| Clean Docker | docker-clean |
| Switch theme | switch-theme |
| Fresh install | ./scripts/setup/bootstrap.sh |
| Install Docker | ./scripts/setup/install-docker.sh |
| Install fonts | ./scripts/setup/install-fonts.sh |
| Install Node.js | ./scripts/setup/install-node.sh |
| Install UV tools | ./scripts/setup/install-uv-tools.sh |
| Uninstall all | ./scripts/setup/uninstall.sh |
| Verify setup | ./scripts/maintenance/verify-installation.sh |
| Verify auth | ./scripts/maintenance/verify-auth.sh or make verify-auth |
| Manual backup | ./scripts/utils/manual-backup.sh |
Document Version: 1.1 Last Updated: 2026-04-12 Maintained by: Sebastian