Changelog
Publish under your own crate metadata
The generated crate’s [package] block can now carry your own identity instead of Fern’s template metadata. Set packageIdentity in generators.yml to control the crate name, description, license, repository, homepage, authors, and keywords. A name override renames the matching Cargo.lock entry in the same pass, so cargo build --locked still resolves.
Browser and device login
Generated CLIs can now log users in interactively. Declaring an authorization-code scheme gives <bin> auth login a browser flow with PKCE, and a device-code scheme prints a user code for machines without a browser, such as SSH sessions and containers. Tokens are stored in the OS keyring, refreshed when they expire, and sent on every request. auth logout clears them and auth status shows which schemes have a credential.
Generate a wire test suite
Set generateWireTests: true and generation emits an automated test suite alongside your CLI: one case per endpoint example, plus a harness that stands up an in-process mock server, drives the compiled binary against it, and asserts the CLI issued the expected request and rendered the mocked response. The suite runs under a plain cargo test — no Docker and no network — and the generated CI runs it on every build.
OAuth client credentials
Generated CLIs can now obtain their own tokens for machine-to-machine authentication. Declare an oauth scheme with type: client-credentials in generators.yml and the CLI exchanges a client ID and secret from the environment for a token, caches it until it expires, and refreshes it automatically. Custom token and refresh requests, response mappings, scopes, token headers and prefixes, and environment URLs are all read from the same auth-schemes configuration the SDKs use.
Per-CLI User-Agent identity
Requests now identify the CLI by its own binary name and version, such as contoso-cli/1.4.0, instead of the shared crate name that every generated CLI previously sent. Your API backend can distinguish traffic from each CLI you publish.
Tools built on top of a generated CLI can tag their own traffic with the --user-agent-suffix flag or the <NAME>_USER_AGENT_SUFFIX environment variable, which appends to rather than replaces the CLI’s identity. Rename that flag at generation time with userAgentSuffixFlag if you’d prefer different branding.
Write binary responses anywhere on disk
The --output and --output-dir flags no longer restrict downloads to the current working directory. Both now accept absolute paths and paths outside the directory the command runs in, instead of failing with “resolves to … which is outside the current directory”. --output still requires its parent directory to exist, and the CLI continues to refuse paths whose final component is a symlink.
Mount commands under a root namespace
You can now group every spec-derived command under a namespace of your choosing, so a CLI that also ships custom commands can keep its API surface in one place. Set rootGroup in generators.yml and contoso plants list becomes contoso api plants list.
Stream server-sent events as they arrive
Generated CLIs now detect text/event-stream responses and print each event to stdout as it arrives, even when the OpenAPI spec doesn’t mark the endpoint as streaming. Previously these responses were treated as binary downloads, which could error or hang. Pass --no-stream to buffer the response instead.