Start

CLI

Project generation and inspection commands.

CLI

cargo-nidus provides project generation and source inspection commands:

cargo nidus new hello-nidus
cargo nidus check
cargo nidus routes
cargo nidus graph
cargo nidus openapi
cargo nidus expand --dry-run
CommandPurposeExpected output
cargo nidus new <name>create a starter servicea Cargo project with src/main.rs, one module, one controller, and one injected service
cargo nidus checkvalidate generated project structuresuccess when crate roots, generated modules, and feature directories are consistent
cargo nidus routesinspect controller route metadataHTTP methods, normalized paths, summaries, guards, pipes, and validation markers when present
cargo nidus graphinspect module metadataroot and feature modules plus imports, providers, controllers, and exports
cargo nidus openapirender OpenAPI JSON from route metadataa JSON document with configurable title and version
cargo nidus expand --dry-runshow the macro expansion commandthe cargo expand invocation without running it

The CLI is source-driven. It recursively inspects Rust files under src and macro metadata rather than depending on hidden runtime registration, so both generated src/controllers projects and feature-oriented layouts such as src/users/controller.rs are supported. A controller definition and its #[routes] implementation may also live in separate source files when the controller's short type name is unique; file-local definitions take precedence and ambiguous cross-file short names produce an actionable error instead of an incomplete route list. Use the CLI before commits when route shape, module graph shape, or OpenAPI output matters.