id = "nvm" name = "nvm" homepage = "https://github.com/nvm-sh/nvm" description = "Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions." icon = "SimpleIcons:nvm" executables = ["nvm"] platforms = ["macos", "linux"] [dotfiles] # README (nvm-sh/nvm): the snippet the installer appends to the shell profile # sets NVM_DIR to "${HOME}/.nvm", or "${XDG_CONFIG_HOME}/nvm" when that # variable is set — the second is [configHome], which is that variable rather # than a hard-coded ~/.config. Both locations are listed and the consumer keeps # the one that exists. # # Two things under NVM_DIR are written by the user rather than by nvm: # * default-packages — "add the package names, one per line, to the file # $NVM_DIR/default-packages" and nvm installs them into every new version. # * alias/ — one file per alias, each holding a version or another alias. # Everything else is nvm's own git checkout and the installed node versions. # # nvm-windows is a separate project with a different layout, hence platforms. paths = [ "~/.nvm/default-packages", "~/.nvm/alias/", "[configHome]/nvm/default-packages", "[configHome]/nvm/alias/", ] # README: the LTS aliases "stored under $NVM_DIR/alias/lts … are managed by # nvm, and you should not modify, remove, or create these files". nvm rewrites # them from nodejs.org on every connection. Both spellings of the directory # need the carve-out. exclude = [ "~/.nvm/alias/lts/", "[configHome]/nvm/alias/lts/", ] secret = [] # No machine_lines: an alias names a node version and default-packages names # npm packages. Neither is a fact about one machine — that is the point of # carrying them. [commands] format = 1 label = "nvm" description = "Install and switch Node.js versions. Only install, use and ls-remote are covered." quality = "ai-draft" base = "fig:nvm" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/nvm.ts" license = "MIT" [[commands.subcommand]] path = ["install"] label = "Install a Node version" description = "Download and install a version. Uses .nvmrc when no version is given." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/nvm.ts" license = "MIT" [[commands.subcommand.field]] id = "version" label = "Node version" description = "Version or alias such as node, an LTS name or a number. Leave empty to use .nvmrc." type = "string" position = 0 sources = ["fig"] [[commands.subcommand.field]] id = "lts" label = "LTS only" description = "Only select from long-term support versions." type = "boolean" option = ["--lts"] sources = ["fig"] [[commands.subcommand.field]] id = "reinstall_from" label = "Reinstall packages from" description = "Version whose global npm packages are reinstalled." type = "string" option = ["--reinstall-packages-from"] sources = ["fig"] [[commands.subcommand.field]] id = "latest_npm" label = "Upgrade npm" type = "boolean" option = ["--latest-npm"] sources = ["fig"] [[commands.subcommand.field]] id = "skip_default" label = "Skip default packages" type = "boolean" option = ["--skip-default-packages"] sources = ["fig"] [[commands.subcommand.field]] id = "no_progress" label = "No progress bar" type = "boolean" option = ["--no-progress"] sources = ["fig"] [[commands.subcommand.field]] id = "alias" label = "Alias" description = "Alias to set for the installed version." type = "string" option = ["--alias"] sources = ["fig"] [[commands.subcommand.field]] id = "default" label = "Set as default" type = "boolean" option = ["--default"] sources = ["fig"] [[commands.subcommand.task]] id = "install" label = "Install a version" fields = ["version", "lts", "latest_npm", "default"] required = [] [[commands.subcommand.task]] id = "install-lts" label = "Install latest LTS" fields = ["latest_npm", "default"] required = ["lts"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["version", "lts", "latest_npm", "default"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["reinstall_from", "skip_default", "no_progress", "alias"] [[commands.subcommand]] path = ["use"] label = "Use a Node version" description = "Modify PATH to use a version in this shell." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/nvm.ts" license = "MIT" [[commands.subcommand.field]] id = "version" label = "Node version" description = "Version or alias such as node, an LTS name or a number. Leave empty to use .nvmrc." type = "string" position = 0 sources = ["fig"] [[commands.subcommand.field]] id = "lts" label = "LTS alias" description = "Use the lts/* alias." type = "boolean" option = ["--lts"] sources = ["fig"] [[commands.subcommand.field]] id = "silent" label = "Silent" type = "boolean" option = ["--silent"] sources = ["fig"] [[commands.subcommand.task]] id = "use" label = "Use a version" fields = ["version", "silent"] required = [] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["version", "lts", "silent"] [[commands.subcommand]] path = ["ls-remote"] label = "List remote versions" description = "List versions available for install." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/nvm.ts" license = "MIT" [[commands.subcommand.field]] id = "version" label = "Version filter" type = "string" position = 0 sources = ["fig"] [[commands.subcommand.field]] id = "lts" label = "LTS only" type = "boolean" option = ["--lts"] sources = ["fig"] [[commands.subcommand.field]] id = "no_colors" label = "No colors" type = "boolean" option = ["--no-colors"] sources = ["fig"] [[commands.subcommand.task]] id = "list" label = "List versions" fields = ["version", "lts"] required = [] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["version", "lts", "no_colors"]