Quick start
From install to typed JSON in five minutes. Or skip to letting your agent do it.
Install
brew install texomy/tap/texomymacOS (Apple silicon) and Linux (x64, arm64). Upgrade with brew upgrade texomy/tap/texomy.
Read https://texomy.com/llms.txt, then install Texomy and configure its MCP server for my AI client.Copy this into your AI agent's chat. The setup guide explains how to install Texomy, connect its MCP server and verify the connection. Supported clients and manual setup →
curl -fsSL https://raw.githubusercontent.com/Texomy/texomy-releases/main/install.sh | TEXOMY_VERSION=v1.0.0-rc.13 shInstalls texomy into ~/.local/bin and verifies the download against SHA256SUMS.
$env:TEXOMY_VERSION='v1.0.0-rc.13'; irm https://raw.githubusercontent.com/Texomy/texomy-releases/main/install.ps1 | iexPowerShell, Windows x64. Installs into %LOCALAPPDATA%\Programs\texomy and adds it to your PATH.
Prefer a manual download? Get the binaries from GitHub releases.
Write a spec
Create a folder with a file money.yml. Each top-level key is a type. Nested keys are subtypes. Money has two fields and two patterns, for a currency before or after the amount.
Currency:
USD: [ 'USD', '\$' ]
EUR: [ 'EUR', '€' ]
Number:
Integer: '\d+'
Decimal: '\d+\.\d+'
Money:
$fields:
currency: Currency
amount: Number
$patterns:
- '#{currency}\s?#{amount}'
- '#{amount}\s?#{currency}'${Type}uses a type inside a pattern.#{field}captures a field, typed as declared under$fields.- Patterns are regular expressions; escape
$and.as usual.
Check that it compiles:
texomy checkok money (7 types)
OK: 1 modules, 0 with errorsParse
echo 'Paid $120.50 on Monday, refund of 40 EUR pending.' | texomy parse -m money --format yml- type: 'Money'
start: 5
end: 12
fields:
currency: { type: 'Currency::USD', start: 5, end: 6, text: '$' }
amount: { type: 'Number::Decimal', start: 6, end: 12, text: '120.50' }
- type: 'Money'
start: 34
end: 40
fields:
currency: { type: 'Currency::EUR', start: 37, end: 40, text: 'EUR' }
amount: { type: 'Number::Integer', start: 34, end: 36, text: '40' }Every node has its concrete type, such as Currency::USD or Number::Decimal, and its start and end as UTF-16 offsets in the input. Leaves carry their text. The default output is JSONL, one match per line; use --format json or yml for one document. A summary goes to standard error, so pipes stay clean.
Parse a file and write the result:
texomy parse payments.txt -m money --output payments.jsonlTest
Pin the expected output in tests/money.test.yml:
$imports: 'money'
amount after currency:
input: '$120.50'
output:
- !Money { currency: !Currency::USD '$', amount: !Number::Decimal '120.50' }texomy testok tests/money.test.yml (1 cases)
PASSED: 1 test filesTo draft a case, run texomy parse -m money --records whole --format yml on its input, review the output and paste it under output.
Records
Input is split into records before matching, and a match never spans two records. Records are read and written as a stream. Small records bound memory use; a large individual record or a complex spec can still need substantially more memory.
The CLI chooses the available logical CPU count for matching worker threads automatically; you can override it with --threads. Independent records can run in parallel. For logs, use texomy parse app.log -m log-entry --records lines: without --records lines, a log with no blank lines becomes one record, matched by one worker thread. More threads do not imply a proportional speedup.
--records | A record is |
|---|---|
paragraphs | lines between blank lines (default) |
lines | every line |
whole | the whole input |
start=REGEX | a line where REGEX matches, plus the lines after it, such as a stack trace |
Let your agent do it
Add the MCP server to your coding agent, point it at a sample and say what you need. It reads the guide, writes the spec, checks and tests it, and parses the file.
claude mcp add texomy -- texomy mcpAdd to ~/.cursor/mcp.json, or the MCP config of your client:
{
"mcpServers": {
"texomy": { "command": "texomy", "args": ["mcp"] }
}
}Add to .vscode/mcp.json in your project:
{
"servers": {
"texomy": { "type": "stdio", "command": "texomy", "args": ["mcp"] }
}
}More on the workflow and safety: AI agents.
Next
- Types and inheritance: subtypes, inherited fields, narrowing.
- Language reference: subtypes, lists, values, flags, imports.
- CLI reference: every command and option.
- Examples: invoices, bank statements, academic transcripts, bills of lading, resumes, postal addresses, insurance claims, contract clauses, access logs, reservation emails and financial reports.