Skip to content

cadig/zero-to-dev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Zero-to-Dev: Local Environment Setup Script

A single idempotent Bash script (setup.sh) that detects your environment and configures:

  1. Shell aliases — git, navigation, Docker, and Claude Code shortcuts
  2. Claude Code notification hooks — system notifications when Claude needs your input

The script never deletes or overwrites existing configuration — it only appends/adds what's missing.

Quick Start

bash setup.sh

No sudo required — everything is user-space.

Options

Flag Description
--dry-run Show what would change without modifying anything
--uninstall Remove all changes made by the script

What It Does

Environment Detection

Check Method
OS uname -s → macOS or Linux
macOS version sw_vers -productVersion → newer (15+/Sequoia) or older
Shell $SHELL → bash or zsh
RC file zsh → ~/.zshrc, macOS bash → ~/.bash_profile, Linux bash → ~/.bashrc

Aliases

Aliases are written to ~/.zero-to-dev-aliases (fully owned and regenerated by the script each run). A single source line is added to your shell RC file:

# zero-to-dev aliases
[ -f ~/.zero-to-dev-aliases ] && source ~/.zero-to-dev-aliases

Included Aliases

Git:

gs='git status'          ga='git add'             gc='git commit'
gp='git push'            gpl='git pull'           gd='git diff'
gco='git checkout'       gb='git branch'          gst='git stash'
gl='git log --oneline --graph --decorate'

Navigation:

..='cd ..'    ...='cd ../..'    ....='cd ../../..'
ll='ls -la'   la='ls -A'        l='ls -CF'

Docker:

dps='docker ps'              dpsa='docker ps -a'
dcu='docker compose up'      dcd='docker compose down'
dcb='docker compose build'   dce='docker compose exec'
dl='docker logs'             dlf='docker logs -f'

Claude Code:

yolo='claude --dangerously-skip-permissions'
claudefast='claude --model haiku'

Claude Code Notification Hook

Adds a Notification hook to ~/.claude/settings.json so you get a system notification when Claude is waiting for input.

  • macOS: Uses terminal-notifier if available, falls back to osascript
  • Linux: Uses notify-send

The script safely merges into existing settings without overwriting anything.

Idempotency

The script is safe to run multiple times:

  • Source line is only added once (checked via grep)
  • Alias file is fully regenerated each run (script-owned)
  • Claude settings are merged, never overwritten
  • --uninstall cleanly reverses all changes

Project Structure

zero-to-dev/
├── setup.sh              # Main entry point
├── lib/
│   ├── detect-env.sh     # OS/shell detection functions
│   ├── aliases.sh        # Alias installation logic
│   └── claude-hooks.sh   # Claude settings.json hook installation
└── README.md

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages