{
  "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
    },
    "source": [
      {
        "id": "fig",
        "kind": "completion",
        "url": "https://github.com/withfig/autocomplete/blob/master/src/node.ts",
        "license": "MIT"
      }
    ],
    "field": [
      {
        "id": "script",
        "label": "Script",
        "type": "path",
        "position": 0,
        "path": {
          "kind": "file",
          "role": "input",
          "must_exist": true
        },
        "sources": [
          "fig"
        ]
      },
      {
        "id": "eval",
        "label": "Evaluate expression",
        "type": "string",
        "option": [
          "-e"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "print",
        "label": "Evaluate and print result",
        "type": "boolean",
        "option": [
          "--print",
          "-p"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "check",
        "label": "Syntax check only",
        "type": "boolean",
        "option": [
          "--check",
          "-c"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "watch",
        "label": "Restart on file changes",
        "type": "boolean",
        "option": [
          "--watch"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "env_file",
        "label": "Environment files",
        "type": "path",
        "option": [
          "--env-file"
        ],
        "multiple": true,
        "path": {
          "kind": "file",
          "role": "input",
          "must_exist": true
        },
        "sources": [
          "fig"
        ]
      },
      {
        "id": "interactive",
        "label": "Enter the REPL",
        "type": "boolean",
        "option": [
          "--interactive",
          "-i"
        ],
        "sources": [
          "fig"
        ]
      }
    ],
    "task": [
      {
        "id": "run",
        "label": "Run a script",
        "fields": [
          "script",
          "env_file"
        ],
        "required": [
          "script"
        ]
      },
      {
        "id": "watch",
        "label": "Run and restart on change",
        "set": {
          "watch": [
            true
          ]
        },
        "fields": [
          "script",
          "watch",
          "env_file"
        ],
        "required": [
          "script"
        ]
      },
      {
        "id": "check",
        "label": "Syntax check",
        "set": {
          "check": [
            true
          ]
        },
        "fields": [
          "script",
          "check"
        ],
        "required": [
          "script"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "script",
          "watch",
          "check",
          "eval",
          "print",
          "env_file"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "interactive"
        ]
      }
    ]
  }
}
