2025-07-24 08:47:00
github.com
vet
is a command-line tool that acts as a safety net for the common but risky curl | bash
pattern. It lets you inspect remote scripts for changes, run them through a linter, and require your explicit approval before they can execute.
Don’t just run it, vet
it.
We’ve all seen this pattern for installing software:
# This is convenient, but you're blindly trusting the remote script.
curl -sSL https://example.com/install.sh | bash
This is dangerous. The script could be malicious, the server could be compromised, or a transient network error could result in executing a partial script.
vet
wraps this process in a secure, interactive workflow:
-
Fetch: It downloads the remote script to a temporary location.
-
Diff & Review: It shows you what, if anything, has changed since the last time you ran this script.
-
Lint: If you have shellcheck installed, it automatically analyzes the script for potential bugs or malicious patterns.
-
Confirm: It prompts you for explicit approval before executing anything.
# The new, safer way.
vet https://example.com/install.sh
We believe you should never blindly trust a script from the internet—not even ours. That’s why vet
exists. The installation process itself is a perfect demonstration of the problem vet
solves.
The easiest and recommended way to install vet
is via Homebrew.
# First, tap the official repository
brew tap vet-run/vet
# Now, install the formula
brew install vet-run
Note: The formula is named vet-run
to avoid a conflict with another tool in the Homebrew ecosystem, but this command will correctly install the vet
executable on your system.
If you don’t use Homebrew, or if you simply wish to follow the security-first principle that vet
champions, you can perform a manual installation. This is the two-step “Download, then Review” process that demonstrates exactly what vet
automates for you.
- Download the installer:
Choose one of the following sources. The first is the official project domain, and the second is a direct link to the GitHub release asset.
Option A: Official project domain
curl -o install_vet.sh https://getvet.sh/install.sh
Option B: Direct GitHub Release Link
curl -L -o install_vet.sh https://github.com/vet-run/vet/releases/latest/download/install.sh
- Review the installer’s code. Open it in a text editor or use less to ensure it’s not doing anything suspicious. It’s a simple script that downloads the correct vet script and moves it to /usr/local/bin.
- Run the installer you just vetted:
Congratulations! You just manually performed the process that vet will now automate for you.
# This is the curl-to-bash pattern.
# Don't actually do this. That's the whole point.
curl -sL https://getvet.sh/install.sh | bash
# Basic usage
vet URL>
# Example with a real-world installer
vet https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh
# Pass arguments to the remote script
# All arguments after the URL are passed directly to the script.
vet https://example.com/setup.sh --user myuser --version latest
# Non-interactive mode for trusted scripts in automated environments (e.g., CI/CD)
vet --force https://my-trusted-internal-script.sh
-f, –force
Skip all interactive prompts and execute immediately. Use with caution.
-h, –help
Display the help message.
vet
is intentionally written to leverage modern bash features (arrays, [[ … ]], pipefail). We believe that for a security-focused tool, sacrificing robustness and readability for POSIX sh compatibility would be a dangerous trade-off.
The safety features provided by modern bash are non-negotiable for vet
‘s mission.
If you are in a minimal environment (like an Alpine container), please install bash as an explicit dependency:
Contributions are welcome! If you have an idea for a new feature or have found a bug, please open an issue. For pull requests, please ensure that your changes are covered by tests.
-
Fork the repository.
-
Create a new feature branch (git checkout -b feature/my-amazing-feature).
-
Make your changes.
-
Run the tests (bats tests/).
-
Commit your changes (git commit -am ‘Add some amazing feature’).
-
Push to the branch (git push origin feature/my-amazing-feature).
-
Open a new Pull Request.
This project is made better by its contributors. See our Contributors file to recognize those who have helped shape vet
.
This project is licensed under the MIT License – see the LICENSE file for details.
Keep your files stored safely and securely with the SanDisk 2TB Extreme Portable SSD. With over 69,505 ratings and an impressive 4.6 out of 5 stars, this product has been purchased over 8K+ times in the past month. At only $129.99, this Amazon’s Choice product is a must-have for secure file storage.
Help keep private content private with the included password protection featuring 256-bit AES hardware encryption. Order now for just $129.99 on Amazon!
Help Power Techcratic’s Future – Scan To Support
If Techcratic’s content and insights have helped you, consider giving back by supporting the platform with crypto. Every contribution makes a difference, whether it’s for high-quality content, server maintenance, or future updates. Techcratic is constantly evolving, and your support helps drive that progress.
As a solo operator who wears all the hats, creating content, managing the tech, and running the site, your support allows me to stay focused on delivering valuable resources. Your support keeps everything running smoothly and enables me to continue creating the content you love. I’m deeply grateful for your support, it truly means the world to me! Thank you!
BITCOIN bc1qlszw7elx2qahjwvaryh0tkgg8y68enw30gpvge Scan the QR code with your crypto wallet app |
DOGECOIN D64GwvvYQxFXYyan3oQCrmWfidf6T3JpBA Scan the QR code with your crypto wallet app |
ETHEREUM 0xe9BC980DF3d985730dA827996B43E4A62CCBAA7a Scan the QR code with your crypto wallet app |
Please read the Privacy and Security Disclaimer on how Techcratic handles your support.
Disclaimer: As an Amazon Associate, Techcratic may earn from qualifying purchases.