Bootstrap a new Mac with the tools, shell setup, Codex setup, Oh My Codex skills, and agent skills used on this laptop.
Install Xcode Command Line Tools first:
xcode-select --installClone this repo and run the bootstrap:
git clone https://github.com/acypert/New-Device-Setup.git
cd New-Device-Setup
./bootstrap.shThe script installs Homebrew if needed, runs brew bundle, configures zsh,
installs Codex through Homebrew, installs or updates Oh My Codex through npm,
refreshes the local Codex plugin cache for OMX-provided skills without
installing OMX native hooks, and installs third-party agent skills with
npx skills.
Some steps are intentionally left manual because they require auth, secrets, or GUI-specific choices.
gh auth login
codex loginIf Codex and OMX skill discovery need to be refreshed:
./scripts/codex.shIt is safe to rerun ./bootstrap.sh. The setup is intended to be idempotent:
Homebrew skips installed packages, zsh plugins update existing clones, iTerm
dynamic profiles are overwritten from the checked-in copy, Codex keeps the
memory feature enabled, OMX plugin skill discovery is refreshed without native
hooks, and
third-party skills are reinstalled through npx skills.
If the first run stopped during agent skill installation, rerun the full bootstrap or run:
./scripts/agent-skills.shMost apps and CLI tools live in Brewfile:
gitghfnmpyenvrusttmuxhttpiebat- Codex
- iTerm2
- Rectangle
- Visual Studio Code
- JetBrains Mono
Apply package changes with:
brew bundle --file BrewfileThe setup script installs Codex with Homebrew:
brew install --cask codexOh My Codex is installed and updated with npm:
npm install -g oh-my-codex@latestIt also enables the Codex memory feature used by this setup in
~/.codex/config.toml:
[features]
memories = trueThis setup does not run omx setup. Instead, scripts/codex.sh installs the
Oh My Codex npm package, refreshes the local Codex plugin cache from the
packaged plugin, and enables that plugin marketplace in ~/.codex/config.toml:
./scripts/codex.shThat keeps bundled OMX workflows and skills discoverable while deliberately
removing setup-owned OMX native hooks, generated OMX AGENTS.md guidance, and
OMX-owned hook trust state. Full OMX runtime setup remains available manually
with omx setup, but it is not part of this machine bootstrap.
The default setup also installs the repo-managed Codex guidance into
~/.codex/AGENTS.md without the work-only Additional Instructions section.
Those additional instructions are installed only by the work profile script.
Codex personal state is not committed to this public repo. To move personal
Codex config, hook registrations, AGENTS guidance, native agents, prompts,
memories, and the home-level AGENTS.md from the old laptop:
./scripts/backup-codex.shThen copy the generated archive to the new laptop and restore it:
./scripts/restore-codex-backup.sh codex-personal-backup-YYYYMMDD-HHMMSS.tgzReview the archive before storing or sharing it. It may contain private
preferences or memory context. Do not back up ~/.codex/auth.json, logs,
sessions, sqlite state, or generated plugin caches by default.
This repo supports a personal/default Codex setup and an optional work profile. The default bootstrap does not apply work-only API routing or work-specific additional instructions.
To install the work profile:
export CODEX_WORK_LITELLM_BASE_URL="https://YOUR-LITELLM-HOST/v1"
export CODEX_WORK_LITELLM_MODEL="YOUR-LITELLM-MODEL-ALIAS"
./scripts/codex-profile.sh workThen launch work sessions normally:
codexSee docs/codex-work-profile.md for the LiteLLM
API-key manual steps and profile details.
Oh My Codex workflows and bundled skills are supplied by the local Codex plugin
cache that scripts/codex.sh refreshes from the npm package. This setup keeps
the plugin skills available without installing OMX native runtime hooks.
Third-party skills are installed through npx skills, not copied manually by
default:
./scripts/agent-skills.shThe current skill manifest lives in docs/codex-skills.md.
The setup script installs Oh My Zsh, copies ac.zsh-theme into
~/.oh-my-zsh/themes, sets ZSH_THEME="ac", and installs:
zsh-autosuggestionszsh-syntax-highlighting
It also adds shell initialization for fnm and pyenv.
The setup script installs dynamic profiles from
iterm2/DynamicProfiles, including the current
profile keyboard shortcuts.
To refresh the checked-in profiles after changing iTerm profile settings:
./scripts/iterm2.sh exportTo install the checked-in profiles manually:
./scripts/iterm2.sh installOneDark.itermcolors is kept for manual import if needed,
but the checked-in dynamic profiles also include the current profile color
settings.
Hotkey window:
- Open Preferences with
CMD+,. - General > Startup > Window restoration policy > Only Restore Hotkey Window.
- Profiles > Window > Style: Full-Width Bottom of Screen, Screen: Screen with Cursor, Space: All Spaces.
- Profiles > Keys > Check "A hotkey opens a dedicated window with this profile."
- Configure Hotkey Window > Set Hotkey to double-tap Option > Pin hotkey window, Animate showing and hiding, Floating window.
- On Dock icon click: Show this Hotkey Window if no other window is open.
If the Option double-tap works only while iTerm2 is already active, grant
/Applications/iTerm.app permission in System Settings > Privacy & Security >
Input Monitoring and Accessibility, then quit and reopen iTerm2. The dedicated
hotkey window needs global keyboard event access to trigger while another app is
frontmost.
Open new tabs in the same directory:
Settings > Profiles > General > Working Directory > Reuse previous session's directory
Natural Text Editing:
- Preferences > Profiles.
- Select the profile.
- Keys > Key Mappings.
- Presets > Natural Text Editing.
Font:
iTerm > Preferences > Profiles > Text > Font > JetBrains Mono
New window size:
125 x 30
Run:
./scripts/verify.sh