Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Fern CLI

$ fern Official Med Risk
Fern · Agent Bridges & Meta · Apache-2.0 · macos / linux / windows

Fern CLI (fern-api on npm) validates OpenAPI or Fern Definition workspaces (fern check) and generates idiomatic SDKs plus API docs (fern generate). Supports non-interactive FERN_TOKEN CI auth and --local Docker-backed local generation.

FCRS-1.0 Score
83 /100
Good
Medium Confidence
Zero-Friction Install
npm install -g fern-api
CLI vs MCP Decision CLI Only

fern check and fern generate --local run inside repo CI workflows to validate API specs and build SDKs without needing MCP.

Agent-Readiness Checklist

— JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 20 / 25

Clear fern check, fern generate --local, and FERN_TOKEN env auth, though outputs are human text rather than JSON.

  • Supports fern check, fern generate --local, and FERN_TOKEN
Trust & Safety 21 / 25

fern check validates specs read-only and --local keeps builds on-machine instead of publishing remotely.

  • Read-only fern check and --local generation guard
Setup & Portability 13 / 15

Cross-platform Node.js package (fern-api), though --local generator execution requires Docker.

  • Distributed as fern-api on npm; --local uses Docker
Utility & Efficiency 13 / 15

Combines OpenAPI/DSL validation, multi-language SDK generation, and API docs publishing.

  • Unified validation, SDK generation, and docs CLI
Maintenance & Lineage 9 / 10

Official fern-api/fern repository under Apache-2.0.

  • Official fern-api/fern repository
Docs & Verifiability 7 / 10

Well-organized CLI reference at buildwithfern.com.

  • Official docs at buildwithfern.com

Security, Auth & Guardrails

Auth Modes
OAuth Browser Env API Key
Credential Storage

Auth token stored locally after fern login or supplied non-interactively via FERN_TOKEN env var.

Side Effects
Read-Only Local Write Remote Write Billing Impact
Cost & Quotas

CLI and core generators are Apache-2.0 open-source; hosted Fern Docs and enterprise tiers are commercially billed.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Fern CLI Agent Rules
- Always run `fern check` after editing OpenAPI or `fern/` definitions.
- Prefer `fern generate --local` during development before cloud generation.
- Supply `FERN_TOKEN` via env var in CI instead of interactive `fern login`.

Agent-Ready Command Recipes

Safe Read-Only Queries

Validate Fern workspace and OpenAPI definitions
fern check

Validates OpenAPI/Fern API schemas, examples, and generators.yml without generating or publishing artifacts.

Controlled Writes & Previews

Run local SDK generation in Docker
fern generate --local

Executes configured SDK generators locally without pushing to remote registries.

Strengths for Agents

  • + fern check catches OpenAPI and example mismatches offline.
  • + fern generate --local allows safe local SDK verification before CI publish.
  • + Apache-2.0 open-source CLI (fern-api/fern).

Caveats & Pitfalls

  • ! Note the npm package name is fern-api while the installed binary is fern.
  • ! Local generator runs require Docker, and remote cloud generation requires FERN_TOKEN.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI