metaxy scan
Parse Rust files and print discovered procedures, structs, and enums. Useful for debugging and verifying what the CLI sees before generating code.
Usage
# Scan default ./api directory
metaxy scanFlags
| Flag | Default | Description |
|---|---|---|
-d, --dir | api | Rust source directory |
--include | **/*.rs | Glob patterns to include (repeatable) |
--exclude | — | Glob patterns to exclude (repeatable) |
Examples
# Scan a custom directory
metaxy scan --dir src/handlers
# Include only specific files
metaxy scan --include "api/v2/**/*.rs"
# Exclude test files
metaxy scan --exclude "**/*_test.rs" --exclude "**/tests/**"Sample Output
$ metaxy scan
Discovered procedures:
query hello (String → String)
query list_users (ListUsersInput → Paginated<User>)
query get_user (u64 → User)
mutation echo (EchoInput → EchoOutput)
mutation create_order (OrderInput → Order)
Discovered types:
struct User { id: u64, name: String, email: String }
struct ListUsersInput { page: u32, per_page: u32 }
struct Paginated<T> { items: Vec<T>, total: u64, page: u32 }
struct EchoInput { message: String, uppercase: bool }
struct EchoOutput { original: String, transformed: String, length: u32 }
enum Role Viewer | Editor | Admin