The CLI generator is in early access. Reach out to get started.
The CLI generator reads several Fern OpenAPI extensions to shape the generated CLI. You can add these extensions directly in your spec or apply them through overlays.
x-fern-sdk-group-nameDetermines the subcommand group hierarchy. Each list element becomes a nested subcommand, with names converted from camelCase to kebab-case.
Produces: cli scheduled-events invitees list-event-invitees
x-fern-sdk-method-nameSets the leaf command name (used as-is).
Produces: cli get-current-user (or nested under a group if x-fern-sdk-group-name is also set).
If neither extension is present, the CLI falls back to the operationId.
See SDK method names for more details.
x-fern-ignoreExcludes operations or parameters from the generated CLI. An ignored operation produces no command; an ignored parameter produces no flag.
At the parameter level:
See Ignoring elements for more details.
x-fern-availabilityAdds a status badge next to the command in --help output.
OpenAPI’s standard deprecated: true is also honored and maps to [Deprecated] when x-fern-availability isn’t set.
See Availability for more details.
x-fern-parameter-nameOverrides the CLI flag name derived from a parameter. By default, parameter names are converted to kebab-case for use as flags.
Produces --api-version instead of --x-api-version.
See Customize parameter names for more details.
x-fern-paginationEnables auto-pagination for an endpoint. When present, the CLI recognizes --page-all, --page-limit, and --page-delay flags for that command.
See Pagination for all supported pagination schemes (offset, cursor, URI, and path).