Skip to content

Commit b04895e

Browse files
committed
cdx
1 parent 7021d4b commit b04895e

5 files changed

Lines changed: 41 additions & 11 deletions

File tree

‎AGENTS.md‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Repository Guidelines
2+
3+
## Project Structure & Module Organization
4+
- `setup/`: Mac bootstrap scripts (`setup.sh`, `mac_settings.sh`, `packages.sh`, `duti.sh`, `mas.sh`).
5+
- `bashrc/`: Modular shell config loaded via `bashrc/main.sh` (aliases, prompt, path, language toolchains).
6+
- `bin/`: Small utilities and helpers used interactively (e.g., `git-clean-branches`, `dropbox_backup`).
7+
- `docs/`: Install script served at `dotfiles.ndbroadbent.com` (curl-to-install).
8+
- Other: `starship.toml` (prompt), `.shellcheckrc`, `.cspell.json`, `applescript/`, `karabiner-elements/`, `rails_shell/`.
9+
10+
## Build, Test, and Development Commands
11+
- Bootstrap locally: `./setup.sh` — installs tools, applies macOS defaults, sets Bash as shell, and opens key apps. Do not run with sudo.
12+
- Run a single module: `bash setup/mac_settings.sh` or `bash setup/packages.sh`.
13+
- Lint shell scripts: `shellcheck setup/*.sh bashrc/*.sh bin/*` (respects `.shellcheckrc`).
14+
- Spell-check identifiers/docs: `cspell "**/*"` (uses `.cspell.json`).
15+
- Quick syntax check: `bash -n path/to/script.sh`.
16+
17+
## Coding Style & Naming Conventions
18+
- Shell: target Bash, enable strictness (`set -eo pipefail`), prefer POSIX where easy.
19+
- Indentation: 2 spaces; no tabs.
20+
- Filenames: lowercase, hyphenated; executable scripts with `.sh` when run via `bash`.
21+
- Env/paths: reference `"$DOTFILES_PATH"` and quote all variable expansions.
22+
- Output: concise, actionable messages; avoid noisy `set -x` in committed code.
23+
24+
## Testing Guidelines
25+
- Local verification: run target script in isolation first (e.g., `bash setup/duti.sh`).
26+
- Linting is required for changes in `setup/`, `bashrc/`, or `bin/`.
27+
- Manual smoke tests: open a new shell to ensure `bashrc/main.sh` loads without errors; verify expected tools on PATH and prompt shows correctly.
28+
- Risky/macOS-defaults changes: test on a non-primary machine or VM snapshot.
29+
30+
## Commit & Pull Request Guidelines
31+
- Commits: imperative, scoped messages (e.g., `setup: refine Homebrew casks`, `bashrc: fix prompt init`).
32+
- PRs: include summary, rationale, affected scripts, manual test notes (commands run + observed results), and screenshots when UI settings change.
33+
- Keep changes small and reversible; avoid committing machine-specific artifacts.
34+
35+
## Security & Configuration Tips
36+
- Never run `setup.sh` as root; script enforces non-sudo.
37+
- Prefer local clone for development over `curl | bash` from `docs/`.
38+
- Avoid secrets in repo; use `direnv` and private env files instead.

‎bashrc/aliases.sh‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ alias clr="claude -r"
5959
alias cls="claude --dangerously-skip-permissions"
6060
alias clsr="claude --dangerously-skip-permissions --resume"
6161
alias clsc="claude --dangerously-skip-permissions --continue"
62+
alias cdx="codex --dangerously-bypass-approvals-and-sandbox"
6263

6364
if [ "$(uname)" = Darwin ]; then
6465
alias beep="(afplay /System/Library/Sounds/Glass.aiff > /dev/null 2>&1 &)"

‎bashrc/main.sh‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ BASHRC_MODULES=" \
2020
ip
2121
react_native
2222
ruby_on_rails
23-
yubikey
2423
"
2524

2625
# DEBUG_BASHRC=true

‎bashrc/path.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ export PATH="${PATH}:~/.local/bin"
2323
# export ANDROID_SDK="$ANDROID_HOME"
2424
export PATH="${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/emulator:${ANDROID_HOME}/platform-tools"
2525

26-
export JAVA_HOME="/opt/homebrew/opt/openjdk@23"
27-
export PATH="/opt/homebrew/opt/openjdk@23/bin:${PATH}"
26+
export JAVA_HOME="/opt/homebrew/opt/openjdk@23/libexec/openjdk.jdk/Contents/Home"
27+
export PATH="${JAVA_HOME}/bin:${PATH}"
2828

2929
# bun
3030
export BUN_INSTALL="$HOME/.bun"

‎bashrc/yubikey.sh‎

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)