deno --unstable install -An tools https://github.com/han-tyumi/tools/raw/master/mod.ts
All configuration file options are supported by the CLI and will override any options provided by the tool
global option.
The name of the tool configuration to use from a configuration file.
Shows help information for the tools CLI or a sub-command.
Installs a specified tool version.
If no version is provided, the latest downloaded version is used.
tools install --tool example 1.2.3
Whether to skip downloading a tool version if it is not found.
Downloads the specified tool versions.
tools download --tool example 1.0 2.0
Lists the downloaded tool versions.
tools list --tool example
Lists the latest downloaded tool version.
tools latest --tool example
Shows help information for the tools CLI or a sub-command.
tools help install
Outputs the bash or zsh completions to stdout.
# ~/.bashrc
source <(tools completions bash)
# ~/.zshrc
source <(tools completions zsh)
You can create a toolsrc
file within your home directory or the current working directory that is used to define configurations for each tool you wish to manage.
This file can be created using the following languages:
- TypeScript (
toolsrc.ts
) - JavaScript (
toolsrc.js
) - YAML (
toolsrc.yaml
ortoolsrc.yml
)
The filename format string to use. A %s
token will be replaced with the version to be downloaded/installed.
example:
filename: 'example-%s.tar.gz'
A function can also be provided when using TypeScript/JavaScript.
export const example: InstallerOptions = {
filename: (version) => `example-${version}.tar.gz`
}
The download URL format string to use. A %s
token will be replaced with the version to be downloaded/installed.
example:
downloadURL: 'https://example.com/releases/%s'
A function can also be provided when using TypeScript/JavaScript.
export const example: InstallerOptions = {
downloadURL: (version) => `https://example.com/releases/${version}`
}
The version format to use when installing/downloading tools.
#
's are used to denote version number places within a version string.
This enforces a consistent filename and download URL format.
It also allows you to shorten inputted version numbers by adding 0
's to the missing version number places as well as the suffix and/or prefix if present.
example:
versionFmt: 'v#.#.#' # 1.2 would become v1.2.0
The directory to store downloaded tool versions. This can be a relative or absolute path.
example:
downloadDir: 'downloads'
Whether or not previous tool version downloads should be used.
example:
cache: false
The relative or absolute path to a TypeScript/JavaScript file containing a default exported function used to install a downloaded tool version.
Named exports can be used by supplying the exported name after a #
at the end of the path.
This install function receives the path to the downloaded tool version as an argument.
example:
installFn: 'install.ts#install'
Alternatively the install function can be provided itself when using a TypeScript/JavaScript configuration file.
export const example: InstallerOptions = {
installFn: (filepath) => {
// perform installation
}
}
Coming Soon