Skip to content

Latest commit

 

History

History
66 lines (53 loc) · 4.2 KB

File metadata and controls

66 lines (53 loc) · 4.2 KB

CLAUDE.md

Guidance for Claude Code (claude.ai/code) when working in this repository.

Overview

Riley Oest's cross-platform dotfiles (macOS + Linux/WSL + RHEL). Bash-based. Paired with nvim for the editor side of the workflow.

Setup Workflow

git clone https://github.com/roest1/dotfiles.git ~/dotfiles
cd ~/dotfiles
make all        # deps → install → check

Individual targets: make deps, make install, make shell, make check, make update. All idempotent.

install.sh is the core symlinking engine — the Makefile wraps it. Both are needed; neither is a pure superset of the other.

Architecture

bash/
  bashrc                    Main entrypoint (~/.bashrc). OS detection, history,
                            shell options, PATH (dotnet, java, conda, nvm, homebrew),
                            package managers, sources custom configs.
  bash_roest_theme          Prompt (PS1 + right-aligned PROMPT_COMMAND), LS_COLORS,
                            conda env display, git branch/dirty/sync indicators,
                            GitHub Actions status in prompt (background-cached).
  bash_roest_productivity   CLI tools: aliases (git, ls/cat/bat/eza), zoxide, fzf,
                            utility functions (mkcd, up, f, findword, lines, port,
                            serve, loop, extract, ddiff, c, etc.), .NET aliases
                            (dclean, dbuild, dtest), help system (`h`).
  bash_roest_git            GitHub Actions commands: gha, gha-fail, gha-open, gha-ui
                            (interactive workflow picker with smart log view;
                            scope: HEAD or recent runs).
  bash_roest_github         Unified hub (gh-ui) + interactive GitHub management via fzf:
                            gpr (PR management with filters), ghsecrets, ghbranch, ghenv.
  (bash_profile)            Login-shell shim — generated by install.sh if missing,
                            just sources .bashrc. Not tracked.
git/
  gitconfig                 Global git config (user, credential, lfs)
  README.md                 GitHub tips and tricks reference
  GITHUB_TOOLS.md           Interactive tools walkthrough + demo recording guide
install.sh                  Symlinks all dotfiles into ~. Backs up existing files.
                            Generates bash_profile shim if missing. Safe to re-run.
Makefile                    Orchestrator: deps (brew/dnf), install, shell, check, update.
README.md                   Setup instructions + file reference

Key Conventions

  • OS portability: _OS=mac|linux detected in bashrc. Mac/Linux differences (homebrew paths, date flags, stat flags) are handled inline with conditionals.
  • Bash version: macOS ships bash 3.2. make deps installs bash 5 via homebrew. Bash 4+ features (dirspell, globstar) are guarded with BASH_VERSINFO checks.
  • Tool dependencies: zoxide, fzf, bat, eza, fd, ripgrep, gh, jq. All optional — features degrade gracefully via command -v guards. make deps installs via brew (macOS/WSL) or dnf+EPEL (RHEL). Some tools have alternate binary names on RHEL/Debian (batbatcat, fdfdfind) — handled with fallback checks.
  • Symlink pattern: install.sh symlinks bash/* to ~/.* (e.g. bash/bashrc~/.bashrc). Filenames are hard-coded in install.sh — edit it when adding or renaming files.
  • Navigation UX: All interactive fzf commands use consistent keybindings — menus (-/q back), lists (type to filter, esc back), pagers (r refresh, -/q back).
  • Machine-local config: bash_roest_local holds per-machine setup (CUDA, nvim path, RHEL-specific exports) — gitignored, optional-sourced before other custom configs. bash_roest_password_commands is gitignored for secrets.

When Editing

  • Test on both bash 3.2 (macOS /bin/bash) and bash 5+ (homebrew / Linux).
  • Guard all tool usage with command -v checks.
  • Keep the h help function in bash_roest_productivity in sync with any command changes.
  • The README is intentionally concise: install + new-machine flow + GitHub tools pointer + "what goes where" table. Prose explanations of bash internals belong here in CLAUDE.md, not in the README.