Skip to content

acypert/New-Device-Setup

Repository files navigation

New Device Setup: macOS

Bootstrap a new Mac with the tools, shell setup, Codex setup, Oh My Codex skills, and agent skills used on this laptop.

Quick Start

Install Xcode Command Line Tools first:

xcode-select --install

Clone this repo and run the bootstrap:

git clone https://github.com/acypert/New-Device-Setup.git
cd New-Device-Setup
./bootstrap.sh

The 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.

Manual Steps

Some steps are intentionally left manual because they require auth, secrets, or GUI-specific choices.

gh auth login
codex login

If Codex and OMX skill discovery need to be refreshed:

./scripts/codex.sh

Rerunning

It 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.sh

Packages

Most apps and CLI tools live in Brewfile:

  • git
  • gh
  • fnm
  • pyenv
  • rust
  • tmux
  • httpie
  • bat
  • Codex
  • iTerm2
  • Rectangle
  • Visual Studio Code
  • JetBrains Mono

Apply package changes with:

brew bundle --file Brewfile

Codex And OMX

The setup script installs Codex with Homebrew:

brew install --cask codex

Oh My Codex is installed and updated with npm:

npm install -g oh-my-codex@latest

It also enables the Codex memory feature used by this setup in ~/.codex/config.toml:

[features]
memories = true

This 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.sh

That 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.sh

Then copy the generated archive to the new laptop and restore it:

./scripts/restore-codex-backup.sh codex-personal-backup-YYYYMMDD-HHMMSS.tgz

Review 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.

Codex Profiles

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 work

Then launch work sessions normally:

codex

See docs/codex-work-profile.md for the LiteLLM API-key manual steps and profile details.

Codex Skills

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.sh

The current skill manifest lives in docs/codex-skills.md.

zsh

The setup script installs Oh My Zsh, copies ac.zsh-theme into ~/.oh-my-zsh/themes, sets ZSH_THEME="ac", and installs:

  • zsh-autosuggestions
  • zsh-syntax-highlighting

It also adds shell initialization for fnm and pyenv.

iTerm2

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 export

To install the checked-in profiles manually:

./scripts/iterm2.sh install

OneDark.itermcolors is kept for manual import if needed, but the checked-in dynamic profiles also include the current profile color settings.

Hotkey window:

  1. Open Preferences with CMD+,.
  2. General > Startup > Window restoration policy > Only Restore Hotkey Window.
  3. Profiles > Window > Style: Full-Width Bottom of Screen, Screen: Screen with Cursor, Space: All Spaces.
  4. Profiles > Keys > Check "A hotkey opens a dedicated window with this profile."
  5. Configure Hotkey Window > Set Hotkey to double-tap Option > Pin hotkey window, Animate showing and hiding, Floating window.
  6. 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:

  1. Preferences > Profiles.
  2. Select the profile.
  3. Keys > Key Mappings.
  4. Presets > Natural Text Editing.

Font:

iTerm > Preferences > Profiles > Text > Font > JetBrains Mono

New window size:

125 x 30

Verify

Run:

./scripts/verify.sh

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors