{
  "id": "elvish",
  "name": "Elvish",
  "homepage": "https://elv.sh/",
  "description": "Friendly and expressive shell",
  "executables": [
    "elvish"
  ],
  "dotfiles": {
    "paths": [
      "[configHome]/elvish/rc.elv",
      "%APPDATA%/elvish/rc.elv"
    ],
    "secret": [],
    "side_effect": false
  },
  "commands": {
    "format": 1,
    "label": "Run an Elvish script",
    "description": "Run an Elvish script file or a single code chunk non-interactively, or check it without executing. Daemon, language-server and logging flags are not covered.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": false,
      "short_attached": false,
      "short_bundles": false
    },
    "source": [
      {
        "id": "manual",
        "kind": "manual",
        "url": "https://elv.sh/ref/command.html",
        "revision": "2026-10-27",
        "evidence": "If the `-c` flag is given, the first argument is executed as a single code chunk.\nIf the `-c` flag is not given, the first argument is taken as a filename, and the content of the file is executed as a single code chunk.\nThe remaining arguments are put in `$args`.\n-   `-c`: Treat the first argument as code to execute, instead of name of file to execute.\n-   `-compileonly`: Parse and compile Elvish code without executing it.\n-   `-norc`: Don't read the RC file when running interactively.\n-   `-rc /path/to/rc`: Path to the RC file when running interactively.\n-   `-version`: Output the Elvish version and quit.\n"
      }
    ],
    "field": [
      {
        "id": "code",
        "label": "Run as code",
        "description": "Treat the script argument as code to execute instead of a filename.",
        "type": "boolean",
        "option": [
          "-c"
        ],
        "sources": [
          "manual"
        ]
      },
      {
        "id": "compile_only",
        "label": "Check only",
        "description": "Parse and compile without executing.",
        "type": "boolean",
        "option": [
          "-compileonly"
        ],
        "sources": [
          "manual"
        ]
      },
      {
        "id": "script",
        "label": "Script file or code",
        "type": "string",
        "position": 0,
        "sources": [
          "manual"
        ]
      },
      {
        "id": "args",
        "label": "Script arguments",
        "description": "Available to the script as $args.",
        "type": "string",
        "position": 1,
        "multiple": true,
        "sources": [
          "manual"
        ]
      },
      {
        "id": "norc",
        "label": "Skip RC file",
        "description": "Only applies when starting an interactive shell, so leave Script empty.",
        "type": "boolean",
        "option": [
          "-norc"
        ],
        "sources": [
          "manual"
        ]
      },
      {
        "id": "rc",
        "label": "RC file",
        "description": "Only applies when starting an interactive shell, so leave Script empty.",
        "type": "path",
        "option": [
          "-rc"
        ],
        "path": {
          "kind": "file",
          "role": "input"
        },
        "sources": [
          "manual"
        ]
      }
    ],
    "task": [
      {
        "id": "run_file",
        "label": "Run a script file",
        "fields": [
          "script",
          "args"
        ],
        "required": [
          "script"
        ]
      },
      {
        "id": "check_file",
        "label": "Check a script without running it",
        "fields": [
          "compile_only",
          "script"
        ],
        "required": [
          "compile_only",
          "script"
        ],
        "set": {
          "compile_only": [
            true
          ]
        }
      },
      {
        "id": "run_code",
        "label": "Run a code chunk",
        "fields": [
          "code",
          "script"
        ],
        "required": [
          "code",
          "script"
        ],
        "set": {
          "code": [
            true
          ]
        }
      },
      {
        "id": "try_rc",
        "label": "Try an interactive config",
        "fields": [
          "rc"
        ],
        "required": [
          "rc"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "code",
          "compile_only",
          "script",
          "args"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "norc",
          "rc"
        ]
      }
    ]
  }
}
