id = "ni" name = "ni" homepage = "https://github.com/antfu-collective/ni" description = "Use the right package manager." executables = ["ni", "nci", "nr", "nup", "nun", "nd", "nlx", "na"] [dotfiles] # README (antfu-collective/ni), "Config" section: the user-level config file is # ~/.nirc, an INI-style key=value file, and NI_CONFIG_FILE moves it elsewhere. # The binary list is the `bin` map of the published package.json — note that # `nu` is not one of them, that is Nushell. paths = ["~/.nirc"] exclude = [] # A .nirc names package managers and nothing else. No credentials. secret = [] # Read once per invocation; ni is a short-lived wrapper with no resident state. side_effect = false # No machine_lines: defaultAgent / globalAgent / runAgent / catalog are # preferences the user wants on every machine, not facts about one of them. [commands] format = 1 label = "Install packages" description = "ni / na-family install with the project package manager auto-detected. Other ni-family commands (nr, nun, nup) have their own forms." quality = "ai-draft" base = "fig:ni" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = true } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/ni.ts" license = "MIT" [[commands.field]] id = "packages" label = "Packages" type = "string" position = 0 multiple = true sources = ["fig"] [[commands.field]] id = "global" label = "Global" type = "boolean" option = ["-g"] sources = ["fig"] [[commands.field]] id = "dev" label = "Dev dependencies" type = "boolean" option = ["-D"] sources = ["fig"] [[commands.field]] id = "peer" label = "Peer dependencies" type = "boolean" option = ["-P"] sources = ["fig"] [[commands.field]] id = "optional" label = "Optional dependencies" type = "boolean" option = ["-O"] sources = ["fig"] [[commands.field]] id = "frozen" label = "Frozen lockfile" type = "boolean" option = ["--frozen"] sources = ["fig"] [[commands.field]] id = "cwd" label = "Run in directory" type = "path" option = ["-C"] path = { kind = "directory", role = "input" } sources = ["fig"] [[commands.task]] id = "add" label = "Add packages" fields = ["packages", "dev", "global"] required = ["packages"] [[commands.task]] id = "add-dev" label = "Add dev dependency" fields = ["packages"] required = ["packages"] set = { dev = [true] } [[commands.task]] id = "frozen" label = "Install frozen lockfile" fields = ["cwd"] required = [] set = { frozen = [true] } [[commands.group]] id = "basic" label = "Basic" fields = ["packages", "global", "dev", "frozen"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["peer", "optional", "cwd"]