diff --git a/fern/products/cli-generator/configuration.mdx b/fern/products/cli-generator/configuration.mdx index 71c60b940..7181aa96c 100644 --- a/fern/products/cli-generator/configuration.mdx +++ b/fern/products/cli-generator/configuration.mdx @@ -85,6 +85,52 @@ config: ``` + +Sets the Cargo `[package]` metadata of the generated crate. Use `packageIdentity` to publish the crate under your own name, license, repository, and authors instead of Fern's. + +```yaml title="generators.yml" +config: + binaryName: plant + packageIdentity: + name: plant-cli + description: Command-line interface for the Plant API. + license: MIT + repository: https://github.com/garden/plant-cli + homepage: https://example.com + authors: ["Plants "] + keywords: ["plants", "cli"] +``` + + + +Crate name. Must be a valid cargo crate name: it starts with a letter and contains only letters, digits, `-`, and `_`. Invalid values fail at generation time with a config error instead of surfacing later as a manifest error during `cargo build`. The generator renames the matching `Cargo.lock` entry in the same pass, so `cargo build --locked` still resolves the workspace member. + + + +Short crate description shown on crates.io. + + + +SPDX license expression, such as `Apache-2.0`. + + + +URL of the crate's source repository. + + + +URL of the project homepage. + + + +Crate authors, in Cargo's `Name ` form. + + + +Keywords for crates.io search. + + + ## Publishing & delivery ### `output` diff --git a/fern/products/cli-generator/publishing.mdx b/fern/products/cli-generator/publishing.mdx index 91e64ba13..516a292eb 100644 --- a/fern/products/cli-generator/publishing.mdx +++ b/fern/products/cli-generator/publishing.mdx @@ -55,7 +55,9 @@ groups: config: binaryName: my-cli ``` - + + The npm package name is independent of the generated Rust crate's identity. To publish the crate under your own name, license, repository, and authors, set [`packageIdentity`](/learn/cli-generator/get-started/configuration#config-options) in the generator's `config`. +