docs: document fern generate --package, --package-mode, and --package-only - #6497
Open
devin-ai-integration[bot] wants to merge 2 commits into
Open
docs: document fern generate --package, --package-mode, and --package-only#6497devin-ai-integration[bot] wants to merge 2 commits into
devin-ai-integration[bot] wants to merge 2 commits into
Conversation
…-only Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Contributor
|
🌿 Preview your docs: https://fern-preview-devin-1785604056-package-flags.docs.buildwithfern.com/learn Here are the markdown pages you've updated: |
…alues Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This was referenced Aug 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When generating SDKs to the local file system,
fern generatecan now build a shareable package artifact next to the generated code, controlled by--package,--package-mode <host|docker>, and the new--package-only. Teams can hand a generated SDK to another team as a tarball, wheel, JAR, or Go source zip without publishing it to a public registry, and--package-onlydeletes everything butfern-dist/so the handoff contains just the artifact. The earlier--pack/--pack-modeflags were renamed with no aliases kept, so scripts that adopted them need updating.Implements docs for: feat(cli): rename --pack to --package and add --package-only (fern-api/fern#17307)
Consolidation of #6468 and #6480
This PR now carries the content from the two older PRs that documented the pre-rename naming, so both can be closed rather than reconciled:
go.modreplacesnippet, the Swift "no artifact, warning only" behavior, the aggregatedPackaging failed for: <generators>error plus empty-fern-dist/cleanup,--runner podmanfor Docker mode, the--preview/--docsincompatibility, and the--packagecross-link ingenerators-yml-reference.mdx— all with the flag names updated to--package/--package-mode.Two corrections against
packages/cli/cli/src/{cli.ts,commands/generate/packLocalOutput.ts}onfern-api/fern@main:--package-modevalues arehost(default) anddocker— notlocal|dockeras this PR originally said (.option("package-mode", { choices: ["host", "docker"], default: "host" })).pip wheel --no-deps, so the artifact is a wheel only, not "a wheel and sdist".Also fixed the
self-hosted.mdxlink, which pointed at the redirect-only/learn/cli-api/...path instead of/learn/cli-api-reference/....Pages changed
fern/products/cli-api-reference/pages/commands.mdx—### package,### package-mode, and### package-onlyin thefern generateaccordion, updated usage line, and a warning that--pack/--pack-modeno longer exist.fern/products/sdks/deep-dives/self-hosted.mdx— pointer from the "Run generation locally" step to--package.fern/products/sdks/reference/generators-yml-reference.mdx— pointer from thelocal-file-systemoutput section tofern generate --package.No changelog entry added: the CLI changelog entry for 2026-07-31 already exists in this repo.
Validation:
pre-commit run --files <changed files>passes (only pre-existing Vale findings) andfern check --warningsreports 0 errors.Link to Devin session: https://app.devin.ai/sessions/7b5528b5669b4b61b5b55f9003ddc7fc