nestrs-cli-rs 0.1.0

Rust port of the Nest CLI for the nestrs organization.
Documentation
nestrs-cli-rs-0.1.0 has been yanked.

cli

Rust port of @nestjs/cli for the nestrs organization.

The upstream reference is the cloned Nest CLI project at ../nest-cli. This crate keeps names and module boundaries close to upstream so each Rust item can be traced back to the TypeScript source with minimal guesswork.

Current Status

  • Command and action descriptors are modeled.
  • Configuration defaults and merge behavior are modeled.
  • Package manager detection and command generation are modeled.
  • Runner command descriptions are modeled.
  • Schematics option formatting and built-in Nest collection metadata are modeled as a typed boundary placeholder for the separate schematics package.
  • Compiler planning contracts are in progress.

The crate is not a drop-in replacement for nest yet. The first milestone is a typed, tested compatibility core before wiring a binary entrypoint.

Repository Layout

  • src/commands.rs maps to ../nest-cli/commands.
  • src/actions.rs maps to ../nest-cli/actions.
  • src/configuration.rs maps to ../nest-cli/lib/configuration.
  • src/compiler.rs maps to ../nest-cli/lib/compiler.
  • src/schematics.rs maps to ../nest-cli/lib/schematics.
  • src/package_managers.rs maps to ../nest-cli/lib/package-managers.
  • src/runners.rs maps to ../nest-cli/lib/runners.
  • src/ui.rs maps to ../nest-cli/lib/ui.
  • src/utils.rs maps to ../nest-cli/lib/utils.

Development

From the repository root:

cargo fmt --manifest-path .\cli\Cargo.toml
cargo check --manifest-path .\cli\Cargo.toml --tests

cargo test --manifest-path .\cli\Cargo.toml requires a working Rust linker. On Windows MSVC targets, install Visual Studio Build Tools with the C++ workload so link.exe is available.

Dependency Strategy

Nest-owned packages such as @nestjs/schematics are separate Rust packages in the nestrs organization. cli should depend on small typed placeholder contracts and avoid binding directly to sibling implementation crates until a stable integration adapter is needed.

For non-Nest dependencies, prefer reputable Rust crates with matching behavior. If no good Rust crate exists, port the needed behavior locally and document the compatibility choice.

Naming

Keep Rust names mechanically traceable to upstream names:

  • Preserve folder and file names as closely as Rust modules allow.
  • Convert TypeScript camelCase function and method names to Rust snake_case.
  • Convert upstream class/interface/type names to Rust UpperCamelCase.
  • Add a source-path doc comment when a Rust item cannot obviously map back to upstream.

Attribution

This project is a Rust conversion of the Nest CLI behavior. The upstream Nest CLI source is MIT licensed; keep license and attribution notes updated before any release.