Skip to main content
The Fern CLI (Terra) provides a comprehensive set of tools for developing, building, and deploying Fern applications. It simplifies the development workflow with intuitive commands for project creation, compilation, and platform-specific builds.

Installation

The Fern CLI is installed automatically when you install the Fern framework:
cd /path/to/fern
./install.sh
After installation, the fern command will be available globally.

Quick Start

fern sprout my_app
cd my_app

Available Commands

bloom

Check system health and dependencies

sprout

Create a new Fern project

fire

Run or build your project

prepare

Build for production deployment

install

Install Fern packages

templates

Manage project templates

lsp

Language Server Protocol tools

web-cache

Manage web build cache

Global Options

--help
flag
Display help information for any command
--version
flag
Display the Fern CLI version

Basic Usage

Display help for the CLI:
fern --help
Get help for a specific command:
fern fire --help
fern sprout --help

Environment Variables

ORIGINAL_CWD
string
The original working directory when the CLI was invoked. Used internally to maintain correct paths when changing directories.

Project Structure

Fern projects created with fern sprout follow this structure:
my_app/
├── lib/           # Main source code
│   └── main.cpp
├── web/           # Web platform files
│   └── template.html
├── linux/         # Linux platform files
├── assets/        # Images, fonts, etc.
├── examples/      # Example code
├── .fern/         # Fern metadata
├── .vscode/       # VS Code configuration
├── fern.yaml      # Project configuration
├── README.md
└── .gitignore

Configuration File

Projects use fern.yaml for configuration:
name: my_app
version: 1.0.0
description: A Fern project

dependencies:
  fern: ^0.1.0

platforms:
  web:
    enabled: true
    port: 3000
  linux:
    enabled: true

build:
  incremental: true
  optimize: false

Platform Support

The Fern CLI supports multiple target platforms:
  • Linux - Native Linux applications using X11
  • Web - WebAssembly applications using Emscripten
  • macOS - Native macOS applications using Cocoa (experimental)

Development Workflow

  1. Create a project with fern sprout
  2. Check your environment with fern bloom
  3. Develop locally with fern fire for rapid iteration
  4. Test on web with fern fire -p web
  5. Build for production with fern prepare <platform>

Terminal Output

The CLI provides color-coded output for better readability:
  • Green - Success messages
  • Yellow - Warnings and informational messages
  • Red - Errors
  • Blue - Headers and section titles
  • Cyan - Secondary information

Next Steps

Create Your First Project

Learn how to create a new Fern project

Run and Build

Compile and run your applications

System Health

Verify your development environment

Templates

Use templates for common project types

Build docs developers (and LLMs) love