Random Brazil is an extension for Visual Studio Code (and other compatible IDEs) that allows you to generate and validate Brazilian document data such as CPF, CNPJ, CNH, among others. It is ideal for developers who need fictional data for testing or validating information in their applications.
en-US pt-BR
-
✨ Data Generation
Quickly and easily generate valid Brazilian data, such as CPF, CNPJ, and CNH. -
🔍 Data Validation
Check if CPFs, CNPJs and other documents directly in the editor are valid. -
🖥️ Intuitive Interface
The extension integrates with VSCode, providing a smooth and efficient experience in your workflow.
- Open Visual Studio Code.
- Go to the extensions tab (
Ctrl/Cmd+Shift+X
). - Search for
Random Brazil
. - Click on Install.
Run the following command in the terminal:
code --install-extension nedcloarbr.random-brazil
After installation, use the extension directly from the sidebar or via commands available in the command palette (Ctrl/Cmd+Shift+P
).
-
Generate a valid CPF
Run the command:
Random Brazil: Generate CPF
The CPF will be automatically inserted at the cursor's position in the code. -
Validate a CPF
Run the command:
Random Brazil: Validate CPF
Enter the CPF. A notification will appear indicating whether the CPF is valid or not.
Setting | Description | Possible values |
---|---|---|
enable |
Enable or Disable the extension | true /false |
punctuation |
Enable, Disable or Ask whether the document will be generated with punctuation | enable /disable /ask |
notification |
Enable or Disable the notifications. If Disabled the checking commands will not work correctly | true /false |
Contributions are welcome! To help improve the project, follow these steps:
- Fork the repository.
- Create a branch for your feature or fix:
git checkout -b feat/new-feature
- Commit your changes:
git commit -am 'Added my feature'
- Push to the branch:
git push origin feat/new-feature
- Open a Pull Request.
To facilitate README updates or language changes, consider structuring your README files into separate versions (e.g., README.en.md
and README.pt.md
) and referencing them as needed in the repository.
- Inspired by the extension Random Everything.
- Uses the validation-br package for validating Brazilian data.
This project is licensed under the MIT license. For more details, see the LICENSE file.