apexe 0.6.1

Outside-In CLI-to-Agent Bridge
{
  "schema_version": "1.0",
  "command": "wc",
  "variant": "bsd",
  "match": {
    "platform": ["macos", "freebsd"],
    "probe": { "args": ["--version"], "expect": "failure" },
    "binary_globs": ["/usr/bin/wc", "/bin/wc"]
  },
  "mode": "authoritative",
  "confidence": "verified",
  "provenance": {
    "platform": "macos",
    "tool_version": "macOS 26.3",
    "source": "man-page",
    "checked_on": "2026-07-27",
    "command": "man -P cat wc | col -b",
    "environment": "macOS 26.3 (Darwin arm64), system /usr/bin/wc",
    "notes": "Flags transcribed from the block after 'The following options are available:'. COMPATIBILITY and STANDARDS were read for flags documented outside that block; they only record that -L is a non-standard FreeBSD extension and add no option. The option set is closed: the binary's getopt(3) option string is 'clmwL' and --libxo is handled ahead of getopt, so mode is authoritative. --libxo was run against the binary in both the '--libxo json' and '--libxo=json' forms and produced JSON output at exit 0; the binary's own usage line prints only '[-Lclmw]' and omits --libxo, so the man page SYNOPSIS was followed. BSD wc has no other long options: --lines, --bytes, --words, --chars and --max-line-length are all rejected with 'illegal option -- -'. conflicts_with: -c and -m come from '-c ... This will cancel out any prior usage of the -m option' and '-m ... This will cancel out any prior usage of the -c option', confirmed against the binary in a UTF-8 locale on a 6-byte, 5-character file, where 'wc -c -m' reports 5 and 'wc -m -c' reports 6. One candidate was tested and rejected: -L with -m is not a conflict but a modifier pairing -- the same page says -L reports bytes 'by default ... or characters (when -m is provided)', and 'wc -L -m' prints both counts. BSD wc rejects --version (exit 1, 'illegal option -- -'), which is why the probe matches on failure. annotations: wc opens every operand read-only and has no option that names an output file, so readonly is true."
  },
  "description": "The wc utility displays the number of lines, words, and bytes contained in each input file, or standard input (if no file is specified) to the standard output. A line is defined as a string of characters delimited by a <newline> character. Characters beyond the final <newline> character will not be included in the line count. A word is defined as a string of characters delimited by white space characters. If more than one input file is specified, a line of cumulative counts for all the files is displayed on a separate line after the output for the last file. When an option is specified, wc only reports the information requested by that option. The order of output always takes the form of line, word, byte, and file name. The default action is equivalent to specifying the -c, -l and -w options.",
  "flags": [
    { "long": "--libxo", "type": "string", "value_name": "options", "description": "Generate output via libxo(3) in a selection of different human and machine readable formats. See xo_parse_args(3) for details on command line arguments." },
    { "short": "-L", "type": "boolean", "description": "Write the length of the line containing the most bytes (default) or characters (when -m is provided) to standard output. When more than one file argument is specified, the longest input line of all files is reported as the value of the final \"total\"." },
    { "short": "-c", "type": "boolean", "conflicts_with": ["-m"], "description": "The number of bytes in each input file is written to the standard output. This will cancel out any prior usage of the -m option." },
    { "short": "-l", "type": "boolean", "description": "The number of lines in each input file is written to the standard output." },
    { "short": "-m", "type": "boolean", "conflicts_with": ["-c"], "description": "The number of characters in each input file is written to the standard output. If the current locale does not support multibyte characters, this is equivalent to the -c option. This will cancel out any prior usage of the -c option." },
    { "short": "-w", "type": "boolean", "description": "The number of words in each input file is written to the standard output." }
  ],
  "positional_args": [
    { "name": "file", "type": "path", "variadic": true, "required": false, "description": "Files to count. If no files are specified, the standard input is used and no file name is displayed." }
  ],
  "annotations": {
    "readonly": true,
    "destructive": false,
    "idempotent": true,
    "requires_approval": false
  }
}