Skip to content

cassmtnr/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

231 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Dotfiles

  • macOS and Linux development environment
  • One-command setup, safe to re-run
  • Version-controlled and portable across machines

Installation

git clone https://github.com/cassmtnr/dotfiles.git ~/dotfiles
cd ~/dotfiles

# Review .brewfile, .aliases, .functions, and .defaults before running
# to customize packages and preferences for your setup.
./install.sh

Idempotent β€” safe to run multiple times.

Updating

./update.sh              # Refresh symlinks only
./update.sh -p           # Also update Homebrew packages
./update.sh -d           # Also re-apply macOS defaults
./update.sh -a           # All of the above

Project Structure

dotfiles/
β”œβ”€β”€ install.sh                 # Full installation
β”œβ”€β”€ update.sh                  # Lightweight update (symlinks + optional packages/defaults)
β”œβ”€β”€ .utils.sh                  # Shared utilities (OS detection, logging, symlinks, packages)
β”œβ”€β”€ .brewfile                  # Homebrew packages (45+)
β”œβ”€β”€ .editorconfig              # Cross-editor coding standards
β”œβ”€β”€ .zshrc                     # Shell configuration
β”œβ”€β”€ .zshenv                    # Environment variables
β”œβ”€β”€ .functions                 # Utility functions (mkd, killport, extract, weather)
β”œβ”€β”€ .aliases                   # Shell aliases (25+)
β”œβ”€β”€ .ssh-agent                 # SSH agent management
β”œβ”€β”€ .completion                # Shell completions
β”œβ”€β”€ .starship                  # Starship prompt configuration
β”œβ”€β”€ .defaults                  # macOS system preferences
β”œβ”€β”€ .bun                       # Bun JavaScript runtime config
β”œβ”€β”€ .ghostty/                  # Ghostty terminal (Nord theme, custom keybindings)
β”œβ”€β”€ .ssh/config                # SSH configuration template
β”œβ”€β”€ .ai/                       # AI CLI configuration
β”‚   β”œβ”€β”€ common/                # Shared by Claude Code & Codex CLI
β”‚   β”‚   β”œβ”€β”€ instructions.md    # Global AI instructions
β”‚   β”‚   β”œβ”€β”€ commands/          # Slash commands (/craft)
β”‚   β”‚   └── hooks/             # PreToolUse safety hooks
β”‚   β”œβ”€β”€ claude/                # Claude Code only
β”‚   β”‚   β”œβ”€β”€ settings.json      # Settings (plugins, permissions, statusline)
β”‚   β”‚   └── config/            # Custom statusline script
β”‚   └── codex/                 # Codex CLI only
β”‚       β”œβ”€β”€ config.toml        # Model and approval policy
β”‚       └── hooks.json         # Hook configuration
β”œβ”€β”€ .vscodium/                 # VSCodium settings, extensions, custom icon
β”œβ”€β”€ .lazydocker/               # LazyDocker terminal UI configuration
β”œβ”€β”€ .motd/                     # Message of the Day scripts (Linux/VPS)
└── .alfred/                   # Alfred workflows and preferences (macOS only)

Post-Install Configuration

  1. SSH: Edit ~/dotfiles/.ssh/config with your key paths and hosts
  2. SSH Agent: Edit .ssh-agent with your key paths
  3. Git: git config --global user.name/user.email
  4. Local overrides: Create ~/.zshrc.local for machine-specific settings

AI CLI Configuration

Shared configuration for Claude Code and Codex CLI, symlinked to ~/.claude/ and ~/.codex/.

  • .ai/common/ contains only assets that are intended to work for both CLIs
  • .ai/claude/ contains Claude-only settings
  • .ai/codex/ contains Codex-only settings
  • ~/.codex/instructions.md is loaded by Codex via model_instructions_file in .ai/codex/config.toml
  • Codex hooks are enabled explicitly in .ai/codex/config.toml because hooks.json is ignored unless the codex_hooks feature is on
  • Codex TUI status line and terminal title are versioned in .ai/codex/config.toml via the built-in [tui] settings; keeping the full status_line list there makes it persist across new Codex sessions
  • Codex project trust is intentionally not hardcoded in the repo because projects.<path>.trust_level is machine-specific

Safety hooks β€” block-dangerous-commands.js blocks dangerous Bash commands via PreToolUse hooks at three levels:

  • Critical: filesystem destruction, disk operations, fork bombs, git history rewriting
  • High (default): git write ops, elevated privileges, secrets exposure, publishing/deployment, database ops
  • Strict: cautionary patterns (git checkout ., docker prune)

Plugins (Claude Code only) β€” installed from enabled entries in .ai/claude/settings.json (currently superpowers, code-simplifier, frontend-design, sentry, swift-lsp, pyright-lsp).

VSCodium

VSCodium (open-source VS Code without Microsoft telemetry). Settings, extensions, and a custom icon are managed in .vscodium/:

  • install.sh / update.sh handle symlinks, extensions, and icon automatically
  • brew() wrapper in .functions re-applies the icon after upgrades
  • alias code="codium" for transparent compatibility

Security

  • Never commit actual SSH keys β€” only configuration templates
  • Use .zshrc.local for private/sensitive configurations
  • SSH keys should have 600 permissions
  • .gitignore protects sensitive files

Troubleshooting

  • Slow startup: time zsh -lic exit and zmodload zsh/zprof
  • SSH issues: ssh -T git@github.com or ssh -vT for debug
  • Homebrew: brew doctor and brew update

License

CC0 1.0 Universal

CC0

Inspired By

About

mac dotfiles with some linux remarks πŸ—οΈ

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors