My macOS and Ubuntu (agentbox) development setup, managed with GNU Stow.
Each folder under stow/ is a package that mirrors $HOME, so stow/nvim/.config/nvim/init.lua links to ~/.config/nvim/init.lua.
| Guide | What it covers |
|---|---|
| docs/macos-preferences.md | Personal macOS settings and Mac App Store utilities to restore on a new Mac. |
| docs/rex.md | Rex keybindings, app settings, agentbox remote server, agentbox-auth, iOS setup, and beta gaps. |
| docs/agents.md | Codex, Council, Claude Code, Antigravity, shared rules and skills, and guardrails. |
| docs/skills.md | Generated catalog of shared agent skills and ownership. |
| mcp/README.md | Shared MCP servers including official X search, Codex-owned Jev, harness sync, Claude Code import, and API keys. |
| GLOSSARY.md | Glossary for the configuration lifecycle (tracked source, live configuration, apply, capture) and agent terms. |
| AGENTS.md | Repository guide and validation checks for coding agents working in this repo. |
| Layer | Choice | Notes |
|---|---|---|
| Terminal + multiplexer | Rex (beta) | Default on macOS and iOS (Ghostty fallback on Mac) |
| Editor / IDE | Neovim, Cursor | lazy.nvim + Lua plugins in stow/nvim/.config/nvim/, Cursor user config in stow/cursor/, retired Zed archived under old/ |
| Shell | Fish + FZF + Atuin + zoxide | Interactive Bash login starts Fish; Bash still runs scripts and agent commands |
| Primary agent harness | Codex | Owns global rules and guardrail hooks in stow/codex/.codex/ and shared skills in stow/codex/skills/shared/ |
| Council reviewers | Codex CLI, Claude Code, Antigravity CLI | Codex runs each model through its own command-line tool |
Rex, Neovim, Codex, Claude Code, Antigravity CLI, Grok Build, and Ghostty use Tokyo Night colors.
Antigravity CLI inherits the Rex palette with its Terminal color scheme.
The terminal font is MonoLisaCode 14 pt where the app allows it.
Rex is the exception because its theme and font live in app settings rather than init.lua (see docs/rex.md).
- Install Rex from its DMG first (it self-updates outside Homebrew) so bootstrap can run
rex skill setup --agent codex --agent claude --session-namingautomatically. - Clone to
~/code/personal/dotfiles(use the HTTPS URL on a fresh Mac before GitHub SSH keys are set up, or[email protected]:manifoldfrs/dotfiles.gitonce SSH is configured) and run bootstrap:
git clone https://github.com/manifoldfrs/dotfiles.git ~/code/personal/dotfiles
cd ~/code/personal/dotfiles
./scripts/bootstrap.shWhat bootstrap.sh does:
- Installs Homebrew,
Brewfilepackages/casks (includingpnpm), global npm packages, theanti-slopruntime, and Plannotator. - Installs Claude Code with its native installer.
- Backs up conflicting live files (
.backup.YYYYMMDDhhmmss) and applies all Stow packages. - Registers Claude Code's MCP servers, installs the Herdr annotation plugin used by Rex, restores Neovim plugins from
lazy-lock.json, and runsrex skill setup --agent codex --agent claude --session-namingwhen Rex is present.
Remaining one-time steps on a new Mac:
- Quit Rex and run
./scripts/rex_prefs.sh loadto restore tracked app settings (see docs/rex.md); if you installed Rex after runningbootstrap.sh, then reopen Rex in a Bash login pane and runrex skill setup --agent codex --agent claude --session-naming. - Put machine-local API keys in
~/.config/bash/local.bash(never tracked) so the next login shell loads them:
export REF_API_KEY="..."
export EXA_API_KEY="..."
export TYPESAFE_API_KEY="..."- Open a new Bash login pane, sign in to Codex, Claude Code, and Antigravity, and review the Codex hooks with
/hooks. - Restore personal system preferences from the macOS preferences checklist.
Do not run the macOS scripts/bootstrap.sh on agentbox.
Instead, install Stow's prerequisites as root, then clone and apply as frshbb:
- As
root, ensure the preflight tools are installed (apt update && apt install -y git stow jq ripgrep); if you will install Linuxbrew in Phase 5, also complete the build prerequisites and/home/linuxbrewprefix setup in Phase 2. - As
frshbb, clone to~/code/personal/dotfiles(keep this exact path soCLAUDE_CODE_PLUGIN_DIRSand the rootrex_server_setup.shcommands indocs/rex.mdresolve) and apply with Stow:
git clone https://github.com/manifoldfrs/dotfiles.git ~/code/personal/dotfiles
cd ~/code/personal/dotfiles
./scripts/stow.sh dry-run # previews raw Stow conflicts; apply auto-backs up default ~/.bashrc and managed harness files
./scripts/stow.sh applydry-run runs plain stow -n, so it may flag files like Ubuntu's default ~/.bashrc that apply backs up automatically.
- Create machine-local
~/.config/bash/local.bashwith your API keys (same exports as macOS), then open a new login shell (exec bash --login).
How scripts/stow.sh adapts automatically on Linux:
- Keeps Codex's config machine-local, the same as on macOS.
On first setup,
applyseeds a missing~/.codex/config.tomlwith GPT-6.2 Sol at medium reasoning. It converts legacy Stow links to local copies and still linksAGENTS.md, skills, hooks, and themes. - Creates
~/.local/bin/bashpointing to/bin/bash(instead of Homebrew Bash 4+ on macOS) for scripts that use the local Bash link.
After applying dotfiles as frshbb, follow docs/plans/remote-agent-server.md (Phases 5–8; skip Phase 6's clone and Stow steps, which you just did) for Linuxbrew, the server toolchain, and harness installs (run brew install fish as frshbb after Phase 5 if desired), and see docs/rex.md for the root Rex login server setup and agentbox-auth sign-in flow.
Standalone ./scripts/stow.sh apply requires stow and jq.
On macOS, Homebrew bash (brew install bash) is also needed so ~/.local/bin/bash links to Bash 4+ for agent and shell scripts (otherwise apply warns and skips the link).
cd ~/code/personal/dotfiles
git pull
./scripts/stow.sh dry-run # preview changes (also the default with no argument)
./scripts/stow.sh apply # validates in an isolated temporary home first, then restows into $HOMEapply runs scripts/validate-dotfiles.sh against a temporary home before touching $HOME; if validation fails, nothing changes.
It also moves known conflicting files (Bash, Codex, Claude Code, Cursor, and shared skill folders) aside as .backup.YYYYMMDDhhmmss and restores them if Stow fails.
dry-run runs plain stow -n without those backups, so it may flag auto-backed-up files alongside unexpected conflicts; only conflicts outside the auto-backup list need manual moves (see Troubleshooting).
Use ./scripts/stow.sh delete to remove managed symlinks, and ./scripts/bootstrap.sh only on macOS when you want packages, plugins, and tooling refreshed.
The default STOW_PACKAGES list in scripts/stow.sh is bash git ghostty rex nvim bin antigravity claude codex cursor.
To restow a single simple leaf package (nvim, git, ghostty, or rex) by hand:
stow --no-folding -R -v -t "$HOME" -d stow nvimUse ./scripts/stow.sh apply for codex and bash so local Codex config setup, shared skills, and ~/.local/bin/bash are handled.
Because Stow uses symlinks, editing either $HOME or the repo edits the same file.
To capture live config back into tracked sources, run ./scripts/backup.sh and review git diff before committing (agent account and runtime state are skipped).
stow/ Stow packages, each mirroring $HOME
bash/ Bash and Fish startup, Readline (.inputrc), Atuin, functions, aliases
git/ .gitconfig and global gitignore
rex/ Rex init.lua and required Lua modules
ghostty/ Fallback terminal config
nvim/ Neovim config (see stow/nvim/AGENTS.md)
bin/ ~/.local/bin helpers (anti-slop, artifact-review, rex-annotate, agentbox-auth, spotify-visualizer)
codex/ Primary harness config, theme, global AGENTS.md, hooks, and shared skills
claude/ Standalone Claude Code settings and mods; links rules and hooks to codex/
antigravity/ Antigravity global-rules plugin, PreToolUse guardrails, and Jev Stop hook; links rules and scripts to codex/
cursor/ Cursor settings, keybindings, tasks (Library/Application Support/Cursor/User)
cursor/extensions.txt Cursor extension IDs; install with the app's bundled CLI
scripts/
bootstrap.sh Full machine setup
stow.sh apply / dry-run / delete with isolated preflight
validate-dotfiles.sh Isolated validation without live changes
backup.sh Capture live config into tracked sources
update_agent_skills.sh Check or sync the shared skill catalog
skill_catalog.sh Generate docs/skills.md
distribute_agent_skills.sh Export shared skills and install them for Work or Cloud
harness_sync.sh Generate Codex MCP registrations and the Claude Jev mod copy
rex_server_setup.sh Root-only Rex login server setup for agentbox
rex_prefs.sh Save, load, or watch Rex app settings
rex/ Tracked Rex app settings (not stowed)
server/rex/ Files installed under /etc on agentbox (not stowed)
mcp/ MCP setup guide (see mcp/README.md)
test/ Shell and TypeScript tests, Docker harness
docs/ Deep-dive guides (rex.md, agents.md, skills.md), plans, and research notes
old/ Archived Fish, Zsh, tmux, Karabiner, Zed, and older Cursor config
Brewfile Homebrew packages and casks
npm-global-packages.txt Global npm packages (@openai/codex, vercel, tree-sitter-cli, agent-browser)
Rex (stow/rex/.config/rex/init.lua) uses Ctrl-a as its prefix (Ctrl-a Ctrl-a sends a literal Ctrl-a) and hands off Ctrl-h/j/k/l seamlessly with Neovim via vim-rex-navigator.
After applying Stow, verify the config with rex config reload && rex keymap.
Daily remote sessions on agentbox:
rexbox # list sessions on agentbox
rexbox opto2 code/optoai/opto2 # open or create opto2 in ~/code/optoai/opto2
rex -S agentbox kill opto2 # end a sessionSee docs/rex.md for the full keymap table, rex_prefs.sh app settings, agentbox server setup, agentbox-auth sign-ins, iOS setup, troubleshooting, and known beta gaps.
Neovim (>= 0.11) uses one plugin spec per file under stow/nvim/.config/nvim/lua/plugins/, pinned in lazy-lock.json, with per-language indentation in ftplugin/*.lua.
Core plugins: snacks.nvim (picker, explorer, dashboard, lazygit), fff (Cmd-P file finder), blink.cmp, mason + lspconfig, treesitter, flash.nvim, gitsigns, diffview, and nvim-spectre.
See stow/nvim/AGENTS.md for editing conventions.
Leader is Space (press Space and wait for which-key).
Common keymaps:
| Keys | Action |
|---|---|
<C-p>, <leader>sf |
Find files (includes hidden and gitignored files) |
<leader>sg |
Grep across project |
<C-n>, <leader>e |
File explorer |
<C-h/j/k/l> |
Move between splits, then Rex/Herdr panes at the edge |
gd, gr, gI, gy |
Definition, references, implementation, type definition |
K, <leader>rn, <leader>ca |
Hover, rename, code action |
gl, [d, ]d |
Diagnostics float, previous, next |
<leader>gg, <leader>gD |
Lazygit, Diffview |
]h, [h |
Next, previous git hunk |
<leader>tt, <leader>tf, <leader>ts |
Test nearest, file, suite |
<leader>a (visual) |
Annotate selection (Rex/Herdr) |
<leader>uC |
Toggle secret masking for .env-style files (display only) |
In Rex, Neovim also supports Cursor-style Cmd keys: Cmd-P find files, Cmd-Shift-F search in files, Cmd-B explorer, Cmd-Shift-O symbols, Cmd-S save, Cmd-/ comment.
- LSPs: Mason installs
lua_ls,ts_ls,gopls,clangd, andty(Python). Install Ruby LSP outside Mason so it uses the project Ruby:gem install ruby-lsp --bindir "$HOME/.local/bin" --no-document. - TypeScript extras:
:TSCpopulates quickfix,ts-error-translatorclarifies diagnostics, and:TwoslashQueriesEnableshows inline types. - Markdown preview: run
:MarkdownPreviewin a Markdown buffer to open a live preview in your browser. Run:MarkdownPreviewStopto close it. - Debugging: no in-editor debugger; use tests and logs first, then
dlv(Go) ordebugpy(Python) in a terminal pane. - Plugin safety check: run
bash test/nvim_plugin_safety.sh --base-ref HEADbefore changing plugins; it checks startup in an isolated profile without touching live config orlazy-lock.json.
The cursor Stow package links settings.json, keybindings.json, and tasks.json into ~/Library/Application Support/Cursor/User/, so UI edits show up in git diff.
Extensions live outside the package in cursor/extensions.txt so Stow does not link that file into $HOME; install them with Cursor's bundled CLI:
CURSOR_BIN="/Applications/Cursor.app/Contents/Resources/app/bin/cursor"
while IFS= read -r ext; do "$CURSOR_BIN" --install-extension "$ext"; done < cursor/extensions.txt
./scripts/stow.sh applyAn interactive Bash login loads the shared PATH and ~/.config/bash/local.bash, then launches Fish for completions and suggestions without changing the system login shell.
Scripts and agent shell commands still use Bash; stay in Bash for a pane with DOTFILES_KEEP_BASH=1 bash --login (or run bash from Fish).
- Prompt: Tokyo Night colors, short path, Git branch or detached commit, clock, and non-zero exit code only (no username or hostname).
- Navigation & history:
Ctrl-Topens FZF file search,Ctrl-RandCtrl-Fsearch Atuin history in FZF (Ctrl-Dfilters to the current directory), Up Arrow uses native Fish history, andzuses zoxide. - Wrappers:
clauderesumes sessions through its Bash wrapper,agypasses--dangerously-skip-permissionsfor interactive sessions (unless a subcommand,--mode, or--sandboxis given), andrexboxcalls the shared Bash function. - Local overrides: put environment variables in untracked
~/.config/bash/local.bashand Fish-specific tweaks in~/.config/fish/conf.d/. On an existing Mac oragentboxwithout Fish, runbrew install fish, restow, and open a new login pane.
Codex is the primary harness and runs Council reviews through Codex CLI, Claude Code, and Antigravity CLI.
See Codex terminal shortcuts for the reasoning and transcript key bindings.
Codex hosts pstack directly through the Open Pstack plugin (docs/agents.md).
The pstack PR watcher launcher keeps its dependencies outside the plugin directory.
It pairs GPT-6.2 Sol Medium and Opus 5.5 High for Arena candidate work, Architect, and Interrogate with read-only Gemini 4 Neon High through Antigravity CLI.
Pstack also uses Gemini 4 Neon High for its judgment and prose role in multi-phase planning.
Use $bro-neon for a paste-ready Antigravity prompt when you want Neon to rewrite a reply.
The tracked macOS Codex config disables routine command approvals and the filesystem sandbox while keeping guardrail hooks enabled.
Codex and Claude Code share the global AGENTS.md, shell guardrails, skill catalog, and MCP definitions.
Grok Build uses the shared rules and guardrails, and discovers the shared skills, Pstack, and MCP registrations.
Its hook configuration is installed as a regular file so the read-only sandbox can start.
Antigravity runs Neon through its own CLI.
To resume a Codex session from the terminal:
| Command | Behavior |
|---|---|
codex resume --last |
Resume the most recent interactive session for the current directory. |
codex resume --last --all |
Resume the most recent interactive session across directories. |
codex resume |
Open the session picker for the current directory. |
Common cross-harness commands:
codex -a on-request -s workspace-write # restore Codex approval prompts and workspace sandbox
./scripts/update_agent_skills.sh --check # check shared skills for upstream drift
./scripts/skill_catalog.sh # regenerate docs/skills.md
./scripts/harness_sync.sh # sync Codex MCP registrations and the Claude Jev modSee docs/agents.md for Council setup, Gemini 4 Neon, pstack, PR drafting, extensions/mods, guardrails, and Plannotator.
See Excalidraw in Codex for editable diagrams on a local canvas.
From the dotfiles checkout, export the full shared catalog from a pinned Git commit.
DOTFILES_COMMIT="$(git rev-parse HEAD)"
./scripts/distribute_agent_skills.sh export ./dotfiles-shared-skills.tar.gz "$DOTFILES_COMMIT"On your Mac, register the plugin for installation or refresh in Plugins → Personal.
./scripts/distribute_agent_skills.sh install-work ./dotfiles-shared-skills.tar.gzIn the cloud environment setup session, run the installer as the task user.
bash ./scripts/distribute_agent_skills.sh install-cloud ./dotfiles-shared-skills.tar.gzSee the installation, publishing, and runtime instructions.
artifact-review: opens an HTML plan, design comparison, walkthrough, or document for anchored comments that return to Codex. Codex cleans up the temporary workspace when the session ends after queued feedback is handled. See HTML artifact reviews.anti-slop: runs a vendored Oxlint rule set (seestow/bin/.local/share/anti-slop/UPSTREAM.md) against any JS/TS project without per-project setup (anti-slop .,anti-slop --effect .,anti-slop --fix .). Validate withbash test/global_anti_slop_test.sh.rex-annotate: backs Rex'sCtrl-a a/A/mannotation keys using Herdr'sherdr-annotate.spotify-visualizer: terminal dot-matrix visualizer for the current Spotify track. Requires a Spotify developer app with redirect URIhttp://127.0.0.1:8974/callbackandSPOTIFY_CLIENT_IDexported (tokens cache in~/.cache/dotfiles/spotify-visualizer/). Keys:Spaceplay/pause,n/pnext/previous,sshuffle,rrepeat,qquit.
- Ghostty (
stow/ghostty/): fallback terminal (source of Rex's imported theme).Shift-Cmd-clickopens links even when an app captures the mouse.
./scripts/validate-dotfiles.sh # full isolated preflight, no live changes
for f in scripts/*.sh stow/bash/.bashrc; do bash -n "$f"; done # shell syntax spot check
bash test/run_tests.sh # shell test suite
bash test/nvim_plugin_safety.sh --base-ref HEAD # isolated Neovim plugin check
docker build -t dotfiles-test -f test/Dockerfile . && docker run --rm dotfiles-testFor Neovim startup changes, use the isolated startup check in CI. It checks the theme and fails the run on startup errors. See AGENTS.md for validation requirements.
- Stow reports conflicts:
./scripts/stow.sh applyauto-backs up known managed targets, while unexpected conflicts (such as~/.config/nvim,~/.gitconfig,~/.gitignore_global,~/.config/ghostty/config,~/.config/rex/*, or a regular file or directory at~/.local/bin/bash) must be moved aside manually. Use./scripts/stow.sh dry-runto inspect Stow file conflicts (conflicts on targetsapplybacks up automatically can be disregarded) and the./scripts/stow.sh applyerror for wrapper-only checks such as~/.local/bin/bash. Check a file (not an ordinary parent directory, because--no-foldingcreates real directories) with e.g.readlink ~/.config/nvim/init.lua, move aside only the exact conflicting path named in the error (including an unmanaged symlink itself rather than its target) with.backup.$(date +%Y%m%d%H%M%S), and re-run./scripts/stow.sh apply. - Edits to
~/.config/...do not appear ingit diff: runreadlinkon the specific file (for example,readlink ~/.config/nvim/init.lua); if it does not point into this repo, re-run./scripts/stow.sh apply. - Neovim LSP or treesitter errors: verify Neovim >= 0.11 and
tree-sitter-cli>= 0.26.1, then run:Mason,:LspInfo, and:checkhealth nvim-treesitter. - Markdown crashes Neovim with
CODESIGNING Invalid Page: stale parsers in~/.local/share/nvim/site/parser(evenmarkdown.so.disabled) get loaded and killed by macOS; move them out and retry. - Prompt looks plain after an update: on macOS, run
brew bundle --file=Brewfile,./scripts/stow.sh apply, andexec bash --login(on Ubuntu/agentbox, install or update the Linuxbrew tool subset from Phase 5 instead of running the macOSBrewfile).