### Install Volta with Setup Skipped Source: https://docs.volta.sh/advanced/installers Executes the Volta installation script while bypassing the automatic profile script modifications performed by volta setup. ```bash curl https://get.volta.sh | bash -s -- --skip-setup ``` -------------------------------- ### Volta Install Command Source: https://docs.volta.sh/reference Details on how to install tools using the `volta install` command. ```APIDOC ## POST /install ### Description Installs a specified tool (e.g., Node.js version, npm, yarn) into your Volta toolchain. This command makes the tool available for use in your projects. ### Method `POST` ### Endpoint `/install` ### Parameters #### Query Parameters - **tool_name** (string) - Required - The name of the tool to install (e.g., `node@18`, `yarn`). ### Request Example ```json { "tool_name": "node@20" } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message indicating successful installation. #### Response Example ```json { "message": "Node.js v20.10.0 installed successfully." } ``` ``` -------------------------------- ### GET volta list Source: https://docs.volta.sh/reference/list Lists installed Node runtimes, package managers, and packages with binaries. ```APIDOC ## GET volta list ### Description Inspects your installed Node runtimes, package managers, and packages with binaries. ### Method GET ### Endpoint volta list [tool] ### Parameters #### Path Parameters - **tool** (string) - Optional - The specific tool to lookup: 'all', 'node', 'yarn', or the name of a package/binary. #### Query Parameters - **--current, -c** (flag) - Optional - Show the currently-active tool(s). - **--default, -d** (flag) - Optional - Show your default tool(s). - **--format** (string) - Optional - Specify the output format. Possible values: human, plain. - **--verbose** (flag) - Optional - Enables verbose diagnostics. - **--quiet** (flag) - Optional - Prevents unnecessary output. ### Request Example volta list --current ### Response #### Success Response (200) - **output** (string) - A formatted list of the requested toolchain components. #### Response Example { "node": "18.16.0", "yarn": "1.22.19" } ``` -------------------------------- ### Install Local Volta Builds with Helper Scripts Source: https://docs.volta.sh/contributing Installs a locally compiled version of Volta using provided shell scripts. Supports both development and release builds. ```bash ./dev/unix/volta-install.sh --dev ``` ```bash ./dev/unix/volta-install.sh --release ``` -------------------------------- ### CLI Command: volta setup Source: https://docs.volta.sh/reference/setup Configures the shell environment to enable Volta by updating PATH variables. ```APIDOC ## CLI COMMAND: volta setup ### Description The `volta setup` command enables Volta by modifying the `PATH` environment variable for the current user to include the Volta shim directory. On Unix, it updates shell profile scripts, while on Windows, it modifies the User Path environment variable. ### Syntax `volta setup [FLAGS]` ### Flags - **--verbose** (flag) - Optional - Enables verbose diagnostics. - **--quiet** (flag) - Optional - Prevents unnecessary output. - **-h, --help** (flag) - Optional - Prints help information. ### Platform Behavior #### Unix Searches for and modifies profile scripts including `~/.profile`, `~/.bash_profile`, `~/.bashrc`, `~/.zshrc`, and `~/.config/fish/config.fish` to define `VOLTA_HOME` and update `PATH`. #### Windows Modifies the User `Path` environment variable to include `%LOCALAPPDATA%\Volta\bin`. ### Example `volta setup --verbose` ``` -------------------------------- ### Install global package binaries Source: https://docs.volta.sh/guide/index Installs a global npm package as a command-line tool. Volta manages these tools independently, ensuring they remain stable and pinned to a specific Node engine. ```bash npm install -g surge surge -h ``` -------------------------------- ### Install Specific Older Versions of Volta Source: https://docs.volta.sh/advanced/installers Downloads and executes a specific version of the Volta installation script on Unix systems. Replace the version number as needed. ```bash curl https://raw.githubusercontent.com/volta-cli/volta/8f2074f423c65405dfba9858d9bcf393c38ffb45/dev/unix/volta-install.sh | bash -s -- --version 1.0.8 ``` -------------------------------- ### Install Global Package Binaries Source: https://docs.volta.sh/guide/understanding Installing packages globally with npm or yarn adds their binaries to the Volta toolchain. Volta pins these tools to the current engine version to prevent unexpected changes. ```bash yarn global add vuepress npm install --global typescript ``` -------------------------------- ### Install specific Node.js version with Volta Source: https://docs.volta.sh/guide/index Fetches and installs a specific version of the Node.js engine for immediate use. This command ensures the requested version is available in your development environment. ```bash volta install node@22 ``` -------------------------------- ### Volta List Command Source: https://docs.volta.sh/reference Details on how to view the currently installed tools and their versions with `volta list`. ```APIDOC ## GET /list ### Description Displays a list of all tools currently installed in your Volta toolchain, along with their versions and whether they are globally available or pinned to specific projects. ### Method `GET` ### Endpoint `/list` ### Response #### Success Response (200) - **tools** (array) - A list of installed tools, each with properties like `name`, `version`, and `type` (e.g., 'global', 'pinned'). #### Response Example ```json { "tools": [ { "name": "node", "version": "v20.10.0", "type": "global" }, { "name": "yarn", "version": "1.22.19", "type": "pinned" } ] } ``` ``` -------------------------------- ### Install Node.js Versions with Volta Source: https://docs.volta.sh/guide/understanding Commands to set the default Node.js version in your Volta toolchain. You can specify exact versions, major versions, or the latest LTS release. ```bash volta install node@22.5.1 volta install node@22 volta install node ``` -------------------------------- ### Volta CLI Overview Source: https://docs.volta.sh/reference Provides a general overview of the Volta CLI syntax and available commands. ```APIDOC ## Volta CLI Overview ### Description The Volta command-line interface (CLI) is used to manage your JavaScript toolchain, including runtimes and package managers. It provides commands for installing, pinning, and listing tools. ### Usage `volta [FLAGS] [SUBCOMMAND]` ### Flags - `--verbose` (boolean) - Enables verbose diagnostics. - `--quiet` (boolean) - Prevents unnecessary output. - `-v, --version` (boolean) - Prints the current version of Volta. - `-h, --help` (boolean) - Prints help information. ### Subcommands - `fetch` - Fetches a tool to the local machine. - `install` - Installs a tool in your toolchain. - `uninstall` - Uninstalls a tool from your toolchain. - `pin` - Pins your project's runtime or package manager. - `list` - Displays the current toolchain. - `completions` - Generates Volta completions. - `which` - Locates the actual binary that will be called by Volta. - `setup` - Enables Volta for the current user / shell. - `help` - Prints this message or the help of the given subcommand(s). ``` -------------------------------- ### Extend Volta Configuration in package.json Source: https://docs.volta.sh/advanced/workspaces Demonstrates how to use the 'extends' key within the 'volta' section of a package.json file to inherit settings from a parent configuration. This allows for centralized management of Node.js and other tool versions across multiple projects in a workspace. ```json { "volta": { "node": "12.16.1", "yarn": "1.22.4" } } ``` ```json { "volta": { "extends": "../../package.json" } } ``` -------------------------------- ### Build Volta from Source using Cargo Source: https://docs.volta.sh/contributing Compiles the Volta project from its source code using the Cargo build tool. This is a fundamental step for developers working on the project. ```bash cargo build ``` -------------------------------- ### Run Volta Tests with Mock Network Feature Source: https://docs.volta.sh/contributing Executes all tests within the Volta repository, including those that utilize the 'mock-network' feature for isolated testing scenarios. ```bash cargo test --all --features mock-network ``` -------------------------------- ### Format Volta Codebase with rustfmt Source: https://docs.volta.sh/contributing Ensures consistent code style by applying Rust's official rustfmt tool. This command should be run before submitting pull requests. ```bash rustup component add rustfmt ``` ```bash cargo fmt --all ``` -------------------------------- ### CLI Command: volta completions Source: https://docs.volta.sh/reference/completions Generates shell completion scripts for Volta, allowing users to enable auto-completion in their terminal. ```APIDOC ## CLI COMMAND: volta completions ### Description Generates command completion information for your shell. By default, it detects the current shell, but it can be explicitly set via arguments. ### Method CLI Execution ### Endpoint volta completions [FLAGS] [OPTIONS] ### Parameters #### Path Parameters - **shell** (string) - Required - The shell to generate completions for. Possible values: zsh, bash, fish, powershell, elvish. #### Flags - **-f, --force** (boolean) - Optional - Write over an existing file if it exists. - **--verbose** (boolean) - Optional - Enables verbose diagnostics. - **--quiet** (boolean) - Optional - Prevents unnecessary output. - **-h, --help** (boolean) - Optional - Prints help information. #### Options - **-o, --output** (string) - Optional - The file path to write the generated completions to. If omitted, output is sent to stdout. ### Request Example volta completions bash --output ~/.bash_completion ### Response #### Success Response (stdout) - **output** (string) - The generated shell script content printed to the console or saved to the specified file. ``` -------------------------------- ### Define Volta download hooks in hooks.json Source: https://docs.volta.sh/advanced/hooks This JSON configuration demonstrates how to override default download URLs for Node, npm, and Yarn. It utilizes prefix, bin, and template hooks to redirect Volta to custom internal registries or mirrors. ```json { "node": { "index": { "bin": "/usr/local/node-lookup" }, "latest": { "prefix": "http://example.com/node/" }, "distro": { "template": "http://example.com/{{os}}/{{arch}}/node-{{version}}.tar.gz" } }, "npm": { "index": { "prefix": "http://example.com/npm/" }, "latest": { "bin": "~/npm-latest" }, "distro": { "template": "http://example.com/npm/npm-{{version}}.tgz" } }, "yarn": { "index": { "template": "http://example.com/yarn/{{os}}/{{arch}}/yarn-{{version}}.tgz" }, "latest": { "prefix": "http://example.com/yarnpkg/" }, "distro": { "bin": "~/yarn-distro" } } } ``` -------------------------------- ### CLI Command: volta pin Source: https://docs.volta.sh/reference/pin Pins a specific version of a tool (Node or package manager) to the project's package.json file. ```APIDOC ## CLI COMMAND: volta pin ### Description The `volta pin` command updates the project's `package.json` to enforce a specific version of a tool, such as Node.js, npm, or Yarn. This ensures all project contributors use the same runtime environment. ### Method CLI Execution ### Endpoint volta pin [FLAGS] ... ### Parameters #### Flags - **--verbose** (boolean) - Optional - Enables verbose diagnostics. - **--quiet** (boolean) - Optional - Prevents unnecessary output. - **-h, --help** (boolean) - Optional - Prints help information. #### Arguments - **tool[@version]** (string) - Required - The tool name and optional version string (e.g., node@lts, yarn@^1.14). ### Request Example volta pin node@18.16.0 yarn@1.22.19 ### Response #### Success Response - **Status** (string) - Updates the "volta" field in package.json with the specified versions. #### Response Example { "message": "Pinned node@18.16.0 and yarn@1.22.19 to package.json" } ``` -------------------------------- ### Pin Node.js version to project Source: https://docs.volta.sh/guide/index Sets the Node.js engine version for the current project by updating the package.json file. This ensures all collaborators use the same version automatically when working within the project directory. ```bash volta pin node@20 ``` -------------------------------- ### Pin Project Tooling Versions Source: https://docs.volta.sh/guide/understanding Use the volta pin command to lock specific versions of Node.js and package managers to a project. This configuration is saved in package.json to ensure consistency across development environments. ```bash volta pin node@20.16 volta pin yarn@1.19 ``` ```json "volta": { "node": "20.16.0", "yarn": "1.19.2" } ``` -------------------------------- ### CLI Command: volta uninstall Source: https://docs.volta.sh/reference/uninstall Removes a specified tool or global package from the Volta-managed toolchain. ```APIDOC ## CLI COMMAND: volta uninstall ### Description The `volta uninstall` command removes a tool or package from your Volta-managed toolchain. As of version 0.9.0, users may also use standard package managers like `npm` or `yarn` for this purpose. ### Method CLI Execution ### Endpoint volta uninstall [FLAGS] ### Parameters #### Path Parameters - **tool** (string) - Required - The name of the tool or package to uninstall (e.g., node, npm, yarn). #### Flags - **--verbose** (boolean) - Optional - Enables verbose diagnostics. - **--quiet** (boolean) - Optional - Prevents unnecessary output. - **-h, --help** (boolean) - Optional - Prints help information. ### Request Example volta uninstall node ### Response #### Success Response (Exit Code 0) - **status** (string) - Confirmation message indicating the tool has been removed successfully. #### Response Example Successfully uninstalled node. ``` -------------------------------- ### Uninstall a tool using Volta CLI Source: https://docs.volta.sh/reference/uninstall This command removes a specified tool or package from the Volta toolchain. It supports optional flags like --verbose for diagnostics or --quiet to suppress output. ```bash volta uninstall # Example: volta uninstall node volta uninstall --verbose yarn ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.