Skip to content

Latest commit

 

History

History
273 lines (231 loc) · 11.7 KB

File metadata and controls

273 lines (231 loc) · 11.7 KB

Mark's dotfiles

Branches

This repo keeps a long-lived branch per machine/employer context — xometry, wayfair, koho, hunt-club — instead of a single trunk. main is not the working branch.

origin/HEAD still points at main, so a fresh git clone checks out the wrong branch. After cloning, switch to the branch for the current context (git checkout xometry).

main is a separate line that also receives commits, so it is not simply stale — it and the context branch diverge in both directions. Never assume one contains the other.

Context branches carry configuration that belongs to that context only; main carries configuration shared by every context.

Deciding where a change goes

When working on a non-main branch, ask before committing whether the change is global or branch-specific:

  • Global — commit it to main first, then rebase the context branch onto main so it picks the change up.
  • Branch-specific — commit it directly to the context branch.

If it isn't obvious which one applies, ask rather than guessing.

Rebasing

Keep every context branch regularly rebased on main, and always rebase before committing new work so the branch isn't built on a stale base:

git fetch origin
git rebase origin/main

Commit and push to the context branch, not main:

git push            # resolves via the tracked upstream — preferred
git push origin xometry
git status -sb      # shows the upstream if you're unsure

A rebased branch needs a force push: git push --force-with-lease.

The same scheme applies to dotfiles-local.

Installation

I use dotbot for managing my dot files now.

Check out the install.conf.yaml for my current configuration.

