cargonode is a Rust-based CLI that simplifies Node.js development by consolidating common tooling under a single executable. It serves as a wrapper around key utilities for building, testing, formatting, linting, and releasing your projects.
- High Performance
Written in Rust, cargonode offers fast execution and low overhead. - Centralized Commands
Replaces multiple shell scripts or separate binary invocations with a single CLI. - Flexible Customization
Allows swapping out default commands or adding custom prechecks. - Cross-Platform Compatibility
Runs on macOS (Intel and ARM), Linux (x64, ARM), and Windows (x64, ARM).
- Node.js ≥ 20.11.0
Needed for the underlying tools (Biome, Tsup, Vitest, Release-It). - Rust ≥ 1.80
Required for installation from source or cargo. Binary releases do not require a Rust compiler on the end-user machine.
- macOS (x64, ARM)
- Linux (x64, ARM)
- Windows (x64, ARM)
Choose the option that fits your environment:
-
Shell Installer (Linux)
curl -fsSL https://raw.githubusercontent.com/xosnrdev/cargonode/master/install_cargonode.sh | bash
Downloads the latest release from GitHub and installs locally, typically in
~/.local/bin
. -
Homebrew (macOS)
brew install xosnrdev/cargonode/cargonode
Recommended if you prefer managing software through Homebrew on macOS.
-
Nix (nixOS)
nix-env -iA nixpkgs.cargonode
See nixpkgs for additional details.
-
Cargo (Rust)
cargo install cargonode
Installs the executable from source via the Rust package manager.
Below are common commands. Each command calls an underlying tool with sensible defaults:
# Create a new project
cargonode new my-app
# Convert an existing Node.js project
cargonode init
# Build using tsup by default
cargonode build
# Test using vitest
cargonode test
# Format code with biome
cargonode fmt
# Lint/check code with biome
cargonode check
# Release with release-it
cargonode release
Any extra flags provided after the subcommand go directly to the underlying tool:
# Calls 'vitest run'
cargonode test run
# Calls 'biome check --fix'
cargonode check --fix
To see available flags, run:
cargonode --help
cargonode build --help
By default, cargonode uses several best-practice settings, but it can be customized through a cargonode.toml
in your project root. For instance:
[commands.format]
command = "eslint"
args = ["--fix"]
[commands.release]
prechecks = ["test", "build"]
In this example, eslint
replaces biome for the format
command, and prechecks
ensures tests and builds run before any release process.
- Command-line arguments
- Project configuration in
cargonode.toml
- Built-in defaults
See the Template Reference for additional examples.
For issues, feature requests, or general feedback, visit the GitHub Issues page. Contributions are welcome, whether in the form of bug reports, pull requests, or suggestions.
This project is available under a dual license: MIT or Apache-2.0. Choose whichever license works best for your project or organization.