capivara

command module
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2026 License: MIT Imports: 4 Imported by: 0

README ΒΆ

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 ./...

Documentation ΒΆ

The Go Gopher

There is no documentation for this package.

Directories ΒΆ

Path Synopsis
Package assert provides high-performance, generic-based assertion functions for testing.
Package assert provides high-performance, generic-based assertion functions for testing.
Package runner provides functionality to execute and parse output from Go and Node.js test runs.
Package runner provides functionality to execute and parse output from Go and Node.js test runs.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL