|
| 1 | +# Contributing to sink-cli |
| 2 | + |
| 3 | +Thanks for your interest in contributing. This guide covers what you need to get started. |
| 4 | + |
| 5 | +## Dev Setup |
| 6 | + |
| 7 | +```bash |
| 8 | +git clone https://github.com/totalaudiopromo/sink-cli.git |
| 9 | +cd sink-cli |
| 10 | +pnpm install |
| 11 | +pnpm build |
| 12 | +``` |
| 13 | + |
| 14 | +## Scripts |
| 15 | + |
| 16 | +| Command | What it does | |
| 17 | +|---------|-------------| |
| 18 | +| `pnpm build` | Compile TypeScript to `dist/` | |
| 19 | +| `pnpm dev` | Watch mode | |
| 20 | +| `pnpm test` | Run all tests (Vitest) | |
| 21 | +| `pnpm test:watch` | Tests in watch mode | |
| 22 | +| `pnpm typecheck` | Type-check without emitting | |
| 23 | + |
| 24 | +## Running locally |
| 25 | + |
| 26 | +After building, you can run the CLI directly: |
| 27 | + |
| 28 | +```bash |
| 29 | +node dist/cli.js scrub test/fixtures/sample.csv --dry-run |
| 30 | +``` |
| 31 | + |
| 32 | +## Tests |
| 33 | + |
| 34 | +Tests live in `test/` and mirror `src/` structure. Run them before pushing: |
| 35 | + |
| 36 | +```bash |
| 37 | +pnpm test |
| 38 | +``` |
| 39 | + |
| 40 | +All tests should pass. If you're adding a new feature, add tests for it. If you're fixing a bug, add a test that reproduces it. |
| 41 | + |
| 42 | +## Code Style |
| 43 | + |
| 44 | +- TypeScript strict mode |
| 45 | +- UK spelling in user-facing text (colour, normalise, licence) |
| 46 | +- No emojis in code or output |
| 47 | +- Commits use `feat:` / `fix:` / `docs:` / `test:` / `chore:` prefixes |
| 48 | + |
| 49 | +## Pull Requests |
| 50 | + |
| 51 | +1. Fork the repo and create a branch from `main` |
| 52 | +2. Make your changes |
| 53 | +3. Run `pnpm typecheck && pnpm test` -- both must pass |
| 54 | +4. Open a PR with a clear description of what changed and why |
| 55 | + |
| 56 | +Keep PRs focused. One feature or fix per PR is ideal. |
| 57 | + |
| 58 | +## Project Structure |
| 59 | + |
| 60 | +``` |
| 61 | +src/ |
| 62 | + cli.ts CLI entry point (Commander) |
| 63 | + pipeline.ts Pipeline orchestrator |
| 64 | + config.ts Config loader |
| 65 | + types.ts Shared types |
| 66 | + phases/ |
| 67 | + scrub/ Email validation, parsing, typo correction |
| 68 | + rinse/ Deduplication strategies |
| 69 | + soak/ AI enrichment providers |
| 70 | + output/ CSV/JSON/JSONL formatters |
| 71 | + ui/ Terminal UI (format helpers, TUI, interactive) |
| 72 | + utils/ MX cache, helpers |
| 73 | +test/ |
| 74 | + fixtures/ Sample CSV files |
| 75 | + scrub/ Scrub phase tests |
| 76 | + rinse/ Rinse phase tests |
| 77 | + soak/ Provider tests |
| 78 | + pipeline.test.ts Integration tests |
| 79 | +``` |
| 80 | + |
| 81 | +## Questions? |
| 82 | + |
| 83 | +Open an issue. We're happy to help. |
0 commit comments