🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@br-validators/cli

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@br-validators/cli

CLI for @br-validators/core — CPF, CNPJ, NF-e, IE, PIX, boleto + detect/sanitize/generate

Source
npmnpm
Version
1.8.3-data.1
Version published
Weekly downloads
2.3K
152.43%
Maintainers
1
Weekly downloads
 
Created
Source

@br-validators/cli

npm MIT GitHub release

Terminal CLI for all Brazilian document validators in @br-validators/core v1.8.3.

Repo: github.com/open-data-brazil/br-validators

Install

npm install -g @br-validators/cli

Or run without install:

npx @br-validators/cli --help

Global commands

br-validators list
br-validators --version
br-validators --help

Per-type commands

br-validators cnpj validate 12ABC34501DE35 --json --source
br-validators cpf validate 12345678909
br-validators cep format 01310100
br-validators telefone validate 11999999999
br-validators cnh validate 62472927637
br-validators renavam validate 63977791104
br-validators titulo-eleitor validate 004356870906
br-validators nfe-chave validate 52060433009911002506550120000007800267301615 --json
br-validators nfe-chave parse 52060433009911002506550120000007800267301615 --json
br-validators brcode validate '<emv-payload>' --json
br-validators placa validate ABC1D23
br-validators pis-pasep validate 10027230888
br-validators pix validate pix@bcb.gov.br
br-validators boleto validate '03399.02579 08991.834006 71742.301014 6 14500000099668'
br-validators cartao validate 4111111111111111
br-validators cartao-credito validate 4111111111111111
br-validators ie validate 110042490114 --uf SP --json
br-validators ie validate P-01100424.3/002 --uf SP   # SP produtor rural (auto-detect)

Actions (per-type)

ActionDescription
validateCheck format + check digits
formatApply official mask
stripNormalize to canonical digits/chars
parseNF-e chave, BR Code
convertBoleto linha ↔ barcode; placa legacy → Mercosul
detectPIX key type; boleto input kind; cartão brand

Platform commands

CommandDescription
detect [value]Classify raw input; --uf for IE
sanitize <type> [value]ETL fixes + validate; --uf for inscricao-estadual
generate <type>Synthetic test document; --seed, --masked, --format

Library-only platform APIs: mask, compare, batch, and diff are available via @br-validators/core subpaths — no dedicated CLI commands yet.

br-validators detect '123.456.789-09' --json
br-validators detect '110042490114' --uf SP --json
br-validators sanitize cpf ' 123.456.789-09 ' --json
br-validators sanitize inscricao-estadual '110.042.490.114' --uf SP --json
br-validators generate cpf --seed 42 --masked --json
br-validators generate cnpj --format alphanumeric --seed 7 --json
br-validators generate placa --format mercosul --seed 3

Reference data lookup

Offline embedded datasets — delegates to @br-validators/core/*.

Bacen banks

br-validators bancos lookup 001 --json
br-validators bancos lookup 18236120 --verbose
br-validators bancos list --limit 20 --json

Fiscal (26c)

br-validators natureza-juridica lookup 2062 --json
br-validators nbs lookup 1.1502.50.00 --verbose
br-validators cest lookup 0302100 --json
br-validators cnae lookup 6201501 --json
br-validators cnae search "web design" --limit 5
br-validators cfop lookup 1102 --json
br-validators cfop search compra --limit 5
br-validators ncm lookup 12011000 --json
br-validators ncm search soja --limit 5
br-validators cbo lookup 212405 --json
br-validators cbo search analista --limit 5

Geography & calendar (27d)

br-validators ibge lookup 3550308 --json
br-validators ibge list estados --limit 5
br-validators ibge list municipios --uf SP --limit 10 --json
br-validators tse-municipios lookup 71072 --verbose
br-validators feriados list --year 2026 --json
br-validators cep faixa 01310 --json
br-validators ddd lookup 11 --verbose

Trade (26d)

br-validators moedas lookup BRL --json
br-validators paises-bacen lookup 1058 --verbose
br-validators incoterms lookup FOB --json

Logistics (26e)

br-validators portos lookup BRSSZ --json
br-validators aeroportos lookup GRU --verbose
br-validators aeroportos lookup SBGR --json
Exit codeMeaning
0Record found
1Not found
2Usage error

Flags

FlagDescription
--jsonJSON output
--quiet / -qExit code only (CI)
--file / -fRead value from file
--sourcePrint official source URL (per-type)
--ufRequired for IE / detect / sanitize IE; optional filter for ibge list municipios

CI

br-validators cnpj validate "$CNPJ" --quiet || exit 1
br-validators detect "$RAW_INPUT" --json --quiet || exit 1

License

MIT

Keywords

brazil

FAQs

Package last updated on 26 Jun 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts