dotfiles/README.md
ilia 9dc84bf8f5
All checks were successful
CI / skip-ci-check (pull_request) Successful in 23s
CI / secret-scan (pull_request) Successful in 22s
Add Cursor shell hooks for vault and ansible apply gates
Persist destructive/infra footgun hooks in the repo and teach install.sh
to sync them without clobbering a local hooks.json unless overwritten.
2026-07-30 16:50:56 -04:00

74 lines
3.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Family / machine shared config (Ilia + Irina)
Shell, Cursor rules/skills, and install helpers so either Mac can:
```bash
git clone gitea@git.levkin.ca:ilia/dotfiles.git ~/Documents/code/dotfiles
cd ~/Documents/code/dotfiles
./install.sh # Ilia / general
./install.sh --ira # Irina — same install + printed follow-ups
exec zsh
```
## Whats in here
| Path | Purpose |
|------|---------|
| `.zshrc` | Live Oh My Zsh + Powerlevel10k config (portable `$HOME` paths) |
| `.p10k.zsh` | Prompt theme |
| `zsh/homelab.zsh` | Ansible shortcuts (`hsp`, `hs`, `mk`, `hvk`, `mps`, …) |
| `zsh/zshrc.local.example` | → `~/.zshrc.local` for machine-only tweaks |
| `cursor/rules/` | Shared Cursor rules (`family-machine`, `new-project-standards`) |
| `cursor/skills/` | Shared skills (`humanizer`, `frontend-design`, `ui-ux-pro-max`) |
| `cursor/hooks/` + `cursor/hooks.json` | Cursor agent shell guardrails (destructive / vault / ansible apply) |
| `cursor/mcp.json.example` | Optional Playwright MCP (no Hermes SSH) |
| `scripts/git-hooks/` | Local gitleaks pre-commit |
### Cursor skills — which one?
- **frontend-design** — distinctive, anti-template UI for one-off products (default for personal apps).
- **ui-ux-pro-max** — searchable style/palette/UX database + design-system generator (SaaS/landing/dashboard checklists). Upstream: [nextlevelbuilder/ui-ux-pro-max-skill](https://github.com/nextlevelbuilder/ui-ux-pro-max-skill). See `cursor/skills/ui-ux-pro-max/ORIGIN.md`.
- **humanizer** — de-AI writing tone.
**Not** included (stay on Ilias machine only): job-application Cursor rules,
Hermes MCP over SSH, Ansible Vault password, full `~/.cursor` dump.
## Irina — pull and go
```bash
git clone gitea@git.levkin.ca:ilia/dotfiles.git ~/Documents/code/dotfiles
cd ~/Documents/code/dotfiles && ./install.sh --ira
```
Then follow the printed steps: Vaultwarden app password → clone
`personal-scripts``.env.irina` → Cursor prompt.
Gmail work lives in **`ilia/personal-scripts`** (lighter than full ansible).
Ansible is optional unless you want `hsp` / inventory SSH helpers.
## Ilia — keep this repo updated
When `~/.zshrc` drifts:
1. Edit files **in this repo** (or sync from live after reviewing diffs).
2. `./install.sh` re-links.
3. Commit + push `master` so Irina can `git pull` and re-run `./install.sh`.
Homelab Make/SSH helpers expect `~/Documents/code/ansible`. Gmail Make
targets for Irina expect `~/Documents/code/personal-scripts`.
## Prerequisites (macOS)
- Oh My Zsh + Powerlevel10k theme
- Recommended: `brew install fzf jq direnv` (and `fzf` for `hsp`)
- Optional OMZ plugins: `zsh-autosuggestions`, `zsh-syntax-highlighting`,
`zsh-history-substring-search` under `$ZSH_CUSTOM/plugins/`
## Safety
- `install.sh` backs up existing `~/.zshrc` / `~/.p10k.zsh` before replacing.
- Does not overwrite an existing `~/.cursor/mcp.json`.
- Syncs `cursor/hooks/*.sh` into `~/.cursor/hooks/`; installs `hooks.json` only if missing (use `--overwrite-cursor-hooks` to replace).
- Cursor hooks block destructive shell, `ansible-vault` / apply without check, and `git --no-verify` unless `ALLOW_VAULT=1` / `ALLOW_ANSIBLE_APPLY=1`.
- No secrets in this repo — use Vaultwarden and gitignored `.env*` files.