id = "node" name = "Node.js" description = "JavaScript runtime built on V8." homepage = "https://nodejs.org" executables = ["node"] [commands] format = 1 label = "Run a script" description = "Run a script, evaluate an expression, or syntax-check a file. Arguments passed to the script itself are not offered." quality = "ai-draft" base = "fig:node" 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/node.ts" license = "MIT" [[commands.field]] id = "script" label = "Script" type = "path" position = 0 path = { kind = "file", role = "input", must_exist = true } sources = ["fig"] [[commands.field]] id = "eval" label = "Evaluate expression" type = "string" option = ["-e"] sources = ["fig"] [[commands.field]] id = "print" label = "Evaluate and print result" type = "boolean" option = ["--print", "-p"] sources = ["fig"] [[commands.field]] id = "check" label = "Syntax check only" type = "boolean" option = ["--check", "-c"] sources = ["fig"] [[commands.field]] id = "watch" label = "Restart on file changes" type = "boolean" option = ["--watch"] sources = ["fig"] [[commands.field]] id = "env_file" label = "Environment files" type = "path" option = ["--env-file"] multiple = true path = { kind = "file", role = "input", must_exist = true } sources = ["fig"] [[commands.field]] id = "interactive" label = "Enter the REPL" type = "boolean" option = ["--interactive", "-i"] sources = ["fig"] [[commands.task]] id = "run" label = "Run a script" fields = ["script", "env_file"] required = ["script"] [[commands.task]] id = "watch" label = "Run and restart on change" set = { watch = [true] } fields = ["script", "watch", "env_file"] required = ["script"] [[commands.task]] id = "check" label = "Syntax check" set = { check = [true] } fields = ["script", "check"] required = ["script"] [[commands.group]] id = "basic" label = "Basic" fields = ["script", "watch", "check", "eval", "print", "env_file"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["interactive"]