Manual setup steps

  • mkdir ~/projects

  • cd ~/projects

  • Create GitHub SSH key

  • git clone git@github.com:mjfaga/dotfiles.git

  • Run dotfiles configuration

  • git clone git@github.com:mjfaga/dotfiles-local.git

  • Run dotfiles-local configuration

  • Work through the per-component setup for manual steps that ./install can't do (secrets, keychain entries, loading scheduled services):

  • Reload terminal

  • sh apps.sh

  • sh macos.sh

  • Install VIM pluggins via :PlugInstall

  • Install asdf plugins

    asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git
    asdf plugin add ruby https://github.com/asdf-vm/asdf-ruby.git
    asdf plugin add java https://github.com/halcyon/asdf-java.git
    asdf plugin add python https://github.com/asdf-community/asdf-python.git
    asdf plugin add yarn https://github.com/twuni/asdf-yarn
    asdf plugin add rust https://github.com/asdf-community/asdf-rust.git
    • Install asdf versions based on ~/.tool-versions
  • Run fzf key bindings install: $(brew --prefix)/opt/fzf/install (Note: Don't update shell configurations)

  • Configure Clean Shot

    • Navigate to System Settings -> Keyboard -> Keyboard shortcuts and uncheck all options
    • Open Preferences
      • General
        • Check Start at Login
        • Export Location -> ~/Downloads/Screenshots
        • After Capture
          • Check Screenshot + Recording options for 'Copy file to Clipboard'
        • Wallpaper
          • Plain color (use default color)
        • Quick Access
          • Enable Auto Close
        • Screenshots
          • Check Freeze Screen when taking a screenshot
  • Configure CocConfig

    • :CocInstall coc-html
    • :CocInstall coc-tsserver
    • :CocInstall coc-json
    • :CocInstall coc-markdownlint
    • :CocInstall coc-prettier
    • :CocInstall coc-eslint
    • gem install solargraph, then :CocInstall coc-solargraph
    • npm install -g bash-language-server (required for Bash LSP support in VIM)
  • Run xcode-select --install

  • Install Anthropic Claude Code

    • npm install -g @anthropic-ai/claude-code
    • rtk init -g to wire rtk hooks for Claude Code (rtk installed via Brewfile), then restart Claude
    • Run claude and login/set up API token
    • See dotfiles-local for MCP server and config setup
  • Install OpenAI Codex CLI

    • npm install -g @openai/codex
    • rtk init -g --codex to wire rtk hooks for Codex, then restart Codex
    • codex login
    • Re-run dotfiles-local install to wire ~/.codex/config.toml and ~/.codex/rules/default.rules
  • Install the pi coding agent

    • npm install -g --ignore-scripts @earendil-works/pi-coding-agent (also covered by sh apps.sh, and listed in dotfiles-local/default-npm-packages so asdf installs it into every new Node version). Requires Node >= 22.19.0.
    • A global npm install lives under a single asdf Node version, so a pi() wrapper in dotfiles-local/shell/aliases.local pins invocations to the Node version in the global ~/.tool-versions. Without it, pi vanishes inside any project whose .tool-versions selects a different Node. After changing your global Node version, reinstall pi.
    • Run pi, then /login to authenticate
    • /mcp to confirm the Mermaid server loaded. pi/mcp.json is linked to ~/.config/mcp/mcp.json by dotbot, and pi auto-installs the pi-mcp-adapter package declared in pi/agent/settings.json on first start. Mermaid's validation and rendering tools work unauthenticated — keep any Mermaid Chart token out of this public repo.
    • Global defaults (provider, model, thinking level, enabled models, subagent overrides) live in pi/agent/settings.json; shortcuts in pi/agent/keybindings.json
    • See dotfiles-local for private pi prompts, skills, agents, and shell-init.bash (which shellCommandPrefix sources so pi's bash tool calls get shared aliases/functions)
  • Log into Github CLI

    • gh auth login
  • Install AgentSessions

  • Raycast [ ] System Preferences -> Keyboard -> Shortcuts -> Spotlight and disable the keyboard shortcut.

    • Configure Cmd + Space as Raycast trigger
    • Mark all setup tasks completed
    • Enable Cloud Sync
  • Arc Browser

    • Sign into account + enable sidebar sync
    • General
      • Check "Automatically update my Arc"
    • Profiles
      • Passwords
        • Settings
          • Disable "Offer to save passwords and passkeys"
    • Max
      • Enable All
    • Advanced
      • Enable "Restore windows from previous session"
      • Enable "Show full URL when Toolbar is enabled"
    • Chrome Extensions
  • Sign into google accounts to enable contact sync

  • Open Photos to sync to iCloud

  • MacOS App Store

    • Xcode
    • OneDrive
    • Remarkable
  • Sign into 1Password

    • Turn on the SSH agent for github key signing

    • Put signing key into .gitconfig.secret:

      [user]
        signingkey = <value here>
    • Create a gem/credential file in this repo:

      ---
      :rubygems_api_key: <get from 1Password>
      :github: Bearer <get from 1Password>
    • Create a bundle/config file in this repo:

      ---
      BUNDLE_HTTPS://RUBYGEMS__PKG__GITHUB__COM/HUNTCLUB/: "mjfaga:<get from 1Password>"
      BUNDLE_GEMS__GRAPHQL__PRO: "<get from 1Password">
  • Install 1Password CLI

  • Slack -> Sign into all active accounts

  • Notion -> Sign into all active accounts

  • Zed

    • Configure Github Language service access token in projects
  • Dropbox

    • Disable Preferences -> Import -> Enable camera uploads
  • Iterm

    • General ->
      • Window ->
        • Uncheck "Adjust window when changing font size"
    • Appearance ->
      • General ->
        • Theme = Minimal
      • Tabs ->
        • Check "Preserve window size when tab bar shows or hides"
    • Profiles ->
      • Keys -> Left Option Key = Esc+
      • Terminal -> Check "Unlimited scrollback"
      • General -> Working Directory -> Select "Reuse previous session's directory"
      • Text -> Non-ASCII Font -> Hack Nerd Font Mono, "Regular", size 13
  • Display - turn on schedule for nightshift -> sunset to sunrise

  • System Preferences -> Displays -> set up arrangement and menu bar

  • Install Office 365

  • Install Disk Inventory X

  • Install Postgres App

  • Run kubectl completion bash > /usr/local/etc/bash_completion.d/kubectl if kubernetes is installed

  • Create finder "open in" shortcuts:

    • Open the Automator built-in macOS app. Pick "Application".

    • Search for “Run Shell Script” in the list of actions, and paste these 2 lines:

      finderPath=`osascript -e 'tell application "Finder" to get the POSIX path of (target of front window as alias)'`
      open -n -b "com.microsoft.VSCode" --args "$finderPath"
    • Save that to the Applications folder, for example as "VS Code icon in Finder"

    • Open Get Info for both VS Code and this new app, drag the VS Code icon

    • Keep the cmd pressed and drag to the Finder toolbar. Done.

    • Repeat for vim script, but with "Run Apple Script":

      tell application "Finder"
          if exists Finder window 1 then
              set currentDir to target of Finder window 1 as alias
          else
              set currentDir to desktop as alias
          end if
      
          set filePath to the POSIX path of currentDir
      end tell
      
      tell application "iTerm"
          set newWindow to (create window with default profile)
      
          tell current session of newWindow
              write text "cd " & filePath
              write text "vim ."
          end tell
      end tell
      
    • Open Get Info for this new app and drag the vim-icon.svg from this repo.

    • Keep the cmd pressed and drag to the Finder toolbar. Done.

  • For any rails + heroku repos, configure parity

Feedback

Suggestions/improvements welcome!