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

sh
# Scan default ./api directory
metaxy scan

Flags

FlagDefaultDescription
-d, --dirapiRust source directory
--include**/*.rsGlob patterns to include (repeatable)
--excludeGlob patterns to exclude (repeatable)

Examples

sh
# 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

sh
$ 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

visit GitHub to learn more about metaxy