This file provides guidance for AI coding agents working in this repository.
This is a macOS machine setup repository containing:
- Dotfiles managed with GNU Stow
- Packages via Homebrew (Brewfile)
- System preferences via shell script
This is a config-only repository - there are no build steps, tests, or linting to run.
# Install all packages from Brewfile
brew bundle
# Regenerate Brewfile from currently installed packages
brew bundle dump --force --no-restart --no-vscodeStow packages are located in the dotfiles/ subdirectory.
# Apply a dotfile package (creates symlinks to home directory)
stow -d dotfiles -t ~ <package>
# Remove a dotfile package
stow -d dotfiles -t ~ -D <package>
# Preview what stow would do (dry run)
stow -d dotfiles -t ~ -n -v <package># Apply macOS system preferences
bash scripts/macos-config.shEach stow package is a directory inside dotfiles/. The internal structure mirrors
the home directory layout.
git, kitty, lazydocker, lazygit, nvim, opencode, ssh, tmux, zshrc
To add a new config file to the repository:
- Create a directory inside
dotfiles/matching the application name - Inside, recreate the path from home directory
- Move the config file into this structure
- Run
stow -d dotfiles -t ~ <package>to create the symlink
Example: Adding ~/.config/foo/config.yml
dotfiles/
foo/
.config/
foo/
config.yml
This repository uses conventional commits.
Use trash instead of rm for safety (allows recovery):
# Preferred
trash ~/.config/old-app
# Only for dependencies
rm -rf node_modulesNever modify these files directly:
.envfiles (anywhere in the repo).zsh_secrets(contains private tokens/keys)
These patterns are ignored and should stay that way:
.DS_Store
**/.env
.zsh_secrets
/dotfiles/lazygit/Library/Application Support/lazygit/state.yml
When adding configs that reference personal or work-related identifiers:
- Rename or anonymize identifiers before committing
- Use generic names (e.g.,
clbrt-*instead of full company names)
Shell scripts in this repository follow these conventions:
- Shebang:
#!/bin/bash - Use
shfmtfor formatting (included in Brewfile) - Section separators with comment blocks
The dotfiles/opencode/.config/opencode/ directory contains TypeScript plugins.
dotfiles/opencode/.config/opencode/
plugin/ # TypeScript plugins
command/ # Custom slash commands (markdown)
instructions/ # System instructions (markdown)
opencode.jsonc # Main configuration
When modifying plugins:
- Use
async/awaitover promise chains - Use named imports:
import { foo } from "bar" - Use
constoverlet - No
anytype - use proper types orunknown - No code comments
dotfiles/
Brewfile # Homebrew packages
README.md # User documentation
scripts/
macos-config.sh # macOS system preferences
dotfiles/ # Stow packages directory
git/ # Stow package
kitty/ # Stow package
lazydocker/ # Stow package
lazygit/ # Stow package
nvim/ # Stow package (LazyVim)
opencode/ # Stow package (AI agent config)
ssh/ # Stow package
tmux/ # Stow package
zshrc/ # Stow package