Skip to content

CLI reference

Commands

texomy parse app.log -m logs.payment --records lines --output failed.jsonl
texomy test
texomy check
texomy inspect
texomy mcp
texomy studio
texomy update
texomy licenses

Every command runs locally. Input files are read by the CLI itself, so large files never pass through an agent's conversation. texomy --help and texomy COMMAND --help list all options.

Modules and packages

A module is one .yml spec. Its name comes from its path in the package: logs.payment is logs/payment.yml. A package is a folder with a texomy.json manifest (name, version, dependencies). A single file without dependencies runs without a manifest.

--root DIR (-r, repeatable, default: the current folder) is a folder to scan for packages. The first root also holds the modules named without a package. A module is given as:

FormMeaning
logs.paymenta module of the first root
acme.logs:1.2.0/logs.paymenta module of a package found in the roots
acme.logs/logs.paymentthe same, when only one version is found

Dependencies in texomy.json name packages, such as "core": "acme.core:1.0.0", not where they are. They are found among the packages of the roots, and imported with the alias: $imports: core:money. Hidden folders and target, build and node_modules are not scanned. Nothing is read from the network.

parse

texomy parse [FILE] -m MODULE [-r DIR]... [--records MODE] [-o FILE]
             [--format jsonl|json|yml] [--encoding CHARSET] [--encoding-errors strict|replace]
             [--threads N] [--timeout SECONDS]
  • FILE is the text to parse. Omit it or use - for standard input: pdftotext report.pdf - | texomy parse -m reports.
  • Input files in the free release can be up to 10 MB each.
  • --records sets how input is split before matching. A match never spans two records. Records are processed as a stream, so with small records memory use stays small whatever the file size.
    • paragraphs (default): lines between blank lines.
    • whole: the whole input is one record.
    • lines: every line is a record.
    • start=REGEX: a record starts at each line where REGEX matches; other lines, such as stack traces, belong to the record before them. For example start=\d{4}-\d{2}-\d{2}.
  • Choose small records when entries are independent: this bounds memory and enables parallel matching. A log with no blank lines becomes one record under the default paragraphs. See measured whole-record and line-split results.
    • Logs and other line-based output: --records lines, or start=REGEX when an entry can span several lines.
    • Documents separated by blank lines: paragraphs.
    • whole when the spec must match across the complete input, such as one invoice or one letter.
  • --format: jsonl (default, one match per line), json (one array) or yml (one sequence).
  • --output (-o) writes to a file instead of standard output.
  • --encoding defaults to UTF-8. --encoding-errors strict rejects malformed input; replace explicitly permits replacement characters.
  • --threads selects the number of matching worker threads; the default is the logical CPU count available to the process. For example, the 12-core M3 Pro normally gets 12 worker threads. The operating system schedules them; this neither pins threads to particular cores nor guarantees full CPU usage. Output retains input order. More threads do not provide a proportional speedup; see the 6 versus 12 thread measurement.
  • --timeout skips a record that takes longer to match, reports it and exits with 1. Other records are still matched.

Each output node has type (the concrete type, such as Currency::USD), start and end (UTF-16 offsets in the whole input), and either fields or, on leaves, text. A value is added where the spec declares one. Fields keep the order of $fields; a collection field is an array.

A summary such as 6 records, 6 matched, 6 nodes in 29 ms and any warning: lines go to standard error, so standard output stays clean for pipes:

texomy parse statement.txt -m bank-statements | jq 'select(.type == "Transaction")'

test

texomy test [PATH] [--folder DIR] [-r DIR]... [--json]

Finds *.test.yml files recursively in the current folder, or in PATH, and runs them. A failed case shows the expected and actual output in the test format. Exits with 1 on any failure, so it fits in CI.

$imports: 'specs.numbers'

integer:
  input: '42'
  output:
    - !Number '42'

output lists the top-level nodes in order, each tagged with its matched type. A node holds its value if its type declares one, otherwise its matched fields, otherwise its text. To draft a case, write it with output: [], run texomy test, review the actual output and paste it under output. A case can read its input or output from a package file with !file 'path' and choose a record mode with records, as in --records; the default is paragraphs.

check

texomy check [MODULE...] [-r DIR]... [--json]

Compiles modules (by default, every module of the package) and reports compilation errors and static warnings: single-case character ranges under case-insensitive matching, repeated groups that risk exponential backtracking, and multiple fields that accept arbitrary text. With --json, the report includes passed and a modules array; each warning has code, type, optional field, message and recommendation. Exits with 1 when a module does not compile; warnings do not change the exit code. Parsing and test execution can also report runtime warnings about ambiguous matches and untyped result fields.

inspect

texomy inspect --root ./project --root ./packages
texomy inspect --root ./project --root ./packages --package acme.reports:0.1.0
texomy inspect --root ./project --root ./packages --package acme.reports:0.1.0 --module reports.annual --source

Prints JSON: the current package's modules and the packages found under the roots. Select a package by exact version to see its modules with their types and fields, and a module with --source to read its YAML.

mcp

texomy mcp [--allow-dir DIR]...

Serves the Model Context Protocol over stdio, with the tools guide, inspect, parse, test, check and studio_show. Tools work in the folders your client shares as its workspace, or the folders given with --allow-dir. Hidden files and folders are never read or written. See AI agents for setup in Claude Code, Cursor and VS Code.

studio

texomy studio [-r DIR]... [--port PORT] [--no-open] [--timeout SECONDS] [--shortcut]

Opens Texomy Studio on this computer, in a window of its own when Chrome, Edge, Chromium or Brave is installed. Specs and texts are parsed by the CLI and never leave the machine. The server listens on 127.0.0.1 only, with a key for each run.

  • Studio opens the first root as its project, and follows changes to its files on disk.
  • --shortcut creates a launch shortcut for local Studio (macOS ~/Applications, the Linux application menu, the Windows Start menu) and exits.
  • --timeout (default 60 seconds) stops one run that takes too long.

Updating

texomy update

Checks published releases and prints the newer version and its installation command. It does not replace the binary. Stable installations are offered stable releases; prerelease installations can also see prereleases. An explicit check has a 15-second timeout and reports network failures.

Interactive release builds also check in the background at most once a day, using the OS cache. Notices go to standard error without changing command output or exit status. Studio shows the notice when available; other commands wait at most one second after completing. Background network failures are silent.

There are no automatic checks for MCP, internal workers, help/version, redirected input/output, CI, debug builds or development version labels. Set TEXOMY_NO_UPDATE_CHECK=1 to turn automatic checks off. Explicit texomy update remains available. The release check sends the CLI version, never your input text, specs or parsing results.

For Homebrew installations, apply the update with:

brew update && brew upgrade texomy/tap/texomy

For script installations, rerun the command on the Download page. Check the result with texomy --version.

Licenses

texomy licenses

Prints the Texomy license and the licenses of the third-party software included in the binary.