Why Monokl
the problem
A line match still leaves an agent to find the function around it.
what it does
Monokl parses TypeScript and JavaScript, then returns whole code units ranked for the query.
The search CLI runs from source today. References, definitions and dependents come later.
A result worth opening
Search returns the function and its location, not just a matching line.
monokl search "format price" src/ --max-results 3search[3]{file,lineStart,lineEnd,nodeKind,symbolSignature,rank,finalScore}:
src/utils/format.ts,1,3,function,"function formatCurrency(amount: number, currency: string = 'USD'): string",1,3.950647
src/utils/validation.ts,8,12,function,"function validatePrice(price: number): ValidationResult",2,3.07557
src/index.ts,3,3,other,null,3,2.345138
totalCount: 10
help[2]: showing 3 of 10; refine the query with +term or -term,use extract with file/lineStart/lineEnd to retrieve a row's actual code contentBefore you try it
- Search runs from source; Monokl has no published crate or release binary yet.
- Search covers TypeScript and JavaScript, not declaration files. Rust, Python, Go and Java analyzers are not available.
- The output suggests extract, but that command is not built yet. Open the reported file and line range yourself.
- References, definitions, dependents and a reusable library session are still designs.
- No speed or retrieval-quality benchmark has been published yet.
- FSL-1.1-MIT licensed; each release becomes MIT after two years.
Search with context
The first working slice is built for an agent deciding what code to read next.
Whole code units
- Find functions, classes, interfaces, types and exports, with signatures and line ranges.
- Names split at camelCase, snake_case and acronyms, so ordinary words find code names.
- Functions, classes and methods rank ahead of imports and re-exports.
Small, useful queries
- Use words, quoted phrases, +required, -excluded and regex: terms; --exact takes a literal query.
- The same search over the same files returns the same order.
- Invalid patterns fail clearly instead of silently disappearing.
Output that fits
- Compact TOON rows include file, range, code kind, signature and rank.
- Defaults cap the result at 50 rows, 20,000 tokens and 2 MiB; a cut result says how many matched.
- Ignored, hidden, test and binary files stay out unless you ask for them.
What it supports
Language coverage
Search is available for TypeScript and JavaScript. The rest is still on the roadmap.
| language | today |
|---|---|
| TypeScript and JavaScript | Search works for .ts, .tsx, .js, .jsx, .mjs, .cjs, .mts and .cts. |
| Rust | Parser and analysis are designed; search is not built. |
| Python, Go and Java | Designed, not built. |
Inside Orin DX
Coming up
- Publish the first usable search release.
- Add extract, symbols, references, definitions and dependents, with precision stated per operation.
- Measure search and retrieval on real repositories before claiming a speed or quality win.
- Build the library session API for agents that need repeated queries.