apexe 0.6.1

Outside-In CLI-to-Agent Bridge
{
  "schema_version": "1.0",
  "command": "head",
  "variant": "gnu",
  "match": {
    "probe": {
      "args": ["--version"],
      "expect": "success",
      "output_contains": "GNU coreutils"
    }
  },
  "mode": "authoritative",
  "confidence": "verified",
  "provenance": {
    "platform": "linux",
    "tool_version": "9.7",
    "package": "coreutils",
    "source": "help",
    "checked_on": "2026-07-27",
    "command": "docker run --rm debian@sha256:328d16499860ae6cb9b345e2e4cebca08c2a36e4f7278482c7bd1f39d71e5bfd head --help",
    "environment": "debian@sha256:328d16499860ae6cb9b345e2e4cebca08c2a36e4f7278482c7bd1f39d71e5bfd",
    "notes": "Debian slim images ship no man pages, so the flag list was read from GNU --help, which is complete by GNU convention. '-q, --quiet, --silent' is one help entry carrying two long forms; it is split into a -q/--quiet flag and a separate --silent alias because the overlay format carries at most one long form per flag. conflicts_with is derived from this help text only: -c against -n because 'print the first NUM bytes of each file' and 'print the first NUM lines instead of the first 10' select the same quantity in incompatible units, and -q against -v from 'never print headers giving file names' against 'always print headers giving file names'. Neither pair is diagnosed by the reference build: 'head -c 3 -n 2 FILE' and 'head -q -v FILE' both exit 0 and resolve last-one-wins. This is the opposite of BSD head, which refuses -c with -n outright, so the two variants' conflicts happen to coincide for different reasons and neither description was copied."
  },
  "description": "Print the first 10 lines of each FILE to standard output. With more than one FILE, precede each with a header giving the file name. With no FILE, or when FILE is -, read standard input.",
  "flags": [
    { "short": "-c", "long": "--bytes", "type": "string", "value_name": "NUM", "conflicts_with": ["-n"], "description": "Print the first NUM bytes of each file; with the leading '-', print all but the last NUM bytes of each file. NUM may have a multiplier suffix: b 512, kB 1000, K 1024, MB 1000*1000, M 1024*1024, and so on for G, T, P, E, Z, Y, R, Q; binary prefixes such as KiB=K and MiB=M can be used too." },
    { "short": "-n", "long": "--lines", "type": "string", "value_name": "NUM", "conflicts_with": ["-c"], "description": "Print the first NUM lines instead of the first 10; with the leading '-', print all but the last NUM lines of each file. NUM accepts the same multiplier suffixes as --bytes." },
    { "short": "-q", "long": "--quiet", "type": "boolean", "conflicts_with": ["-v"], "description": "Never print headers giving file names." },
    { "long": "--silent", "type": "boolean", "conflicts_with": ["-v"], "description": "Never print headers giving file names; listed by --help as an alias of -q and --quiet." },
    { "short": "-v", "long": "--verbose", "type": "boolean", "conflicts_with": ["-q", "--silent"], "description": "Always print headers giving file names." },
    { "short": "-z", "long": "--zero-terminated", "type": "boolean", "description": "Line delimiter is NUL, not newline." },
    { "long": "--help", "type": "boolean", "description": "Display this help and exit." },
    { "long": "--version", "type": "boolean", "description": "Output version information and exit." }
  ],
  "positional_args": [
    { "name": "file", "type": "path", "variadic": true, "required": false, "description": "Files to print the first part of. With no FILE, or when FILE is -, read standard input." }
  ],
  "annotations": {
    "readonly": true,
    "destructive": false,
    "idempotent": true,
    "requires_approval": false
  }
}