|
| 1 | +### Bash commands |
| 2 | + |
| 3 | +Prefer these over defaults when available. Fall back silently if missing. |
| 4 | + |
| 5 | +- **Search content:** `rg` over `grep` |
| 6 | +- **Find files:** `fd` over `find` |
| 7 | +- **Never** use `find -exec` or `xargs` chains when `fd -x` or `rg -l | xargs` would be clearer. Prefer readable pipelines. |
| 8 | +- **Structural/AST search:** `ast-grep` (`sg`) for refactors and pattern-based code search, especially in TS/TSX |
| 9 | +- **JSON:** `jq` for any parsing, filtering, or transformation in pipelines |
| 10 | +- **YAML/TOML:** `yq` |
| 11 | +- **GitHub operations:** `gh` for PRs, issues, reviews, CI status, and releases. Do not scrape github.com or hit the REST API directly when `gh` can do it. |
| 12 | +- **Benchmarking:** `hyperfine` when comparing command performance |
| 13 | +- **Circular deps (JS/TS):** `madge --circular` |
| 14 | +- **Dead code (JS/TS):** `knip` |
| 15 | +- **Duplication (JS/TS):** `jscpd` |
| 16 | +- **Typecheck only:** `tsc --noEmit` (or `tsc -b --noEmit` in monorepos)### Bash commands |
| 17 | + |
| 18 | +Prefer these over defaults when available. Fall back silently if missing. |
| 19 | + |
| 20 | +- **Search content:** `rg` over `grep` |
| 21 | +- **Find files:** `fd` over `find` |
| 22 | +- **Never** use `find -exec` or `xargs` chains when `fd -x` or `rg -l | xargs` would be clearer. Prefer readable pipelines. |
| 23 | +- **Structural/AST search:** `ast-grep` (`sg`) for refactors and pattern-based code search, especially in TS/TSX |
| 24 | +- **JSON:** `jq` for any parsing, filtering, or transformation in pipelines |
| 25 | +- **YAML/TOML:** `yq` |
| 26 | +- **GitHub operations:** `gh` for PRs, issues, reviews, CI status, and releases. Do not scrape github.com or hit the REST API directly when `gh` can do it. |
| 27 | +- **Benchmarking:** `hyperfine` when comparing command performance |
| 28 | +- **Circular deps (JS/TS):** `madge --circular` |
| 29 | +- **Dead code (JS/TS):** `knip` |
| 30 | +- **Duplication (JS/TS):** `jscpd` |
| 31 | +- **Typecheck only:** `tsc --noEmit` (or `tsc -b --noEmit` in monorepos) |
0 commit comments