Skip to content

Print a copyable cargo add command for generated dependencies #31

Description

@lightsofapollo

Goal

Make the post-generation dependency step easier while keeping REQUIRED_DEPS.toml authoritative and never editing a consumer manifest automatically.

Scope

Render deterministic cargo add command(s) from the same DepRequirement collection used for REQUIRED_DEPS.toml, then show them in normal successful CLI output. Quiet and JSON modes must keep their current output contracts.

Acceptance criteria

  • Versions and feature lists come from the existing dependency collector, not a second hardcoded table.
  • Output ordering is deterministic.
  • Dependencies without features and dependencies with multiple features are both covered by unit tests.
  • The command is shell-copyable for the supported crate names/features.
  • The generator still does not modify Cargo.toml.
  • README explains that the command and fragment are alternatives.

A single command per dependency is acceptable if that keeps quoting and feature handling straightforward.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions