CLI Reference¶
Verified status as of March 28, 2026. Runtime note: FastFN resolves dependencies and build steps per function: Python uses
requirements.txt, Node usespackage.json, PHP installs fromcomposer.jsonwhen present, and Rust handlers are built withcargo. Host runtimes/tools are required infastfn dev --native, whilefastfn devdepends on a running Docker daemon. The fastfn CLI is the entrypoint for local development, diagnostics, docs, and scaffolding.
Quick checks¶
Print the CLI version:
Current output format:
Installation¶
Build the binary and place it on your PATH:
The binary is written to ./bin/fastfn.
Commands¶
init¶
Create a runtime-specific starter scaffold.
Usage:
Arguments:
<name>: function directory name.
Flags:
-t, --template:node(default),python,php,lua,rust(experimental).
Scaffold behavior:
fastfn init hello -t nodecreates./hello/withhandler.jsandfn.config.json.fastfn init hello -t pythoncreates./hello/withhandler.py,fn.config.json, andrequirements.txt.
The scaffold uses path-neutral layout (no runtime prefix). All templates create handler.<ext> with a handler(event) function.
Example:
Generated files:
fn.config.jsonhandler.<ext>(handler.js,handler.py,handler.php,handler.lua, orhandler.rs)requirements.txt(Python only)
dev¶
Start the development server with hot reload.
Usage:
Arguments:
[directory]: functions root to scan. Defaults to the current directory, orfastfn.jsonfunctions-dirwhen configured.
Flags:
--native: run on the host using local runtimes instead of Docker.--build: rebuild the runtime image before starting.--dry-run: print generated Docker Compose config and exit.--force-url: allow config/policy routes to override existing mapped URLs.
Examples:
run¶
Start the stack with production-oriented defaults.
Usage:
Flags:
--native: required today; production Docker mode is not wired yet.--force-url: allow config/policy routes to override existing mapped URLs.
Hot reload is enabled by default. Precedence: --hot-reload flag > FN_HOT_RELOAD env > hot-reload in fastfn.json > default (true). Set FN_HOT_RELOAD=0 to disable.
doctor / check¶
Run environment and project diagnostics. Exit status is non-zero when any check fails.
Usage:
Subcommands:
domains: validate DNS setup for custom domains.
Flags:
--json: machine-readable JSON output.--fix: apply safe local auto-fixes when possible.
Examples:
logs¶
Stream logs from a running FastFN stack.
Usage:
Flags:
--file: native log target:error|access|runtime|all(defaultall).--lines: tail line count (default200).--no-follow: print current logs and exit.--native: force native log backend.--docker: force Docker log backend.
Examples:
Use --file runtime when you want the full handler stdout/stderr stream in native mode.
docs¶
Open the local Swagger UI when the server is already running.
Notes¶
fastfn devis the normal development entrypoint.fastfn run --nativeis the production-like local mode.fastfn versionandfastfn --versionare equivalent.fastfn initcreates path-neutral scaffolds withhandler.<ext>as the entry file.