Skip to content
ikuwowPublic

About

Personal configuration files for macOS and Linux, managed as symlinks for portability across machines.

Topics

Resources

Stars

25 stars

Watchers

2 watching

Forks

Latest commit

 

History

2,404 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotfiles

CI

Personal configuration files for macOS and Linux, managed as symlinks for portability across machines.

Set up your new Mac

Initial Setup (usually done in setup wizard)

Complete these during initial Mac setup or from System Preferences (reboot required if changed later):

  • ☑️ Update macOS to the latest version
  • ☑️ Set language
  • ☑️ Connect to internet
  • ☑️ Sign in with Apple ID
  • ☑️ Set password for login user

Required Manual Steps

  • ☑️ Install Developer Tools: xcode-select --install
  • ☑️ Grant Full Disk Access to Terminal (System Preferences => Privacy & Security => Privacy => Full Disk Access => Add Terminal.app)
  • ☑️ Map Caps Lock to Control for each keyboard (System Settings => Keyboard => Keyboard Shortcuts => Modifier Keys)
  • ☑️ Swap ⌘ and ⌥ for external keyboards that need it, in the same panel
  • ☑️ Generate SSH key pair and register it to GitHub:
ssh-keygen -t ed25519 -C "your-email@example.com"

Be sure to set a passphrase.

Bootstrapping

curl -L https://raw.githubusercontent.com/ikuwow/dotfiles/main/bootstrap.sh | bash -s

When you want to bootstrap a specific branch:

curl -L https://raw.githubusercontent.com/ikuwow/dotfiles/main/bootstrap.sh | bash -s -- branchname

Set login shell after bootstrapping

LOGIN_SHELL="/opt/homebrew/bin/bash"
sudo sh -c "echo $LOGIN_SHELL >> /etc/shells"
chsh -s "$LOGIN_SHELL"

How It Works

All dotfiles in this repository are deployed as symlinks to your home directory by scripts/deploy.sh. For example, ~/.bashrc is a symlink pointing to ~/dotfiles/.bashrc. Editing any dotfile means editing the source file in this repository.

Symlink Map

Repository source Deployed to
Shell / version-manager dotfiles (.bashrc, .aliases, etc.) ~/
xdg-config/* (all subdirectories) ~/.config/
bin/* (executable files) ~/bin/
claude/ (settings, hooks, skills, agents, rules) ~/.claude/
hammerspoon/* (files) ~/.hammerspoon/
AIRULES.md Global AI instructions for Claude and Codex

See scripts/deploy.sh for the exact mapping.

Note: Some config files (e.g. git templateDir) hardcode ~/.config/ because they don't support variable expansion. This assumes XDG_CONFIG_HOME is set to the default ~/.config.

Repository Structure

dotfiles/
├── bootstrap.sh    # Entry point (run via curl on a new Mac)
├── bootstrap/      # OS/environment-specific bootstrap scripts
├── scripts/        # Symlink deployment, macOS defaults, Claude Code / Homebrew setup
├── Brewfile        # Homebrew package definitions
├── bin/            # Custom executable scripts → ~/bin/
├── xdg-config/     # XDG config files → ~/.config/
├── claude/         # Claude Code settings → ~/.claude/
├── claude-plugins/ # Claude Code plugin marketplace, installed by scripts/claude-code-setup.sh
├── codex/          # Codex CLI rules → ~/.codex/
├── hammerspoon/    # Hammerspoon config → ~/.hammerspoon/
├── userscripts/    # Safari userscripts loaded by the Userscripts extension
├── docs/           # Tool decision index
└── ... (dotfiles deployed to ~/, see Symlink Map)

Tool Decisions

docs/decisions.md indexes the repository's tool choices and the pull requests and issues behind them.

AI-Assisted Commit Messages

xdg-config/git/hooks/prepare-commit-msg drafts a commit message via claude -p when git commit opens the editor, using the Claude Code login for authentication. The hook is a no-op when the claude CLI is not on PATH. xdg-config/git/config enables it as a config-based hook (Git 2.54 or later) in repositories with a remote under ikuwow/, and hooks in .git/hooks/ keep running after it. Other repositories opt in with install-aimsg-hook.sh; running that in an ikuwow/ repository drafts twice. Disable it for an ikuwow/ repository with git config set hook.aimsg.enabled false, for an opted-in repository with the rm command in install-aimsg-hook.sh, or for one commit with GIT_AI_COMMIT_MSG=0 git commit. See the hook script for the model and requirements.

Machine-Local Overrides

To define settings that apply only to a specific machine (not tracked by this repository), create ~/.bash_profile.local. This file is sourced by .bash_profile at the end of startup, so it can set environment variables, aliases, or anything else that should not be committed.

Example:

# ~/.bash_profile.local
export ANTHROPIC_MODEL=opusplan

Bootstrap Flow

bootstrap.sh clones or updates the repo, then dispatches based on the environment:

  • Claude Code web (CLAUDE_CODE_REMOTE=true) → bootstrap/claude-code-web.sh
  • Otherwise → bootstrap/main.sh, which deploys symlinks, applies macOS defaults, and installs Homebrew packages

See each script for its exact steps.

Platform Support

  • macOS (Apple Silicon): Full support (Homebrew, system defaults, GUI apps)
  • Linux: Symlink deployment only

On Linux, the bootstrap process deploys symlinks and exits. Homebrew is not used on Linux in this project; shell configuration (.bash_profile, .bashrc) detects whether Homebrew is installed and skips all Homebrew-dependent setup when it is absent.

Claude Code Web

When CLAUDE_CODE_REMOTE=true is detected (set automatically by Claude Code web), bootstrap.sh runs bootstrap/claude-code-web.sh instead of the full macOS setup. It installs a few packages missing from the default image, deploys the dotfile symlinks, and runs scripts/claude-code-setup.sh to register MCP servers and install Claude Code plugins. See those scripts for the exact list.

Use this as the Claude Code web setup script:

curl -L https://raw.githubusercontent.com/ikuwow/dotfiles/main/bootstrap.sh | bash -s

Environment variables:

  • CLAUDE_CODE_REMOTE: Set automatically by the platform (no configuration needed)
  • GH_TOKEN: Set a GitHub fine-grained Personal Access Token to enable gh CLI operations. Required repository permissions:
    • Contents: Read and write
    • Pull requests: Read and write
    • Issues: Read and write
    • Actions: Read-only (for gh pr checks, gh run view)
    • Metadata: Read-only (granted automatically)

About

Personal configuration files for macOS and Linux, managed as symlinks for portability across machines.

Topics

Resources

Stars

25 stars

Watchers

2 watching

Forks

Used by

Contributors

Languages