{
  "id": "erlang",
  "name": "Erlang/OTP",
  "homepage": "https://www.erlang.org",
  "description": "A programming language used to build massively scalable soft real-time systems.",
  "executables": [
    "erl",
    "erlc"
  ],
  "dotfiles": {
    "paths": [
      "~/.erlang"
    ],
    "exclude": [],
    "secret": [],
    "side_effect": false
  },
  "commands": {
    "format": 1,
    "label": "Start the Erlang shell",
    "description": "Start an Erlang/OTP runtime (erl): run an expression, set the code path, or start or attach to a distributed node. Compiling with erlc and emulator (+) flags are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": false,
      "short_attached": false,
      "short_bundles": false
    },
    "source": [
      {
        "id": "docs",
        "kind": "manual",
        "url": "https://www.erlang.org/doc/apps/erts/erl_cmd.html",
        "revision": "OTP 29.1",
        "evidence": "erl documentation, https://www.erlang.org/doc/apps/erts/erl_cmd.html (the form drives erl; erlc is not covered)\n-eval Expr (init flag) - Makes init evaluate the expression Expr\n-noshell - Starts an Erlang runtime system with no shell.\n-noinput - Ensures that the Erlang runtime system never tries to read any input. Implies -noshell.\n-name Name - Makes the Erlang runtime system into a distributed node. The node name will be Name@Host. For short names, use flag -sname instead.\n-setcookie Cookie - Sets the magic cookie of the node to Cookie\n-pa Dir1 Dir2 ... - Adds the specified directories to the beginning of the code path\n-pz Dir1 Dir2 ... - Adds the specified directories to the end of the code path\n-remsh Node - Starts Erlang with a remote shell connected to Node.\n-detached - Starts the Erlang runtime system detached from the system console.\n-hidden - Starts the Erlang runtime system as a hidden node\n-boot File - Specifies the name of the boot file\n-config Config\n-s Mod [Func [Arg1, Arg2, ...]] (init flag) - Makes init call the specified function.\n-sname arnie +S 2 -s my_init -extra +bertie\n"
      }
    ],
    "field": [
      {
        "id": "sname",
        "label": "Short node name",
        "description": "Start a distributed node with a short name.",
        "type": "string",
        "option": [
          "-sname"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "name",
        "label": "Long node name",
        "description": "Start a distributed node named Name@Host.",
        "type": "string",
        "option": [
          "-name"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "setcookie",
        "label": "Cookie",
        "type": "string",
        "option": [
          "-setcookie"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "remsh",
        "label": "Remote shell to node",
        "description": "Connect a remote shell to this node, for example node@host.",
        "type": "string",
        "option": [
          "-remsh"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "eval",
        "label": "Evaluate expression",
        "description": "Erlang expression to evaluate at startup, for example io:format(\"hi~n\").",
        "type": "string",
        "option": [
          "-eval"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "noshell",
        "label": "No shell",
        "description": "Run without an interactive shell, for scripts and pipes.",
        "type": "boolean",
        "option": [
          "-noshell"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "noinput",
        "label": "No input",
        "type": "boolean",
        "option": [
          "-noinput"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "pa",
        "label": "Prepend code path",
        "type": "path",
        "option": [
          "-pa"
        ],
        "path": {
          "kind": "directory",
          "role": "input",
          "must_exist": true
        },
        "sources": [
          "docs"
        ]
      },
      {
        "id": "pz",
        "label": "Append code path",
        "type": "path",
        "option": [
          "-pz"
        ],
        "path": {
          "kind": "directory",
          "role": "input",
          "must_exist": true
        },
        "sources": [
          "docs"
        ]
      },
      {
        "id": "boot",
        "label": "Boot file",
        "type": "string",
        "option": [
          "-boot"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "config",
        "label": "Config file",
        "description": "Config file name without the .config extension.",
        "type": "string",
        "option": [
          "-config"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "hidden",
        "label": "Hidden node",
        "type": "boolean",
        "option": [
          "-hidden"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "detached",
        "label": "Run detached",
        "type": "boolean",
        "option": [
          "-detached"
        ],
        "sources": [
          "docs"
        ]
      }
    ],
    "task": [
      {
        "id": "shell",
        "label": "Start a shell with code path",
        "fields": [
          "pa",
          "sname",
          "setcookie"
        ]
      },
      {
        "id": "script",
        "label": "Run an expression and exit",
        "fields": [
          "eval",
          "noshell",
          "pa"
        ],
        "required": [
          "eval"
        ],
        "set": {
          "noshell": [
            true
          ]
        }
      },
      {
        "id": "remote",
        "label": "Attach to a running node",
        "fields": [
          "remsh",
          "sname",
          "setcookie"
        ],
        "required": [
          "remsh"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "sname",
          "name",
          "setcookie",
          "remsh",
          "eval",
          "noshell",
          "pa"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "noinput",
          "pz",
          "boot",
          "config",
          "hidden",
          "detached"
        ]
      }
    ]
  }
}
