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
41 changes: 41 additions & 0 deletions fern/products/sdks/generators/cli/overview.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
title: CLI generator
description: Generate a production CLI from your API definition — for AI agents and human developers alike.
---

<Note title="In development">
The CLI generator is in active development. [Contact us](https://buildwithfern.com/contact) to learn more or request early access.
</Note>

Fern's CLI generator produces a fully functional command-line tool from the same API spec you already use for SDKs. It ships 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 SDK generators. On every spec change, Fern regenerates the CLI source and opens a PR against your repo. You merge, tag a release, and your build pipeline ships binaries to npm, Homebrew, and GitHub Releases.

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">
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.
</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>
7 changes: 7 additions & 0 deletions fern/products/sdks/sdks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,13 @@ navigation:
- page: Publishing to Postman
path: ./generators/postman/publishing-to-postman.mdx
slug: publishing
- section: CLI
slug: cli
availability: pre-release
contents:
- page: Overview
path: ./generators/cli/overview.mdx
slug: overview
- section: SDK design
slug: deep-dives
collapsed: true
Expand Down
Loading