Skip to content

Repository files navigation

dotfiles

Personal environment for two kinds of machines: a macOS laptop (where the kitty terminal runs) and Linux x86_64 dev servers reached over SSH. Work on the server happens inside herdr panes: coding agents write the code, and the tools below are for reading it and reviewing their changes.

Reproducing the environment

git clone git@github.com:resure/dotfiles.git ~/code/dotfiles
~/code/dotfiles/install.sh

install.sh is safe to run repeatedly. It:

  1. symlinks the configs listed below into $HOME; anything already present and not pointing into this repo is reported as SKIPPED and left alone, so resolve those by hand; on Linux it also wires the shell startup into ~/.bashrc (see below);
  2. runs install-cli-tools.sh: on macOS brew bundle with the Brewfile (CLI tools, casks and fonts of the laptop), on Linux x86_64 the review tools (nvim, lazygit, delta, tuicr, ripgrep, fd, fzf, tree-sitter) as pinned release binaries into ~/.local/bin (no root needed);
  3. restores nvim plugins to the commits pinned in nvim/lazy-lock.json and waits for the treesitter parsers and Mason tools (stylua, shfmt) LazyVim installs on first start. Language servers (vtsls for TypeScript needs node) are installed by Mason on first use.

Shell startup is the one place install.sh adds to a file it does not own. On macOS zshrc is just linked as ~/.zshrc and puts Homebrew and ~/.local/bin on PATH before sourcing ~/.aliases, ~/.functions and, if present, ~/.localrc (machine-local: tokens, work aliases, version managers). On Linux the stock ~/.bashrc stays where it is and a marked block is appended to it, creating the file if missing, doing the same wiring: ~/.local/bin on PATH, then ~/.aliases, ~/.functions and ~/.localrc. Each run rewrites only the lines between # >>> dotfiles >>> and # <<< dotfiles <<<, so keep your own edits to ~/.bashrc outside the markers.

Not automated:

  • herdr itself and its plugins are installed separately; only its config.toml lives here.
  • macos.sh (Finder and keyboard defaults) is run by hand if wanted.
  • gitconfig carries a personal name and email.
  • GitHub CLI login. gitconfig uses gh auth git-credential for HTTPS remotes on github.com, and agents open pull requests through gh, so run gh auth login once per machine. gh itself comes from the Brewfile on macOS and from the distro on Linux (below).
  • Secrets. dsc needs DEEPSEEK_API_KEY exported in ~/.localrc.

Linux prerequisites

install-cli-tools.sh only fetches the review tools; the base packages come from the distro and need root once. Arch:

sudo pacman -S --needed git curl tar gzip base-devel unzip nodejs npm github-cli

Ubuntu:

sudo apt install git curl tar gzip build-essential unzip nodejs npm gh

Ubuntu's own gh is old; the current one comes from the cli.github.com apt repository.

base-devel / build-essential give the C compiler nvim-treesitter compiles parsers with; node is for the TypeScript language server Mason installs. herdr is installed by its own installer from herdr.dev.

What is here

Path Linked to Purpose
gitconfig, gitignore_global ~/.gitconfig, ~/.gitignore_global git aliases, delta as pager, nvim as editor
aliases, functions ~/.aliases, ~/.functions shell aliases and helpers, shared by bash and zsh
zshrc ~/.zshrc (macOS) zsh options, prompt, history, PATH
Brewfile not linked Homebrew formulae and casks for the laptop; edit it and rerun install.sh
nvim/ ~/.config/nvim LazyVim with TypeScript and JSON extras
lazygit/ ~/.config/lazygit (Linux), ~/Library/Application Support/lazygit (macOS) lazygit with delta as its diff pager
herdr/config.toml ~/.config/herdr/config.toml herdr theme, prefix key, UI
kitty/ ~/.config/kitty (macOS) kitty config with light and dark themes that follow the system
osx/Library/KeyBindings/ ~/Library/KeyBindings/ (macOS) same text shortcuts across input sources

Daily workflow

  • nvim: browse the project (<space>e tree, <space><space> files, <space>sg grep, <space>gg lazygit). Pressing <space> and waiting shows every binding.
  • review (uncommitted changes) or review master..HEAD (a branch), a wrapper over tuicr: review an agent's diff like a pull request. c comments a line, v selects a range first, C comments the file, y copies the whole review as markdown to paste to the agent, ? lists keys.
  • lazygit: stage hunks, commit, discard.
  • dsc: Claude Code pointed at the DeepSeek API; takes the same arguments as claude and leaves the calling shell's environment untouched.
  • git diff, git show, git log -p render through delta; n/N jump between files.

Updating tools

On Linux bump the version variables at the top of install-cli-tools.sh and rerun it; tools already at the pinned version are skipped. On macOS brew upgrade; to add a package put it in Brewfile. For nvim plugins run :Lazy update and commit the changed nvim/lazy-lock.json. When a machine already has an older LazyVim installed, the first install.sh run may rewrite nvim/lazy-lock.json with the old plugin set; git checkout nvim/lazy-lock.json and rerun.

About

My dotfiles (mostly for JS & RoR)

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages