Thanks for your interest! All changes go through Pull Requests; CI (lint, type check, tests) must pass before merge.
git clone https://github.com/akazah/prompt-anonymizer.git
cd prompt-anonymizer
# https://docs.astral.sh/uv/
uv sync --all-extras --group models # `models` = spaCy sm wheels (locked); add --group models-lg for the lg modelsChecks:
uv run ruff check . && uv run ruff format --check src tests demo
uv run mypy src
uv run pytest -m "not slow" # unit + integration
uv run pytest -m slow # accuracy regression (golden set)
uv run python -m prompt_anonymizer.evals # regenerate docs/EVAL.md + tests/golden/cd web
pnpm install
pnpm test # vitest (core + cli + element + react + vue + proxy + mcp)
pnpm lint # tsc across packages
pnpm docs:check # all repo *.md: links/anchors + release-aligned doc freshness (runs in CI)
pnpm build # all packages + apps
pnpm --filter @prompt-anonymizer/web dev # local dev server
pnpm --filter @prompt-anonymizer/desktop dev # Tauri (needs Rust + system deps)
node packages/cli/dist/cli.js anonymize -t "…" # Node CLI (after build)End-to-end tests (Playwright, in web/e2e/; run pnpm build first — they
serve the built dist/):
pnpm --filter @prompt-anonymizer/e2e exec playwright install chromium # once
pnpm e2e # web app + Chrome extension, regex-only: offline & fast (PR CI)
pnpm e2e:ner # full NER pipeline; downloads the models on first run and
# caches them in web/e2e/.cache (weekly CI)The TypeScript core must stay in behavioural parity with the Python core
(label format, mapping semantics, merge rules). The shared golden set in
tests/golden/ is the contract — regenerate it with the evals module when
you change generation logic, and keep web/packages/core passing.
The project is MIT. New code dependencies and default NER models must satisfy the following before they are added:
- Code dependencies: MIT / Apache-2.0 / BSD-style licenses are acceptable. LGPL libraries (e.g. python-stdnum) may be used as import-only dependencies — never vendor (copy) their code into this repository. GPL and custom two-tier ("free for small users, paid for companies") licenses are not acceptable.
- Default NER models (downloaded at runtime, but this tool targets
business use, so defaults must be commercially safe): the model must
(1) permit commercial use, (2) permit derivative works — ONNX conversion
and quantization are derivatives — and (3) not be fine-tuned on datasets
whose license taints the weights (e.g. the two-tier-licensed ai4privacy
pii-masking-200k/400k sets). Record the license, revision and training
data of any adopted model in
docs/PLAN_INTL_PII.md's audit table, and re-audit when bumping the revision: model-card licenses do change (Piiranha was announced as MIT and later relicensed CC-BY-NC-ND-4.0).
SemVer. Breaking API changes bump the minor version while we are pre-1.0.
Update CHANGELOG.md (Keep a Changelog format) in the same PR.
GIFs are generated from scripts — never hand-recorded. See demo/README.md.