Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Project defaults for markdownlint / markdownlint-cli2
# https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md
default: true
MD007:
indent: 2
# Prose and README tables are easier to maintain without strict wrapping
MD013: false
1 change: 1 addition & 0 deletions .markdownlintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
4 changes: 4 additions & 0 deletions .shellcheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Allow following sourced files not passed on the command line (same as -x).
external-sources=true
# Resolve sources relative to each script's directory (e.g. utils.sh next to cli.sh).
source-path=SCRIPTDIR
52 changes: 46 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,16 +130,56 @@ On push/PR to `master`, **Test Runner** (`.github/workflows/test-runner.yaml`) r

## What gets installed

Illustrative list; see each `*.sh` for the exact Homebrew lines.
Illustrative list; see each `*.sh` for exact commands and edge cases.

### System configuration
### Pre-install (`pre-install.sh`)

- Homebrew and Xcode Command Line Tools (via `pre-install.sh`)
- Firewall, stealth mode, guest account, Software Update and `pmset` behavior (via `system-config.sh`)
- Homebrew (install if missing), `brew update`, `brew upgrade`, `brew cleanup`, analytics off
- Xcode Command Line Tools and system software updates (`softwareupdate`)

### Development, CLI, media, productivity, security
### System defaults (`system-config.sh`)

Examples include Node/Python tooling, Docker-related tooling, editors, browsers, media apps, productivity and security casks, and repositories—aligned with `dev.sh`, `cli.sh`, `media.sh`, `productivity.sh`, and `security.sh`.
- Firewall, stealth mode, guest account, Software Update and `pmset` behavior (no Homebrew packages)

### Home layout (`organizeHome.sh`)

Creates `~/Books`, `~/Games`, `~/Hacking`, `~/Projects`; removes empty `~/Templates` if present (no Homebrew packages)

### CLI tools (`cli.sh`)

bat, curl, eza, fastfetch, fd, git, htop, jq, ripgrep, vim, wget

### Media (`media.sh`)

Brave Browser, DuckDuckGo, Spotify, VLC

### Productivity (`productivity.sh`)

- **Homebrew casks**: Balena Etcher, Notion, Proton Drive, Proton Mail, Standard Notes, Zoom
- **Homebrew formula**: Raycast

### Development (`dev.sh`)

- **Homebrew formulas**: Node, Python 3.12, Colima, Docker, Docker Compose, GitHub CLI (`gh`), Neovim, Podman, Semgrep, ShellCheck, Tree-sitter, Angular CLI
- **Homebrew casks**: Postman, Visual Studio Code
- **Other Homebrew**: Sourcegraph app (from `sourcegraph/app` tap), Sourcegraph CLI (`src-cli`)
- **Also**: NVM (official install script), `packer.nvim` for Neovim, optional Neovim / Vim / VS Code config from `src/dotfiles/`, global Git user settings and credential helper, `colima start`

### Security (`security.sh`)

- **Homebrew casks**: 1Password, 1Password CLI, Proton VPN, Signal, Burp Suite, OWASP ZAP
- **Homebrew formulas**: OpenVPN, ExifTool, Nmap
- **Also**: Proton Pass CLI (install script), clones **PayloadsAllTheThings** and **SecLists** into `~/Hacking/`, enables Application Firewall

### Shell and terminal (`shell.sh`)

- **Homebrew formulas**: Oh My Posh (`jandedobbeleer/oh-my-posh/oh-my-posh`), Ghostty, Zsh, tmux, zsh-autosuggestions, zsh-syntax-highlighting
- **Homebrew casks**: Font Awesome Terminal Fonts, Fira Code, Meslo LG Nerd Font, Powerline Symbols
- **Also**: optional Ghostty, tmux, and `.zshrc` from `src/dotfiles/`; default login shell set to Zsh

### Post-install (`post-install.sh`)

`brew` update, upgrade, and cleanup; prints `src/assets/wolf.txt` when present

### Configuration files

Expand Down
1 change: 1 addition & 0 deletions src/scripts/cli.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

# shellcheck source=utils.sh
source "$(dirname "$0")/utils.sh"

brew install bat curl eza fastfetch fd git htop jq ripgrep vim wget 2>>"$ERROR_LOG_FILE" || true
1 change: 1 addition & 0 deletions src/scripts/dev.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

# shellcheck source=utils.sh
source "$(dirname "$0")/utils.sh"

brew install node python@3.12 colima docker docker-compose gh neovim podman semgrep shellcheck tree-sitter angular-cli 2>>"$ERROR_LOG_FILE" || true
Expand Down
1 change: 1 addition & 0 deletions src/scripts/master.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

# shellcheck source=utils.sh
source "$(dirname "$0")/utils.sh"

if [[ "$OSTYPE" != "darwin"* ]]; then
Expand Down
1 change: 1 addition & 0 deletions src/scripts/media.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

# shellcheck source=utils.sh
source "$(dirname "$0")/utils.sh"

