Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@

# ignore
configs/claude/**
configs/codex/**

# keep
!configs/claude/CLAUDE.md
!configs/claude/settings.json
!configs/claude/skills/
!configs/claude/skills/**
!configs/claude/statusline-command.sh
!configs/codex/
!configs/codex/AGENTS.md
!configs/codex/config.toml

# Generated symlinks from link-dotfiles.sh for hostname-specific skills.
# Add an entry here for each skill that lives under configs/personal/ or configs/work/.
Expand Down
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,11 @@ repos:
- id: shellcheck
files: ^(configs/(aliases|bash_profile|zprofile|zshrc)|scripts/.*\.sh)$
types: [file]
- repo: local
hooks:
- id: codex-doctor
name: codex doctor
entry: codex doctor --summary --ascii
language: system
pass_filenames: false
files: ^configs/codex/config\.toml$
3 changes: 2 additions & 1 deletion Brewfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,10 @@ cask '1password-cli'
cask 'appzapper'
cask 'claude'
cask 'claude-code'
cask 'codex'
cask 'gcloud-cli'
cask 'ghostty'
cask 'linear-linear'
cask 'linear'
cask 'font-jetbrains-mono-nerd-font'
cask 'podman-desktop'
cask 'spotify'
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ scripts/
configs/ # Dotfiles and tool configs
AGENTS.md # Shared global agent instructions
agents/ # Shared user-level agent config
codex/ # Codex config
Brewfile # Common Homebrew packages
Brewfile.work # Work-specific packages
Brewfile.personal # Personal-specific packages
Expand Down
1 change: 1 addition & 0 deletions configs/codex/AGENTS.md
10 changes: 10 additions & 0 deletions configs/codex/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
status_line = ["model-with-reasoning", "context-remaining", "git-branch", "current-dir"]
sandbox_mode = "workspace-write"
approval_policy = "on-request"
approvals_reviewer = "auto_review"

[projects."~/code"]
trust_level = "trusted"

[tui.model_availability_nux]
"gpt-5.5" = 3
30 changes: 27 additions & 3 deletions scripts/link-dotfiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,29 @@ link_file() {
echo " linked: $dest -> $src"
}

migrate_directory_contents() {
local src="$1"
local dest="$2"

if [ ! -d "$dest" ] || [ -L "$dest" ]; then
return
fi

echo " migrating: $dest contents -> $src"
for path in "$dest"/* "$dest"/.[!.]* "$dest"/..?*; do
[ -e "$path" ] || continue
local name
name="$(basename "$path")"

if [ -e "$src/$name" ] || [ -L "$src/$name" ]; then
echo " keeping managed Codex entry: $name"
continue
fi

mv "$path" "$src/$name"
done
}

echo "Linking dotfiles ..."

link_file "$CONFIGS_DIR/zshrc" "$HOME/.zshrc"
Expand All @@ -43,11 +66,12 @@ link_file "$CONFIGS_DIR/gemrc" "$HOME/.gemrc"
link_file "$CONFIGS_DIR/tmux.conf" "$HOME/.tmux.conf"
link_file "$CONFIGS_DIR/nvim" "$HOME/.config/nvim"

echo "Linking Codex global instructions ..."
echo "Linking Codex config ..."

CODEX_HOME_DIR="${CODEX_HOME:-$HOME/.codex}"
mkdir -p "$CODEX_HOME_DIR"
link_file "$CONFIGS_DIR/AGENTS.md" "$CODEX_HOME_DIR/AGENTS.md"
mkdir -p "$(dirname "$CODEX_HOME_DIR")"
migrate_directory_contents "$CONFIGS_DIR/codex" "$CODEX_HOME_DIR"
link_file "$CONFIGS_DIR/codex" "$CODEX_HOME_DIR"

echo "Linking claude config ..."

Expand Down