Capivara
β‘ Quick Install (No Root Required)
You can easily install Capivara globally for your user without needing administrative or root privileges. The scripts below will download the source, build the binary, and place it in your local user directory (~/.local/bin).
Note: Ensure you have Go and Git installed on your system to build Capivara. To execute tests, you will also need Go and/or Node.js installed on your machine depending on your project.
π macOS and π§ Linux
Open your terminal and run the following command to download and execute the install script:
curl -fsSL https://raw.githubusercontent.com/atendi9/capivara/main/install.sh | bash
πͺ Windows
Open PowerShell and run the following command:
Invoke-RestMethod -Uri https://raw.githubusercontent.com/atendi9/capivara/main/install.ps1 | Invoke-Expression
π Usage
Capivara is a smart test runner wrapper that automatically detects your project's language based on the presence of a go.mod (Go) or package.json (Node.js) file. It wraps around standard testing commands (go test and node --test) to provide a cleaner, localized output. By default, the output is in English.
To run your tests with Capivara, navigate to your project's root directory and run:
For Go projects:
capivara ./...
(Any standard go test flags can still be passed alongside it!)
For Node.js projects:
capivara
β‘ Incremental modes (run only what matters)
Capivara can speed up your TDD loop by running only the tests that need attention:
Rerun only the tests that failed last time β after any run, Capivara records the failing tests in .capivara/last-fail.json. Rerun just those with:
capivara --rerun-failed
If nothing failed previously, it falls back to the full suite. Works for Go (-run) and Node.js (--test-name-pattern).
Run only the packages you changed β uses git diff (tracked changes plus untracked files) to detect touched Go packages and tests only those:
capivara --changed
You can combine both to rerun failing tests within the changed packages:
capivara --changed --rerun-failed
--changed currently applies to Go projects; the Node.js path falls back to the full suite.
π§π· Portuguese Output
If you prefer to see the test results and error messages in Portuguese, you can use the --lang=portuguese flag:
capivara --lang=portuguese ./...
π·πΊ Russian Output
If you prefer to see the test results and error messages in Russian, you can use the --lang=russian flag:
capivara --lang=russian ./...
π―π΅ Japanese Output
If you prefer to see the test results and error messages in Japanese, you can use the --lang=japanese flag:
capivara --lang=japanese ./...
π¨π³ Chinese Output
If you prefer to see the test results and error messages in Chinese, you can use the --lang=chinese flag:
capivara --lang=chinese ./...