# script: setup-formatters **Location:** `scripts/setup-formatters.sh` ## Purpose Opts a project into the auto-formatting system by creating a `formatters/` directory with symlinks back to the canonical formatter scripts in claude-foundations. ## Usage ```bash scripts/setup-formatters.sh [ ...] ``` Run with no arguments to see available formatters: `py`, `sh`, `ts`, `js`, `sql`, `json`, `yaml`, `md`. ## How it works 1. Creates `/formatters/` if needed 2. Computes a relative path from the project's `formatters/` to `claude-foundations/formatters/` 3. Creates symlinks for each requested extension 4. If the project is a git repo and has no pre-commit hook, installs `pre-commit-lint.sh` as the git pre-commit hook ## Gotchas - Uses `python3` for relative path computation — requires Python 3 available. - Won't overwrite an existing pre-commit hook. - The `formatters/` directory can be committed (symlinks) or gitignored — project's choice.