Skip to content

docs: document fern generate --package, --package-mode, and --package-only - #6497

Open
devin-ai-integration[bot] wants to merge 2 commits into
mainfrom
devin/1785604056-package-flags
Open

docs: document fern generate --package, --package-mode, and --package-only#6497
devin-ai-integration[bot] wants to merge 2 commits into
mainfrom
devin/1785604056-package-flags

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Summary

When generating SDKs to the local file system, fern generate can 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-only deletes everything but fern-dist/ so the handoff contains just the artifact. The earlier --pack/--pack-mode flags 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:

  • the per-language artifact table, the Go source-zip explanation with the go.mod replace snippet, the Swift "no artifact, warning only" behavior, the aggregated Packaging failed for: <generators> error plus empty-fern-dist/ cleanup, --runner podman for Docker mode, the --preview/--docs incompatibility, and the --package cross-link in generators-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} on fern-api/fern@main:

  • --package-mode values are host (default) and docker — not local|docker as this PR originally said (.option("package-mode", { choices: ["host", "docker"], default: "host" })).
  • Python packaging runs pip wheel --no-deps, so the artifact is a wheel only, not "a wheel and sdist".

Also fixed the self-hosted.mdx link, 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-only in the fern generate accordion, updated usage line, and a warning that --pack/--pack-mode no 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 the local-file-system output section to fern 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) and fern check --warnings reports 0 errors.

Link to Devin session: https://app.devin.ai/sessions/7b5528b5669b4b61b5b55f9003ddc7fc

…-only

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration
devin-ai-integration Bot requested a review from devalog as a code owner August 1, 2026 17:08
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

…alues

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant