CLI
The metaxy CLI scans Rust source files, parses types via syn, and generates TypeScript types and a typed client.
Install
cargo install metaxy-cliCommands
# One-shot code generation
metaxy generate
# Debug — print discovered procedures and types
metaxy scan
# Watch mode — regenerate on .rs file changes
metaxy watch| Command | Description |
|---|---|
| generate | Generate TypeScript types and client (one-shot) |
| scan | Print discovered procedures and types (debugging) |
| watch | Watch for changes and regenerate automatically |
Global Flags
Available on all commands.
| Flag | Default | Description |
|---|---|---|
--config | auto | Explicit config file path |
--no-config | false | Disable config file loading |
# Explicit config file
metaxy generate --config ./custom-metaxy.toml
# Ignore config file entirely
metaxy generate --no-config --dir src/api