{
  "id": "chawan",
  "name": "Chawan",
  "homepage": "https://chawan.net/",
  "description": "A web browser for your terminal.",
  "executables": [
    "cha"
  ],
  "dotfiles": {
    "paths": [
      "[configHome]/chawan/config.toml",
      "~/.chawan/config.toml"
    ],
    "secret": []
  },
  "commands": {
    "format": 1,
    "label": "Open page",
    "description": "Open URLs or files in Chawan, or dump them to stdout. Configuration overrides (-o), JavaScript (-r) and stylesheet injection are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": false,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "man",
        "kind": "manual",
        "url": "https://manpages.debian.org/unstable/chawan/cha.1.en.html",
        "revision": "0.5.1-1",
        "evidence": "cha [options] [URL(s) or file(s)...]\n-d, --dump  Start in headless mode, and sequentially print the opened files to stdout.\n-C, --config file  Override the default configuration search path.\n-I, --input-charset charset  Override the character set of all input files.\n-M, --monochrome  Force monochrome output.\n-O, --output-charset charset  Override the output character set.\n-T, --type content-type  Override the content type of all input files.\n-V, --visual  When no files/URLs are passed, open the page specified in start.visual-home instead of printing a help screen.\n-v, --version  Print information about the browser's version, then exit.\n--  Interpret all following arguments as files.\n"
      }
    ],
    "field": [
      {
        "id": "targets",
        "label": "URLs or files",
        "type": "string",
        "position": 0,
        "multiple": true,
        "sources": [
          "man"
        ]
      },
      {
        "id": "dump",
        "label": "Dump to stdout",
        "description": "Headless mode: print the opened documents instead of browsing.",
        "type": "boolean",
        "option": [
          "--dump",
          "-d"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "monochrome",
        "label": "Monochrome",
        "type": "boolean",
        "option": [
          "--monochrome",
          "-M"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "visual",
        "label": "Open visual home",
        "type": "boolean",
        "option": [
          "--visual",
          "-V"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "config",
        "label": "Config file",
        "type": "path",
        "option": [
          "--config",
          "-C"
        ],
        "path": {
          "kind": "file",
          "role": "input"
        },
        "sources": [
          "man"
        ]
      },
      {
        "id": "type",
        "label": "Content type",
        "description": "For example text/html, when it cannot be guessed from the file name.",
        "type": "string",
        "option": [
          "--type",
          "-T"
        ],
        "suggestions": [
          {
            "value": "text/html",
            "label": "HTML"
          },
          {
            "value": "text/plain",
            "label": "Plain text"
          }
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "input_charset",
        "label": "Input charset",
        "type": "string",
        "option": [
          "--input-charset",
          "-I"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "output_charset",
        "label": "Output charset",
        "type": "string",
        "option": [
          "--output-charset",
          "-O"
        ],
        "sources": [
          "man"
        ]
      }
    ],
    "task": [
      {
        "id": "browse",
        "label": "Browse",
        "fields": [
          "targets",
          "monochrome"
        ],
        "required": [
          "targets"
        ]
      },
      {
        "id": "dump_page",
        "label": "Dump a page as text",
        "fields": [
          "targets",
          "type",
          "input_charset"
        ],
        "required": [
          "targets"
        ],
        "set": {
          "dump": [
            true
          ]
        }
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "targets",
          "dump",
          "visual",
          "monochrome"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "config",
          "type",
          "input_charset",
          "output_charset"
        ]
      }
    ]
  }
}
