Configuration reference
Early access
The CLI generator is in early access. Reach out to get started.
Configure the CLI generator in generators.yml. Options nested under config are specific to the CLI generator. The rest (output, github, audiences, smart-casing, metadata, api) behave the same way as for SDK generators.
config options
binaryName
Name of the compiled binary. Determines the executable filename, the Cargo [[bin]] target name, and the environment-variable prefix used for TLS, proxy, and logging settings.
When omitted, the generator derives the name from the API definition’s display name (kebab-cased). Multi-spec workspaces must set this field explicitly — there is no sensible auto-derivation when multiple specs are present.
The binary name contoso produces:
- Executable:
contoso - Env-var prefix:
CONTOSO(e.g.CONTOSO_CA_BUNDLE,CONTOSO_LOG)
customCommands
Controls whether the generator produces the custom command infrastructure alongside the CLI binary. When enabled, the output includes:
- A
<binaryName>-typeslibrary crate (typed serde structs) - A
<binaryName>-sdklibrary crate (HTTP client accessible viactx.client()) - Scaffolding files for user-authored command handlers
Set to false to produce a spec-only CLI with no custom command support.
Publishing & delivery
output
Configures where to publish the generated CLI. The CLI generator supports npm and local-file-system output locations. For the full publishing workflow (OIDC auth, CI builds, Homebrew tap), see Publishing. For Docker-based generation on your own machine, see Self-hosted generation.
npm
Publish the CLI as an npm package. Users install with npm install -g @myorg/my-cli or npx @myorg/my-cli.
Local file system
Write the generated Rust project to a local directory for manual building and distribution.
github
Specifies how generated CLI code is delivered to your repository. Supports the same modes as SDKs: release, pull-request, and push.
Command generation
audiences
Filter which API endpoints are included in the generated CLI based on audience tags. Only endpoints tagged with the specified audiences in your API spec (via x-fern-audiences) produce commands. Without this filter, all endpoints generate commands.
smart-casing
Enables intelligent case conversion that preserves numbers and common programming patterns in generated command and flag names.
api
Override authentication settings at the generator level. This uses the same schema as the SDK generator-level api.auth to control which auth schemes the CLI uses.
metadata
Attach package metadata to the generated CLI for use in published artifacts.