{
  "id": "hl",
  "name": "hl",
  "homepage": "https://github.com/pamburus/hl",
  "description": "A fast and powerful log viewer and processor that converts JSON logs or logfmt logs into a clear human-readable format.",
  "executables": [
    "hl"
  ],
  "dotfiles": {
    "paths": [
      "[configHome]/hl/config.yaml",
      "[configHome]/hl/config.toml",
      "[configHome]/hl/config.json",
      "[configHome]/hl/themes/"
    ],
    "secret": []
  },
  "commands": {
    "format": 1,
    "label": "View logs",
    "description": "Format JSON or logfmt log files for reading, with level, time and field filters. Follow mode, themes, and tuning options are mostly left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "help",
        "kind": "help",
        "url": "https://github.com/pamburus/hl/blob/master/README.md",
        "evidence": "  -s, --sort                             Sort entries chronologically\n  -F, --follow                           Follow input streams and sort entries chronologically within time frame set by --sync-interval-ms option\n  -l, --level <LEVEL>    Display entries with level >= <LEVEL> [env: HL_LEVEL=]\n      --since <TIME>     Display entries with timestamp >= <TIME>\n      --until <TIME>     Display entries with timestamp <= <TIME>\n  -f, --filter <FILTER>  Filter entries by matching field values [k=v, k~=v, k~~=v, 'k!=v', 'k?!=v', etc]\n  -q, --query <QUERY>    Filter entries using a query expression ['status>=400 or duration>=15', etc]\n  -r, --raw                   Output raw source entries instead of formatted entries\n  -h, --hide <KEY>            Hide or reveal fields with the specified keys, prefix with ! to reveal, provide '!*' to reveal all\n  -L, --local                 Use local time zone, overrides --time-zone option\n  -e, --hide-empty-fields     Hide empty fields, applies for null, string, object and array fields only [env: HL_HIDE_EMPTY_FIELDS=]\n      --paging <WHEN>                    Control pager usage (HL_PAGER or PAGER) [env: HL_PAGING=] [default: auto] [possible values: auto, always, never]\n  -o, --output <FILE>         Output file\n"
      }
    ],
    "field": [
      {
        "id": "files",
        "label": "Log files",
        "description": "Leave empty to read standard input.",
        "type": "path",
        "position": 0,
        "multiple": true,
        "path": {
          "kind": "file",
          "role": "input"
        },
        "sources": [
          "help"
        ]
      },
      {
        "id": "level",
        "label": "Minimum level",
        "type": "string",
        "option": [
          "--level",
          "-l"
        ],
        "suggestions": [
          {
            "value": "error",
            "label": "error"
          },
          {
            "value": "warning",
            "label": "warning"
          },
          {
            "value": "info",
            "label": "info"
          },
          {
            "value": "debug",
            "label": "debug"
          }
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "since",
        "label": "Since",
        "type": "string",
        "option": [
          "--since"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "until",
        "label": "Until",
        "type": "string",
        "option": [
          "--until"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "filter",
        "label": "Field filter",
        "description": "For example level=error or k~=v.",
        "type": "string",
        "option": [
          "--filter",
          "-f"
        ],
        "multiple": true,
        "sources": [
          "help"
        ]
      },
      {
        "id": "query",
        "label": "Query",
        "description": "For example 'status>=400 or duration>=15'.",
        "type": "string",
        "option": [
          "--query",
          "-q"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "hide",
        "label": "Hide field",
        "type": "string",
        "option": [
          "--hide",
          "-h"
        ],
        "multiple": true,
        "sources": [
          "help"
        ]
      },
      {
        "id": "local",
        "label": "Use local time zone",
        "type": "boolean",
        "option": [
          "--local",
          "-L"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "sort",
        "label": "Sort chronologically",
        "type": "boolean",
        "option": [
          "--sort",
          "-s"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "follow",
        "label": "Follow",
        "type": "boolean",
        "option": [
          "--follow",
          "-F"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "paging",
        "label": "Pager",
        "type": "enum",
        "option": [
          "--paging"
        ],
        "choices": [
          {
            "value": "auto",
            "label": "Auto"
          },
          {
            "value": "always",
            "label": "Always"
          },
          {
            "value": "never",
            "label": "Never"
          }
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "raw",
        "label": "Raw entries",
        "type": "boolean",
        "option": [
          "--raw",
          "-r"
        ],
        "sources": [
          "help"
        ]
      }
    ],
    "task": [
      {
        "id": "errors",
        "label": "Show errors only",
        "fields": [
          "files",
          "level",
          "local"
        ],
        "required": [
          "files"
        ],
        "set": {
          "level": [
            "error"
          ]
        }
      },
      {
        "id": "follow",
        "label": "Follow a log",
        "fields": [
          "files",
          "follow",
          "level",
          "local"
        ],
        "required": [
          "files"
        ],
        "set": {
          "follow": [
            true
          ]
        }
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "files",
          "level",
          "since",
          "until",
          "filter",
          "query",
          "local"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "hide",
          "sort",
          "follow",
          "paging",
          "raw"
        ]
      }
    ]
  }
}
