Files
iris-context/commands/ops/fnm.go
T
VERSE ebde9ba68f refactor(commands): separate commands and its core into two folders (#32)
- I think it would be better if one for commands only, one for the spec
handling core logic so people won't be confused by the core logic inside
the commands folder (cleaner I guess)
- Regen docs
2026-07-05 11:27:30 +07:00

41 lines
2.0 KiB
Go

package ops
import (
"github.com/versenilvis/iris/spec"
)
func init() {
spec.Register(&spec.Spec{
Name: "fnm",
Description: "Fast and simple Node.js version manager",
Subcommands: []spec.Subcommand{
{Name: "install", Description: "Install a new Node.js version"},
{Name: "uninstall", Description: "Uninstall a Node.js version"},
{Name: "use", Description: "Change Node.js version"},
{Name: "exec", Description: "Run a command within fnm context"},
{Name: "current", Description: "Print the current Node.js version"},
{Name: "list", Description: "List all locally installed Node.js versions"},
{Name: "list-remote", Description: "List all remote Node.js versions"},
{Name: "alias", Description: "Alias a version to a common name"},
{Name: "name", Description: "Alias name"},
{Name: "unalias", Description: "Deletes the alias named <name>"},
{Name: "requested-alias", Description: "Alias name"},
{Name: "completions", Description: "Print shell completions to stdout"},
{Name: "env", Description: "Print and set up required environment variables for fnm"},
{Name: "help", Description: "Prints the help page or the help of the given subcommand(s)"},
},
Options: []spec.Option{
{Name: "--lts", Description: "Install latest LTS"},
{Name: "--install-if-missing", Description: "Install the version if it isn't installed yet"},
{Name: "--help", Description: "Prints help information"},
{Name: "--version", Description: "Prints version information"},
{Name: "--arch", Description: "The root directory of fnm installations"},
{Name: "--log-level", Description: "The log level of fnm commands"},
{Name: "--node-dist-mirror", Description: "Mirror of https://nodejs.org/dist"},
{Name: "--version-file-strategy", Description: "Strategy for how to resolve the Node version"},
{Name: "--using", Description: "Either an explicit version, or a filename with the version written in it"},
{Name: "--use-on-cd", Description: "Print the script to change Node versions every directory change"},
},
})
}