npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@danielarndt0/brutils-cli

v1.1.1

Published

CLI em Node.js e TypeScript para gerar, validar e formatar CPF, CNPJ e CEP, com utilitários para JSON, strings, hashes, ZIP, IDs, senhas e dados aleatórios.

Readme

Brutils

Brutils é uma ferramenta de linha de comando em Node.js e TypeScript para geração, validação, formatação e manipulação de dados úteis no desenvolvimento de aplicações.

O projeto reúne utilitários para documentos brasileiros como CPF, CNPJ e CEP, além de ferramentas para cartões de crédito de teste, strings, JSON, hashes, UUIDs, tokens, senhas, datas, números aleatórios e arquivos ZIP.

É uma CLI modular para desenvolvedores que precisam executar tarefas rápidas diretamente no terminal, sem depender de scripts manuais ou ferramentas separadas.


Recursos

Com o Brutils, você pode:

  • Gerar, validar, formatar, limpar e mascarar CPF, CNPJ e CEP
  • Gerar cartões de crédito de teste, validar números e detectar bandeiras
  • Transformar, extrair, codificar e manipular strings
  • Formatar, editar, comparar e converter JSON/YAML localmente
  • Gerar hashes, UUIDs, tokens e senhas
  • Executar utilitários rápidos de datas
  • Gerar números inteiros, decimais, sorteios, embaralhamentos, dados e cara ou coroa
  • Sortear números com sementes determinísticas
  • Criar arquivos ZIP, listar arquivos compactados, testar arquivos e extrair ZIPs

A partir da versão 1.0.0, o Brutils possui uma única interface pública:

brutils --help

O uso oficial do projeto é feito pelo comando brutils.


Instalação

Instalação global via npm

Instale o pacote globalmente pelo npm:

npm install -g @danielarndt0/brutils-cli

Depois, execute:

brutils --help

Instalação via GitHub Packages

Caso o pacote esteja publicado no GitHub Packages e seu registry esteja configurado, instale globalmente com:

npm install -g @danielarndt0/brutils-cli

Depois, use a CLI normalmente:

brutils --help

Instalação para desenvolvimento local

Para clonar, compilar e testar o projeto localmente:

npm install
npm run build
npm link

Após o npm link, o comando brutils ficará disponível na sua máquina.

brutils --help

Uso rápido

CPF, CNPJ e CEP

brutils cpf generate --formatted
brutils cnpj validate 11.444.777/0001-61 --strict
brutils cep mask 86010190 --mask "###**-***"

Cartão de crédito

brutils credit-card generate --brand visa --formatted
brutils credit-card detect 4111111111111111

Strings, JSON, hash, ID e datas

brutils str slug --text "Hello Cool World"
brutils json format --value '{"name":"brutils","ok":true}' --sort-keys
brutils hash sha256 --text hello
brutils id token --length 24 --charset base64url
brutils date diff --from 2024-01-01T00:00:00Z --to 2024-01-03T00:00:00Z --unit days

Números aleatórios e sorteios

brutils random-number int --min 1 --max 60 --count 6 --unique --sorted
brutils random-number pick --items "red,blue,green" --count 2
brutils number-picker run --min 1 --max 100 --seed 42

ZIP e UNZIP

brutils zip create ./dist --out ./artifacts/dist.zip
brutils unzip extract ./artifacts/dist.zip --out ./restored

Aliases disponíveis

Alguns comandos possuem aliases para facilitar o uso no terminal:

brutils card ...

Alias para:

brutils credit-card ...
brutils rand ...

Alias para:

brutils random-number ...
brutils zip run ...

Alias para:

brutils zip create ...
brutils unzip run ...

Alias para:

brutils unzip extract ...

Ajuda integrada

A CLI possui ajuda integrada no comando principal, nos módulos e nas ações específicas.

brutils --help
brutils cpf --help
brutils cpf generate --help
brutils str --help
brutils json format --help
brutils hash --help
brutils date diff --help
brutils zip create --help

Desenvolvimento

O Brutils expõe apenas o comando brutils para uso final.

Os scripts do package.json são voltados para desenvolvimento, testes e validação do projeto.

npm run build
npm run lint
npm run typecheck
npm run test:unit
npm run cli -- --help

Exemplos durante o desenvolvimento local:

npm run cli -- cpf generate --formatted
npm run cli -- json format --file ./package.json --sort-keys
npm run cli -- zip create ./dist --out ./artifacts/dist.zip

Documentação

A documentação dos módulos está organizada por recurso:


Licença

MIT