CLI

The metaxy CLI scans Rust source files, parses types via syn, and generates TypeScript types and a typed client.

Install

sh
cargo install metaxy-cli

Commands

sh
# One-shot code generation
metaxy generate

# Debug — print discovered procedures and types
metaxy scan

# Watch mode — regenerate on .rs file changes
metaxy watch
CommandDescription
generateGenerate TypeScript types and client (one-shot)
scanPrint discovered procedures and types (debugging)
watchWatch for changes and regenerate automatically

Global Flags

Available on all commands.

FlagDefaultDescription
--configautoExplicit config file path
--no-configfalseDisable config file loading
sh
# Explicit config file
metaxy generate --config ./custom-metaxy.toml

# Ignore config file entirely
metaxy generate --no-config --dir src/api

visit GitHub to learn more about metaxy