From 1daea4df4403cd7354fbab95b67c6d7d7c50dbd7 Mon Sep 17 00:00:00 2001
From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Date: Thu, 30 Jul 2026 17:07:03 +0000
Subject: [PATCH 1/5] docs: document packageIdentity config for the CLI
generator
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
---
fern/products/cli-generator/configuration.mdx | 33 +++++++++++++++++++
fern/products/cli-generator/publishing.mdx | 2 ++
2 files changed, 35 insertions(+)
diff --git a/fern/products/cli-generator/configuration.mdx b/fern/products/cli-generator/configuration.mdx
index 71c60b940..52a6758ed 100644
--- a/fern/products/cli-generator/configuration.mdx
+++ b/fern/products/cli-generator/configuration.mdx
@@ -85,6 +85,39 @@ config:
```
+
+Overrides the Cargo `[package]` metadata of the generated crate. Without it, the crate keeps the SDK template's Fern-owned identity (`name = "fern-cli-sdk"`, Fern's repository and authors), which is wrong for a CLI you publish under your own name.
+
+Every field is optional, and omitting `packageIdentity` leaves generated output unchanged.
+
+```yaml title="generators.yml"
+config:
+ binaryName: contoso
+ packageIdentity:
+ name: contoso-cli
+ description: Command-line interface for the Contoso API.
+ license: MIT
+ repository: https://github.com/contoso/contoso-cli
+ homepage: https://contoso.com
+ authors: ["Contoso "]
+ keywords: ["plants", "cli"]
+```
+
+| Field | Type | Cargo `[package]` key |
+| --- | --- | --- |
+| `name` | string | `name` |
+| `description` | string | `description` |
+| `license` | string | `license` |
+| `repository` | string | `repository` |
+| `homepage` | string | `homepage` |
+| `authors` | array of strings | `authors` |
+| `keywords` | array of strings | `keywords` |
+
+`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.
+
+The override applies only to the `[package]` section. The internal library name (`[lib] name = "fern_cli_sdk"`) isn't configurable, because the vendored source tree imports through it.
+
+
## Publishing & delivery
### `output`
diff --git a/fern/products/cli-generator/publishing.mdx b/fern/products/cli-generator/publishing.mdx
index 91e64ba13..9da2fc9bd 100644
--- a/fern/products/cli-generator/publishing.mdx
+++ b/fern/products/cli-generator/publishing.mdx
@@ -60,6 +60,8 @@ groups:
+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 instead of Fern's, set [`packageIdentity`](/learn/cli-generator/get-started/configuration#config-options) in the generator's `config`.
+
## Configure GitHub publishing
Fern publishes your CLI via GitHub Actions. Configure your GitHub repository and publishing mode:
From f43e4823663d6d4fd94e5e1a93d209f9bc2a50c3 Mon Sep 17 00:00:00 2001
From: "devin.logan"
Date: Tue, 11 Aug 2026 18:36:52 +0000
Subject: [PATCH 2/5] docs: reword packageIdentity default framing
Describe the template crate identity as the default rather than as wrong.
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
---
fern/products/cli-generator/configuration.mdx | 2 +-
fern/products/cli-generator/publishing.mdx | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fern/products/cli-generator/configuration.mdx b/fern/products/cli-generator/configuration.mdx
index 52a6758ed..33600669d 100644
--- a/fern/products/cli-generator/configuration.mdx
+++ b/fern/products/cli-generator/configuration.mdx
@@ -86,7 +86,7 @@ config:
-Overrides the Cargo `[package]` metadata of the generated crate. Without it, the crate keeps the SDK template's Fern-owned identity (`name = "fern-cli-sdk"`, Fern's repository and authors), which is wrong for a CLI you publish under your own name.
+Sets the Cargo `[package]` metadata of the generated crate. By default, the crate uses the template's identity (`name = "fern-cli-sdk"`, along with Fern's repository and authors). Use `packageIdentity` to publish the crate under your own name, license, repository, and authors.
Every field is optional, and omitting `packageIdentity` leaves generated output unchanged.
diff --git a/fern/products/cli-generator/publishing.mdx b/fern/products/cli-generator/publishing.mdx
index 9da2fc9bd..c1a5490c4 100644
--- a/fern/products/cli-generator/publishing.mdx
+++ b/fern/products/cli-generator/publishing.mdx
@@ -60,7 +60,7 @@ groups:
-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 instead of Fern's, set [`packageIdentity`](/learn/cli-generator/get-started/configuration#config-options) in the generator's `config`.
+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`.
## Configure GitHub publishing
From bf78382a0ae718fdb9ed78afc8637030ab37a319 Mon Sep 17 00:00:00 2001
From: "devin.logan"
Date: Tue, 11 Aug 2026 18:39:43 +0000
Subject: [PATCH 3/5] docs: break packageIdentity fields into nested
ParamFields
Replace the field/Cargo-key table with indented per-field ParamFields, matching the nested-object pattern used elsewhere in the reference docs.
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
---
fern/products/cli-generator/configuration.mdx | 42 ++++++++++++++-----
1 file changed, 31 insertions(+), 11 deletions(-)
diff --git a/fern/products/cli-generator/configuration.mdx b/fern/products/cli-generator/configuration.mdx
index 33600669d..f2e44bf93 100644
--- a/fern/products/cli-generator/configuration.mdx
+++ b/fern/products/cli-generator/configuration.mdx
@@ -103,17 +103,37 @@ config:
keywords: ["plants", "cli"]
```
-| Field | Type | Cargo `[package]` key |
-| --- | --- | --- |
-| `name` | string | `name` |
-| `description` | string | `description` |
-| `license` | string | `license` |
-| `repository` | string | `repository` |
-| `homepage` | string | `homepage` |
-| `authors` | array of strings | `authors` |
-| `keywords` | array of strings | `keywords` |
-
-`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.
+Each field sets the Cargo `[package]` key of the same name:
+
+
+
+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.
+
+
The override applies only to the `[package]` section. The internal library name (`[lib] name = "fern_cli_sdk"`) isn't configurable, because the vendored source tree imports through it.
From b390231370992b8d8ed6f664a04a7ae978593793 Mon Sep 17 00:00:00 2001
From: Devin Logan
Date: Tue, 11 Aug 2026 14:46:56 -0400
Subject: [PATCH 4/5] small edits
---
fern/products/cli-generator/configuration.mdx | 39 ++++++++-----------
1 file changed, 16 insertions(+), 23 deletions(-)
diff --git a/fern/products/cli-generator/configuration.mdx b/fern/products/cli-generator/configuration.mdx
index f2e44bf93..7181aa96c 100644
--- a/fern/products/cli-generator/configuration.mdx
+++ b/fern/products/cli-generator/configuration.mdx
@@ -85,59 +85,52 @@ config:
```
-
-Sets the Cargo `[package]` metadata of the generated crate. By default, the crate uses the template's identity (`name = "fern-cli-sdk"`, along with Fern's repository and authors). Use `packageIdentity` to publish the crate under your own name, license, repository, and authors.
-
-Every field is optional, and omitting `packageIdentity` leaves generated output unchanged.
+
+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: contoso
+ binaryName: plant
packageIdentity:
- name: contoso-cli
- description: Command-line interface for the Contoso API.
+ name: plant-cli
+ description: Command-line interface for the Plant API.
license: MIT
- repository: https://github.com/contoso/contoso-cli
- homepage: https://contoso.com
- authors: ["Contoso "]
+ repository: https://github.com/garden/plant-cli
+ homepage: https://example.com
+ authors: ["Plants "]
keywords: ["plants", "cli"]
```
-
-Each field sets the Cargo `[package]` key of the same name:
-
+
-
+
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.
-The override applies only to the `[package]` section. The internal library name (`[lib] name = "fern_cli_sdk"`) isn't configurable, because the vendored source tree imports through it.
-
-
## Publishing & delivery
### `output`
From 801865610b1a03d43982189242fcab403175adf0 Mon Sep 17 00:00:00 2001
From: Devin Logan
Date: Tue, 11 Aug 2026 14:48:53 -0400
Subject: [PATCH 5/5] move note
---
fern/products/cli-generator/publishing.mdx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fern/products/cli-generator/publishing.mdx b/fern/products/cli-generator/publishing.mdx
index c1a5490c4..516a292eb 100644
--- a/fern/products/cli-generator/publishing.mdx
+++ b/fern/products/cli-generator/publishing.mdx
@@ -55,13 +55,13 @@ 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`.
+
-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`.
-
## Configure GitHub publishing
Fern publishes your CLI via GitHub Actions. Configure your GitHub repository and publishing mode: