Dotfiles, mac setup, apps & backups configs.
Warning: If you want to give these dotfiles a try, you should first fork this repository, review the code, and remove things you don’t want or need. This config uses zsh, oh-my-zsh and tmux, if you don't want to use any of those, check Brew install file.
- Just command runner
- Brew (mac setup)
Check home directory to check everything that is rsynced to ~ directory.
If you want to skip parts of this setup, selectively run install targets and remove unneeded config files before just sync.
Read all scripts before executing them.
- Configure iCloud, SSH, etc.
git clone https://github.com/gabrielkoerich/dotfiles.gitjust setupto setup macosjust install brewto install brew & dependenciesjust install fontsto install fontsjust install caskto install cask appsjust install agentsto install coding agents & base skillsjust install touchidto enable Touch ID forsudo(also inside tmux)just syncto sync the dotfiles to~- Run
just restoreto restore app settings
To sync the dotfiles, run step 9 again.
Note: sync intentionally excludes ~/.ssh so keys and SSH host/user config stay local.
Optional: just install tailnet-ssh starts a key-only sshd on 127.0.0.1:2222 and publishes it to the tailnet with tailscale serve, so a phone on the tailnet can attach to tmux while Remote Login stays off. It runs as a launchd agent with its config, host key and authorized_keys in ~/.config/tailnet-ssh. The Tailscale app accepts the connection, so the macOS firewall needs no rule for sshd.
just sync also works on a Linux/bash machine, where only just and rsync are needed:
-
.path,.exportsand.aliasesguard the macOS-only bits (Homebrew prefix, SDK headers,scutilproxy lookup, BSDls -G) and add Linux equivalents. -
.bash_aliasesis the bash entry point: the distro default~/.bashrcsources it, and it loads.path,.exports,.aliasesand.functionslike.zshrcdoes. -
The private
.binmerge is skipped whenageor the key is missing. -
A server that runs agents does not need these dotfiles.
just tmux-host <host>runsbin/install/tmux-hostthere over ssh: it installs tmux (Homebrew, apt, dnf, pacman or apk), writes~/.tmux/agents-host.confso pane titles reach the Mac, and a hook that titles the shelluser@host: dir. It only adds onesourceline to the server's own.tmux.confand.bashrc, writes every file atomically, and a second run changes nothing. On a server without this repo, fetch it from GitHub.$(…)downloads the whole script before it runs, so a dropped connection never runs half of it, and a commit SHA in place ofmainpins the version you reviewed:bash -c "$(curl -fsSL https://raw.githubusercontent.com/gabrielkoerich/dotfiles/main/bin/install/tmux-host)" -
Everything else (
just setup,install brew|cask|touchid,backup,restore) stays macOS-only.
Encryption commands read the age key from passbox as age/dotfiles. AGE_RECIPIENT sets the recipient and AGE_KEY_FILE uses a plaintext key file instead.
bin/security-audit: repo-wide shell/security audit (--strictfor CI mode).github/workflows/quality.yml: quality + security checks (shell syntax, strict audit, semgrep, tests, gitleaks).pre-commit-config.yaml: local hooks for hygiene + secrets + strict audit.gitleaks.toml: secrets scanning configuration
Recommended local checks:
just security-cijust doctor
crypto-keygen
encrypt-file <in> <out.age>
decrypt-file <in.age> <out>
encrypt-dir <src-dir> <out.tar.age>
decrypt-dir <in.tar.age> <out-dir>Encryption commands read the age key from passbox as age/dotfiles. AGE_RECIPIENT sets the recipient and AGE_KEY_FILE uses a plaintext key file instead.
Goal: reproduce the closest deterministic match from this repository.
just exact-apply: applies Brewfile (with cleanup), fonts, agents, dotfiles sync, and final checks.just exact-check: verifies drift against Brewfile + doctor + strict security audit.
Important limits:
- macOS version/hardware-specific defaults may differ.
- App-internal state and cloud-synced settings may differ.
- External services and credentials are not reproduced automatically.
Mackup backs up the agent configs and skills. ~/.claude/CLAUDE.md is the one instruction file. bin/install/agents links ~/.codex/AGENTS.md and ~/.config/opencode/AGENTS.md to it. Run it after mackup restore, because the restore writes those two files back as copies.
The prefix is Ctrl+A. prefix + h opens a cheat sheet of every key, read live from tmux list-keys -N, so it lists exactly what is bound. Each binding in .tmux.conf carries its note (bind -N "…"), so a new key shows up there once it has one.
| Key | Action |
|---|---|
prefix + h |
This cheat sheet |
prefix + Space |
Go to anywhere: agents, sessions, windows and ssh hosts (tmux-agents) |
prefix + a |
Agents sidebar, open or close |
prefix + | / prefix + _ |
Split side by side / top and bottom, on the server too in an ssh pane |
prefix + t |
File tree, of the server in an ssh pane |
prefix + n |
New window in this folder |
prefix + + |
Zoom the pane in or out |
prefix + x / prefix + w |
Close the pane / the window, asking first |
prefix + r / prefix + R |
Rename the window / the session |
prefix + C-t |
Colour theme menu: Black, Mocha, Ink |
prefix + C-s |
Show or hide the status bar |
prefix + C-r / prefix + C-e |
Reload tmux.conf / edit it, then reload |
Cmd+1 … Cmd+9, prefix + 1 … 5 |
The Nth tab |
Cmd+V |
Paste text, or send Ctrl+V when the clipboard holds an image, the key Claude Code reads images on |
Cmd+T |
A new tab in this folder: a session, or a window with @agents-tabs windows |
Option+1 … Option+9 |
The Nth item in the sidebar |
Shift+← / Shift+→ |
Previous / next window |
Option+arrows |
Move between panes |
Option+V |
Spoken replies on or off |
F12 |
Send keys to a nested tmux, F12 again to come back |
@agents-tabs decides what the tabs on top are. With sessions they are your sessions and the sidebar lists the windows of the current one; with windows it is the other way round. Cmd+N always picks a tab and Option+N a sidebar item, so the keys mean the same in both layouts. Ghostty sends Cmd+N to tmux as ESC [ 900N ~, which needs these lines in ~/.config/ghostty/config, digit_N since Ghostty matches the physical key first:
keybind = cmd+digit_1=text:\x1b[9001~
…
keybind = cmd+digit_9=text:\x1b[9009~
The tmux config now supports durable sessions:
- Manual save:
prefix + S - Manual restore:
prefix + T - Auto-save: every 15 minutes (
tmux-continuum) - Auto-restore on tmux start (
tmux-continuum+tmux-resurrect)
Helper command:
~/.tmux/tmx-> ensures/attaches to a long-livedmainsession~/.tmux/tmx ensure-> createsmainsession if missing, without attaching~/.tmux/tmx restore-> manually restores all saved sessions (rarely needed)switch <session>-> switch to any session (e.g.,switch work)
Optional env overrides:
TMX_SESSION_NAME(default:main)TMX_SESSIONS(default:$TMX_SESSION_NAME) space-separated list of sessions to ensure/restoreTMX_SESSION_ROOT(default:$HOME)
Copyright (c) Gabriel Koerich
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.