Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion fern/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,13 @@ products:
image: ./images/product-switcher/product-switcher-sdks-light.png
slug: sdks
subtitle: Generate client libraries in multiple languages


- display-name: CLI Generator
path: ./products/cli-generator/cli-generator.yml
icon: fa-regular fa-rectangle-terminal
slug: cli-generator
subtitle: Generate a CLI from your API definition

- display-name: Docs
path: ./products/docs/docs.yml
icon: fa-regular fa-browser
Expand Down
7 changes: 7 additions & 0 deletions fern/products/cli-generator/cli-generator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
navigation:
- section: Get started
contents:
- page: Overview
path: ./overview.mdx
slug: overview

42 changes: 42 additions & 0 deletions fern/products/cli-generator/overview.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
title: CLI generator
description: "Generate a production CLI from your API definition that's built for AI agents and human developers."
availability: beta
---

<Note title="Early access">
The CLI generator is in early access. [Reach out](https://buildwithfern.com/contact) to get started.
</Note>

Fern's CLI generator produces a fully functional command-line tool from the same API spec you already use for SDKs. It ships alongside your Docs and SDKs as a single binary with no runtime dependencies, serving AI agents that need deterministic output and runtime-introspectable schemas as well as human developers who script, debug, and explore.

Building a CLI by hand is a multi-quarter project — commands, auth, pagination, retries, output formatting, cross-platform builds, shell completions, and keeping it all in sync as the API evolves. The generator handles that automatically.

## How it works

The CLI generator plugs into the same Fern workflow as your Docs and SDKs. When your spec changes, Fern opens a PR against your CLI repo with the generated source. On release, Fern automatically publishes the CLI to npm, Homebrew, and GitHub Releases so your users can install it with their package manager of choice. The CLI stays in sync with your Docs and SDKs, and you never need to write CLI code by hand.

The output is a single statically linked Rust binary. Users drop it onto their PATH and run it. There's no language runtime and no dependencies.

## Built for agents and humans

<CardGroup cols={3}>
<Card title="Runtime introspection" icon="fa-duotone fa-magnifying-glass">
Schema and help available as structured JSON.
</Card>
<Card title="Input validation" icon="fa-duotone fa-shield-halved">
Double-encoded URLs and other malformed inputs are caught before any request is sent.
</Card>
<Card title="MCP server built in" icon="fa-duotone fa-plug">
The same binary serves MCP over stdio or streamable HTTP.
</Card>
<Card title="Interactive output" icon="fa-duotone fa-terminal">
Colored help, tabular output, and shell completions.
</Card>
<Card title="Dry-run mode" icon="fa-duotone fa-eye">
Preview a request without sending it.
</Card>
<Card title="Version-pinned" icon="fa-duotone fa-code-branch">
Each release maps to a specific API version.
</Card>
</CardGroup>
Loading