FastPII Docs
Reference

CLI Reference

Command-line reference for fastpii detect, validate, and list-detectors.

FastPII ships with a CLI named fastpii.

Commands

fastpii detect

Detect PII in inline text or a file.

fastpii detect "Jan Novák, RČ: 8001011238"

Arguments and options

NameTypeDescription
textpositionalText to analyze
--file, -fpathRead text from a file
--regions, -rone or more stringsRegions to enable
--format, -fmtjson or textOutput format
--output, -opathWrite output to a file

Examples

fastpii detect "Jan Novák, email: jan.novak@email.cz"
fastpii detect --file contract.txt
fastpii detect "IČO: 25596641" --regions cz --format json
fastpii detect "RČ: 8001011238" --output result.txt

Example text output

Detected 1 finding(s) in 0ms:

  [1] rodne_cislo: 8001011238
      Position: 4-14
      Region: cz
      Confidence: 95.0%
      Metadata:
        - checksum_valid: True
        - birth_date: 1980-01-01
        - gender: male
        - article_9: True

Example JSON output

{
  "text": "IČO: 25596641",
  "findings": [
    {
      "type": "ico",
      "value": "25596641",
      "start": 5,
      "end": 13,
      "confidence": 1.0,
      "region": "cz",
      "metadata": {
        "checksum_valid": true
      }
    }
  ],
  "detector_names": ["ico"],
  "processing_time_ms": 0
}

fastpii validate

Validate one value with a specific detector.

fastpii validate 8001011238 --detector rodne_cislo

Arguments and options

NameTypeDescription
valuepositionalValue to validate
--detector, -dstringDetector to use
--regions, -rone or more stringsRegions to enable
--format, -fmtjson or textOutput format

Examples

fastpii validate 8001011238 --detector rodne_cislo
fastpii validate 25596641 --detector ico --format json
fastpii validate CZ25596641 --detector dic

Example text output

Validation Result:
  Detector: rodne_cislo
  Value: 8001011238
  Status: ✓ VALID
  Metadata:
    - checksum_valid: True
    - birth_date: 1980-01-01
    - gender: male
    - article_9: True

Example JSON output

{
  "detector": "ico",
  "value": "25596641",
  "is_valid": true,
  "metadata": {
    "checksum_valid": true
  }
}

fastpii list-detectors

List the available detectors for the selected regions.

fastpii list-detectors

Options

NameTypeDescription
--regions, -rone or more stringsRegions to enable
--format, -fmtjson or textOutput format

Examples

fastpii list-detectors
fastpii list-detectors --regions cz --format json

Example text output

Available Detectors:
------------------------------------------------------------
  rodne_cislo         (cz)
    Czech birth number (rodné číslo) detector with checksum validation
  ico                 (cz)
    Czech company ID (IČO) detector with checksum validation
  dic                 (cz)
    Czech VAT number (DIČ) detector
------------------------------------------------------------
Total: 11 detectors

Example JSON output

[
  {
    "name": "rodne_cislo",
    "region": "cz",
    "description": "Czech birth number (rodné číslo) detector with checksum validation"
  },
  {
    "name": "ico",
    "region": "cz",
    "description": "Czech company ID (IČO) detector with checksum validation"
  }
]

On this page