Command line
The nusaindex package installs a nusaindex command with the shorter alias nusa. It needs Node.js 22.18 or later and has no dependencies.
npm install --global nusaindexnpx nusaindex --helpCommands
Section titled “Commands”| Command | Does |
|---|---|
nusaindex <nik|npwp|phone|plate|nip|nisn> <value> |
Validate and parse one value |
nusaindex mask <kind|text> <value> |
Mask an identifier (account too) or free text |
nusaindex rupiah format|parse|terbilang <value> |
Format, parse or spell a Rupiah amount |
nusaindex region get|resolve|children|search|nik <value> |
Look up regions, resolve follows renumbered codes |
nusaindex holiday <year> |
Holidays and collective leave in a year |
nusaindex bank <code|bic|list> |
Look up banks by transfer code or BIC |
nusaindex workday is|add|count … |
Working-day arithmetic |
nusaindex fake <kind> [--seed n] [--count n] |
Test data (for tests only) |
nusaindex nik 7502010706599583nusaindex rupiah terbilang 1500000.5nusaindex region search gambir --level districtnusaindex workday add 2026-08-14 3nusaindex fake nik --seed 7 --region 31.71 --count 5Run nusaindex --help for every option.
Batch processing
Section titled “Batch processing”Command-line arguments end up in your shell history, so pass real data on standard input:
nusaindex nik --stdin < niks.txtnusaindex mask text --stdin < app.log > app.redacted.lognusaindex phone --csv --column phone < customers.csv > checked.csvnusaindex mask nik --csv --column nik < customers.csv > masked.csv--stdinreads one value per line (up to 1 MiB per line).--csv --column <name>reads a CSV with a header. Validation adds<column>_validand<column>_errorcolumns, whilemaskandrupiahreplace the cell. Records must fit on one line.
Output and exit codes
Section titled “Output and exit codes”Add --json for machine-readable output. Error messages contain the error code, never the value.
| Exit code | Meaning |
|---|---|
0 |
Every value is valid |
1 |
At least one value is invalid |
2 |
Usage error (unknown command or option) |
© 2026 Haikal Mumtaz