brew install --cask brave-browser duckduckgo spotify vlc 2>>"$ERROR_LOG_FILE" || true
5 changes: 4 additions & 1 deletion src/scripts/organizeHome.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#!/bin/bash

# shellcheck source=utils.sh
source "$(dirname "$0")/utils.sh"

[[ -d "$HOME/Templates" ]] && rmdir "$HOME/Templates" 2>>"$ERROR_LOG_FILE" || true
if [[ -d "$HOME/Templates" ]]; then
rmdir "$HOME/Templates" 2>>"$ERROR_LOG_FILE" || true
fi
mkdir -p "$HOME/Books" "$HOME/Games" "$HOME/Hacking" "$HOME/Projects" 2>>"$ERROR_LOG_FILE" || true
1 change: 1 addition & 0 deletions src/scripts/post-install.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

# shellcheck source=utils.sh
source "$(dirname "$0")/utils.sh"

brew update 2>>"$ERROR_LOG_FILE" || true
Expand Down
1 change: 1 addition & 0 deletions src/scripts/pre-install.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

# shellcheck source=utils.sh
source "$(dirname "$0")/utils.sh"

if ! command -v brew >/dev/null 2>&1; then
Expand Down
3 changes: 2 additions & 1 deletion src/scripts/productivity.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

# shellcheck source=utils.sh
source "$(dirname "$0")/utils.sh"

brew install --cask balenaetcher chatgpt notion proton-drive proton-mail standard-notes zoom 2>>"$ERROR_LOG_FILE" || true
brew install --cask balenaetcher notion proton-drive proton-mail standard-notes zoom 2>>"$ERROR_LOG_FILE" || true
brew install raycast 2>>"$ERROR_LOG_FILE" || true
8 changes: 5 additions & 3 deletions src/scripts/security.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

# shellcheck source=utils.sh
source "$(dirname "$0")/utils.sh"

brew install --cask 1password 1password-cli 2>>"$ERROR_LOG_FILE" || true
Expand All @@ -11,9 +12,10 @@ brew install --cask burp-suite zap 2>>"$ERROR_LOG_FILE" || true
# Install Proton Pass CLI
curl -fsSL https://proton.me/download/pass-cli/install.sh | bash 2>>"$ERROR_LOG_FILE" || true
export PATH="/Users/garret/.local/bin:$PATH"
# Add PATH to .zshrc if not already present
if ! grep -q 'export PATH="/Users/garret/.local/bin:$PATH"' "$HOME/.zshrc" 2>/dev/null; then
echo 'export PATH="/Users/garret/.local/bin:$PATH"' >> "$HOME/.zshrc" 2>>"$ERROR_LOG_FILE" || true
# Add PATH to .zshrc if not already present ($PATH must expand when zsh reads .zshrc, not here)
path_line="export PATH=\"/Users/garret/.local/bin:\$PATH\""
if ! grep -qF "$path_line" "$HOME/.zshrc" 2>/dev/null; then
echo "$path_line" >> "$HOME/.zshrc" 2>>"$ERROR_LOG_FILE" || true
fi

sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate on 2>>"$ERROR_LOG_FILE" || true
Expand Down
1 change: 1 addition & 0 deletions src/scripts/shell.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

# shellcheck source=utils.sh
source "$(dirname "$0")/utils.sh"

brew install jandedobbeleer/oh-my-posh/oh-my-posh 2>>"$ERROR_LOG_FILE" || true
Expand Down
1 change: 1 addition & 0 deletions src/scripts/system-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# security, developer-oriented defaults, and Apple Silicon–friendly power tuning).
# Run on macOS; many changes apply after Dock / Finder / ControlCenter / SystemUIServer restart.

# shellcheck source=utils.sh
source "$(dirname "$0")/utils.sh"

if [[ "$OSTYPE" != "darwin"* ]]; then
Expand Down
9 changes: 6 additions & 3 deletions src/scripts/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ mkdir -p "$(dirname "$ERROR_LOG_FILE")"

log_error() {
local message="$1"
local timestamp=$(date '+%Y-%m-%d %H:%M:%S')
local timestamp
timestamp=$(date '+%Y-%m-%d %H:%M:%S')
echo -e "\033[0;31m[ERROR]\033[0m $message" >&2
echo "[$timestamp] [ERROR] $message" >> "$ERROR_LOG_FILE"
}
Expand All @@ -26,7 +27,8 @@ copy_file_safe() {
return 0
fi

local dest_dir=$(dirname "$destination")
local dest_dir
dest_dir=$(dirname "$destination")
ensure_directory "$dest_dir"

cp "$source" "$destination" 2>>"$ERROR_LOG_FILE" || true
Expand All @@ -40,7 +42,8 @@ copy_directory_safe() {
return 0
fi

local dest_dir=$(dirname "$destination")
local dest_dir
dest_dir=$(dirname "$destination")
ensure_directory "$dest_dir"

cp -r "$source" "$destination" 2>>"$ERROR_LOG_FILE" || true
Expand Down
Loading