Functional AI is coming soon. Join the waitlist for early access.

CLI Reference

The fn CLI is a single static binary. Every command operates on a function in the current directory unless you pass a name.

CommandDescription
fn initScaffold a new function from a template
fn runExecute a function locally against an input
fn evalScore a function against a dataset
fn deployDeploy a version to an environment
fn pinPoint an alias (stable, canary) at a version
fn diffCompare two versions of a function
fn rollbackRevert an alias to a prior version
fn lsList functions, versions, and aliases
fn logsStream run logs for a deployed function

fn init

fn init <name> [--template <template>]

Creates <name>/fn.yml. Built-in templates: classify, summarize, extract, transform, generate.

fn run

fn run <name>[@<version>] --input <path> [--json]

Runs a function locally. Defaults to the latest local version. --json prints only the structured output, with no metadata line — useful for piping.

fn eval

fn eval <name>[@<version>] --dataset <file.jsonl> [--threshold <0-1>] [--runs <n>]

Grades a function against a dataset. --runs re-executes each case N times to measure consistency. Exits non-zero when the score is below --threshold.

fn deploy

fn deploy <name> --env <environment>

Compiles the current function into a new immutable version and ships it to the named environment. Prints the version and endpoint URL.

fn pin & fn rollback

fn pin <name> <alias> --to <version>
fn rollback <name> --to <version>

Aliases are moving pointers. fn rollback is sugar for re-pinning stable to an earlier version — instant, with no rebuild.