@danielarndt0/brutils-cli 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Daniel Arndt
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,146 @@
1
+ # Brutils
2
+
3
+ **Brutils** is a production-ready command-line toolkit for Brazilian and general developer workflows.
4
+
5
+ It includes:
6
+
7
+ - CPF, CNPJ and CEP generation, validation, formatting, stripping and masking
8
+ - credit card test data generation, validation and brand detection
9
+ - string helpers for transformation, extraction and encoding
10
+ - local JSON helpers for formatting, editing, diffing and YAML conversion
11
+ - digest helpers, UUID/token/password generation and quick date utilities
12
+ - random integers, floats, picks, shuffles, dice rolls and coin flips
13
+ - number picking with deterministic seeds
14
+ - ZIP creation, archive listing, archive testing and ZIP extraction
15
+
16
+ Brutils **1.0.0** ships with a single public interface:
17
+
18
+ ```bash
19
+ brutils --help
20
+ ```
21
+
22
+ There are no legacy command entrypoints in this release. The official way to use the project is through the `brutils` CLI.
23
+
24
+ ---
25
+
26
+ ## Installation
27
+
28
+ ### Local development
29
+
30
+ ```bash
31
+ npm install
32
+ npm run build
33
+ npm link
34
+ ```
35
+
36
+ After linking, the `brutils` command will be available on your machine for local development.
37
+
38
+ ### From GitHub Packages
39
+
40
+ If the package is published to GitHub Packages and your registry is configured, install it globally and use the CLI directly:
41
+
42
+ ```bash
43
+ npm install -g @danielarndt0/brutils-cli
44
+ brutils --help
45
+ ```
46
+
47
+ ---
48
+
49
+ ## Quick Start
50
+
51
+ ```bash
52
+ brutils cpf generate --formatted
53
+ brutils cnpj validate 11.444.777/0001-61 --strict
54
+ brutils cep mask 86010190 --mask "###**-***"
55
+
56
+ brutils credit-card generate --brand visa --formatted
57
+ brutils credit-card detect 4111111111111111
58
+
59
+ brutils str slug --text "Hello Cool World"
60
+ brutils json format --value '{"name":"brutils","ok":true}' --sort-keys
61
+ brutils hash sha256 --text hello
62
+ brutils id token --length 24 --charset base64url
63
+ brutils date diff --from 2024-01-01T00:00:00Z --to 2024-01-03T00:00:00Z --unit days
64
+
65
+ brutils random-number int --min 1 --max 60 --count 6 --unique --sorted
66
+ brutils random-number pick --items "red,blue,green" --count 2
67
+ brutils number-picker run --min 1 --max 100 --seed 42
68
+
69
+ brutils zip create ./dist --out ./artifacts/dist.zip
70
+ brutils unzip extract ./artifacts/dist.zip --out ./restored
71
+ ```
72
+
73
+ Supported command aliases:
74
+
75
+ - `brutils card ...` for `brutils credit-card ...`
76
+ - `brutils rand ...` for `brutils random-number ...`
77
+ - `brutils zip run ...` for `brutils zip create ...`
78
+ - `brutils unzip run ...` for `brutils unzip extract ...`
79
+
80
+ ---
81
+
82
+ ## Built-in Help
83
+
84
+ The CLI includes root, module and action help.
85
+
86
+ ```bash
87
+ brutils --help
88
+ brutils cpf --help
89
+ brutils cpf generate --help
90
+ brutils str --help
91
+ brutils json format --help
92
+ brutils hash --help
93
+ brutils date diff --help
94
+ brutils zip create --help
95
+ ```
96
+
97
+ ---
98
+
99
+ ## Development
100
+
101
+ Brutils now exposes a single command surface to end users: `brutils`.
102
+
103
+ The `package.json` scripts are reserved for project development tasks:
104
+
105
+ ```bash
106
+ npm run build
107
+ npm run lint
108
+ npm run typecheck
109
+ npm run test:unit
110
+ npm run cli -- --help
111
+ ```
112
+
113
+ Examples while developing locally:
114
+
115
+ ```bash
116
+ npm run cli -- cpf generate --formatted
117
+ npm run cli -- json format --file ./package.json --sort-keys
118
+ npm run cli -- zip create ./dist --out ./artifacts/dist.zip
119
+ ```
120
+
121
+ ---
122
+
123
+ ## Documentation
124
+
125
+ - [CPF](docs/CPF.md)
126
+ - [CNPJ](docs/CNPJ.md)
127
+ - [CEP](docs/CEP.md)
128
+ - [Credit Card](docs/CREDIT_CARD.md)
129
+ - [STR](docs/STR.md)
130
+ - [JSON](docs/JSON.md)
131
+ - [Hash](docs/HASH.md)
132
+ - [ID](docs/ID.md)
133
+ - [Date](docs/DATE.md)
134
+ - [Random Number](docs/RANDOM_NUMBER.md)
135
+ - [Number Picker](docs/NUMBER_PICKER.md)
136
+ - [ZIP](docs/ZIP.md)
137
+ - [UNZIP](docs/UNZIP.md)
138
+
139
+ ---
140
+
141
+ ## Release Notes for 1.0.0
142
+
143
+ - `brutils` is now the single public interface for the toolkit
144
+ - legacy script entrypoints have been removed from the package surface
145
+ - documentation was consolidated around the CLI-first workflow
146
+ - the project version was promoted to `1.0.0`
package/dist/cli.d.ts ADDED
@@ -0,0 +1,2 @@
1
+
2
+ export { }