@cosyte/cli
Public programmatic entry point for @cosyte/cli (the . subpath export).
@cosyte/cli is a bin package: its primary artifact is the cosyte command on your PATH
(npx @cosyte/cli parse …), not an import surface. This module is the small, honest programmatic
API over the same core the CLI uses: the format autodetector, the exit-code contract, the
value-free diagnostic types, and the dispatcher, so another adapter (the MCP server, or a web
playground) can drive the same logic without shelling out.
The CLI is a thin, PHI-safe skin over the wrapped @cosyte/* parsers: it routes, reads, shapes
output, and owns the exit-code + value-free-diagnostic disciplines; it re-implements no wire-format
parsing.
Classes
Interfaces
- DeidAvailability
- DetectResult
- Finding
- FmtResult
- ParseResult
- PhiPosture
- ResolvedInput
- RunDeps
- RunResult
- Verdict
Type Aliases
Variables
- CLI_CODES
- DEID_UNAVAILABLE_REASON
- DETECTABLE_FORMATS
- EXIT
- KNOWN_FORMATS
- OP_SUPPORT
- SHOW_VALUES
- UNSAFE_EXCERPT_MAX
- UNSAFE_SHOW_VALUES_FLAG
- VALUE_FREE
- VERSION
Functions
- asCosyteFormat
- classifyCandidates
- completionCommand
- convertCommand
- convertOutcome
- deframeMllp
- deidStatus
- detectFormat
- detectionError
- errorResult
- extractPhiPosture
- extractStableCode
- fmtCommand
- fmtFormat
- formatDiagnostic
- formatHl7Position
- formatsSupporting
- inspectCommand
- inspectFormat
- loadOptional
- mapCodesCommand
- parseCommand
- parseFailureResult
- parseFormat
- readFileBytes
- readStreamBytes
- redactCommand
- resolveInput
- run
- supportsOp
- toCliError
- unsafeInputSuffix
- validateCommand
- validateFormat
- valueFreeLocator