Skip to content

Commit a48af3c

Browse files
committed
condense and clarify
1 parent 6a672c4 commit a48af3c

1 file changed

Lines changed: 27 additions & 22 deletions

File tree

fern/products/sdks/generators/cli/overview.mdx

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,39 @@ title: CLI generator
33
description: Generate a production CLI from your API definition — for AI agents and human developers alike.
44
---
55

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

10-
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 — built for both AI agents that need deterministic, introspectable interfaces and human developers who want to script, debug, and explore.
10+
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.
1111

12-
## Why a CLI and why now
13-
14-
CLIs are how AI agents reach APIs in production. Agents invoke the command line because it gives them deterministic output, schemas they can introspect at runtime, and no interpreter or dependency tree to install.
15-
16-
Human developers want CLIs too — for scripting, CI, debugging, and exploring an API before committing to an SDK integration. Both audiences are well-served by a single binary.
17-
18-
Most API companies don't ship one because building a good CLI 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 CLI generator handles all of that automatically.
12+
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.
1913

2014
## How it works
2115

2216
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.
2317

24-
The output is a single statically linked Rust binary. Users drop it onto their PATH and run it — no language runtime, no dependencies.
25-
26-
## Designed for agents
27-
28-
**Self-describing at runtime.** Agents can ask what a command accepts instead of carrying that context in their window. Schema introspection and structured JSON help output let agents discover capabilities on the fly.
29-
30-
**Hardened against agent failure modes.** The CLI validates inputs — checking for path traversal, URL encoding issues, and malformed resource names — before any byte hits the network. It's the last enforcement point between an agent's output and your production API.
31-
32-
**CLI and MCP server in one.** Run the binary with `serve` and the same engine exposes MCP over stdio. The CLI and MCP server are generated from the same spec, so the two interfaces never drift apart.
33-
34-
## Built for humans too
35-
36-
The same binary produces colored help, tabular output, shell completions, and `--dry-run` previews when a person runs it interactively. It works offline, starts instantly, and each version maps to a specific API version for deterministic behavior.
18+
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.
19+
20+
## Built for agents and humans
21+
22+
<CardGroup cols={3}>
23+
<Card title="Runtime introspection" icon="fa-duotone fa-magnifying-glass">
24+
Schema and help available as structured JSON.
25+
</Card>
26+
<Card title="Input validation" icon="fa-duotone fa-shield-halved">
27+
Malformed inputs are caught before any request is sent.
28+
</Card>
29+
<Card title="MCP server built in" icon="fa-duotone fa-plug">
30+
The same binary serves MCP over stdio.
31+
</Card>
32+
<Card title="Interactive output" icon="fa-duotone fa-terminal">
33+
Colored help, tabular output, and shell completions.
34+
</Card>
35+
<Card title="Dry-run mode" icon="fa-duotone fa-eye">
36+
Preview a request without sending it.
37+
</Card>
38+
<Card title="Version-pinned" icon="fa-duotone fa-code-branch">
39+
Each release maps to a specific API version.
40+
</Card>
41+
</CardGroup>

0 commit comments

Comments
 (0)