A CLI tool to anonymize CSV files using SQLite3. No dependencies required.
This file defines the coding standards and conventions for this project. Claude Code must follow these rules in every file it generates or modifies.
- Bash (POSIX compatible — must work on macOS and Linux)
- SQLite3 (native, no installation required)
- Zero external dependencies
- Portability — works on any Mac/Linux without installing anything
- Non-destructive — original files are never modified, always work on a copy
- Simplicity — one clear command per operation
- Transparency — always show the user what is about to happen before doing it
- Import CSV into a temporary SQLite3 database
- Show column names and preview first 5 rows (configurable with -p)
- User selects columns to anonymize and method
- Execute anonymization queries
- Export anonymized data back to CSV
- Clean up temporary database
- uuid — replace with random 32-char hex string
- email — replace with
<uuid>@anon.local - phone — replace with random digit sequence preserving length
- name — replace with
ANON_<sequential_number>
- Meaningful variable names — no single letter variables except loop counters
- Every function must have a comment explaining its purpose
- Error handling — always check if SQLite3 is available, if file exists, if import succeeded
- Exit codes — 0 for success, 1 for user errors, 2 for system errors
- Never modify the original CSV file
- No external tools beyond SQLite3 and standard Unix utilities (awk, sed, cut)
- No hardcoded paths
- No operations without user confirmation when destructive