-
Notifications
You must be signed in to change notification settings - Fork 327
Description
Is your feature request related to a problem? Please describe.
I would like to use Volta to install tools from a git repository, such as github, gist, or any other git host. This is a feature that npm and npx support, and it would be useful for testing or using tools that are not published on npm.
Describe the solution you'd like
According to the npm documentation, npm can install packages from the following sources besides the npm registry:
- A folder containing a package.json file
npm install <folder>
- A gzipped tarball containing a folder with a package.json file
npm install <tarball file>
- A URL that resolves to a gzipped tarball
npm install <tarball url>
- A git remote URL that resolves to a folder with a package.json file
npm install <git remote url>
- A github username and repo name, with an optional commit-ish
npm install <githubname>/<githubrepo>[#<commit-ish>]npm install github:<githubname>/<githubrepo>[#<commit-ish>]
- A gist id, with an optional commit-ish
npm install gist:[<githubname>/]<gistID>[#<commit-ish>|#semver:<semver>]
- A bitbucket username and repo name, with an optional commit-ish
npm install bitbucket:<bitbucketname>/<bitbucketrepo>[#<commit-ish>]
- A gitlab username and repo name, with an optional commit-ish
npm install gitlab:<gitlabname>/<gitlabrepo>[#<commit-ish>]
I would like Volta to support the same syntax as npm and npx for installing tools from a git repo. For example:
volta install github:volta-cli/volta
volta install gist:user/11081aaa281
volta install gitlab:my-project/my-toolDescribe alternatives you've considered
I have tried cloning the git repo and installing the tool manually in the Volta tools directory, but this doesn't appear to work (I think) because the tool is not in the Volta registry. I have also tried using npm install -g to install the tool, but Volta isn't able to identify the tool from its package.json file when I do this.
Additional context
NPM and npx support installing tools from git repos, so it would be nice if Volta could support this as well. The documentation for npm which describes this feature is here: https://docs.npmjs.com/cli/v9/commands/npm-install#description