Navigate, modify, and manage Luan's dotfiles repository from any directory...
~/dotfiles/workspaces/.codespaces/.persistedshare/dotfiles (GitHub implementation detail, may change)Debugging: Installation output is logged to ~/dotfiles_install.log
The repo follows a one directory per tool pattern. To see the current structure:
tree ~/dotfiles -L 2 -d # or: ls -la ~/dotfiles
Each tool directory should contain:
install script with install() and configure() functionsSee references/tool-template.md for the install script template.
| Tool | Directory | Config Location | Has Install Script |
|---|---|---|---|
| Neovim | nvim/ |
~/.config/nvim |
Yes |
| Tmux | tmux/ |
~/.tmux.conf |
Yes |
| Zsh | zsh/ |
~/.zshrc, ~/.zsh/ |
Yes (install.zsh) |
| Git | git/ |
~/.gitconfig |
Yes |
| Ghostty | ghostty/ |
~/.config/ghostty |
No |
| Helix | helix/ |
~/.config/helix |
Yes |
| Whisper | whisper/ |
N/A | Yes (macOS/Arch only) |
| Skills | skills/ |
~/.claude/skills/, ~/.pi/agent/skills/ |
Yes |
| Rust | rust/ |
N/A | Yes (rustup) |
| Go | go/ |
N/A | Yes (Go tools: gopls, gofumpt, etc.) |
| Node | node/ |
N/A | Yes (fnm + TypeScript tools) |
| Hunk | hunk/ |
~/.config/hunk/config.toml, git aliases (hdiff, hshow) |
Yes |
| gccli | gccli/ |
~/.gccli/ |
Yes (local-only Google Calendar CLI setup) |
| Bin | bin/ |
~/.local/bin |
Yes (custom scripts) |
| jj | jj/ |
~/.jjconfig.toml |
Yes (Jujutsu VCS) |
| gh | gh/ |
~/.local/gh, ~/.local/bin/gh |
Yes (GitHub CLI + extensions) |
| Platform | Detection | Package Manager | Notes |
|---|---|---|---|
| GitHub Codespaces | $CODESPACES set |
apt |
Debian-based, read-only for push (use dot patch) |
| macOS | uname == Darwin |
brew |
Personal machines |
| Arch/Omarchy | command -v pacman |
pacman/yay |
Arch + Hyprland |
| Omarchy | ~/.local/share/omarchy exists |
pacman/yay |
Uses default configs, skip apply() |
See references/platform-detection.md for detection code snippets.
Never create or edit files directly in config target directories like ~/.config/ or ~/.local/bin/. These locations contain symlinks to ~/dotfiles/, so changes made there are either not version controlled or will be overwritten by install scripts.
Always make changes in ~/dotfiles/ so they are:
dot pullCommon mistakes to avoid:
~/.claude/skills/ or ~/.pi/agent/skills/ instead of ~/dotfiles/skills/~/.config/nvim/ instead of ~/dotfiles/nvim/~/.local/bin/ instead of ~/dotfiles/bin/After creating or modifying files in ~/dotfiles/, run the appropriate install script to create symlinks (e.g., dot install skills, dot install nvim).
You cannot push dotfiles changes directly from GitHub Codespaces.
Why:
GITHUB_TOKEN that only has access to the workspace repository (e.g., github/github), not your personal luanzeba/dotfiles repoWorkaround - Use dot patch:
# 1. In Codespace: Create a patch from your changes
dot patch create
# 2. On local machine: Pull and apply the patch
dot patch pull
# 3. On local: Review, commit, and push
cd ~/dotfiles
git diff
git add -A && git commit -m "Fix from Codespace"
git push
# 4. In Codespace: Pull the committed changes
dot pull
This uses gh cs cp to transfer a patch file, authenticating through GitHub's Codespace infrastructure rather than requiring repo-specific credentials.
@latest tags, --lts flags, or omit version specifiers where possible.install(), configure(), and optionally apply() and update() functions.Homebrew is installed lazily in Phase 3 of install-local, only when needed for brew-dependent tools.
| Purpose | Location | Example |
|---|---|---|
| User binaries/scripts | ~/.local/bin/ |
dotfiles, dot |
| Tool extractions | ~/.local/<tool>/ |
~/.local/nvim/, ~/.local/gh/ |
Scripts from bin/ are symlinked individually to ~/.local/bin/.
Scripts should produce the same result whether run once or many times:
Check before installing: Use command -v <tool> to skip if already installed
if command -v rustc &>/dev/null; then
echo "Rust already installed"
return
fi
Use -sf for symlinks: The -f flag overwrites existing symlinks safely
ln -sf "$SCRIPT_DIR/.config" "$HOME/.config/tool"
Handle existing directories: Check and backup if needed
if [[ -e "$target" && ! -L "$target" ]]; then
mv "$target" "$target.backup"
fi
Use --noconfirm for package managers: Avoid interactive prompts
sudo pacman -S --noconfirm package
brew install package # Already non-interactive
The dot command (symlinked to ~/.local/bin/ from bin/dotfiles) provides easy management:
dotfiles status # Show VCS status of dotfiles repo
dotfiles pull # Pull latest and apply changes (skipped on Omarchy)
dotfiles edit # Open dotfiles in $EDITOR
dotfiles update # Update tools (brew, nvim plugins, rustup, etc.)
dotfiles doctor # Check if everything is set up correctly
The CLI uses jj (Jujutsu) if available, falling back to git.
<tool>/ directory at repo root<tool>/install script using the template with:install() - Install the tool binary/packageconfigure() - Symlink configs, set up environmentapply() (optional) - Reload config after dotfiles pull, or handle migrationsupdate() (optional) - Update tool for dotfiles updatecheck_installed() / check_configured() - For dot doctor health checksinstall-local in the appropriate phaseSee references/tool-template.md for the install script template. See references/install-patterns.md for version checking, migrations, and Codespaces patterns.
See references/nvim-config.md for structure details.
Key locations:
nvim/lua/plugins/<name>.luanvim/lua/config/mappings.luanvim/init.lua# Main install (dispatches to platform-specific script)
~/dotfiles/install
# Platform-specific scripts (called by main install)
~/dotfiles/install-codespaces # GitHub Codespaces
~/dotfiles/install-local # macOS and Arch
# Tool-specific installs
~/dotfiles/nvim/install
~/dotfiles/zsh/install.zsh
~/dotfiles/skills/install
~/dotfiles/node/install
~/dotfiles/gccli/install
~/dotfiles/rust/install
~/dotfiles/go/install
~/dotfiles/jj/install
The lib/common.sh file provides shared functions for all scripts:
source "$DOTFILES_DIR/lib/common.sh"
dotfiles_dir # Get dotfiles path (handles Codespaces)
is_codespaces # Check if running in Codespaces
is_macos # Check if running on macOS
is_arch # Check if running on Arch Linux
is_omarchy # Check if running on Omarchy
vcs_cmd # Run jj or git command
log_info/log_success/log_warn/log_error # Logging helpers