Overview
The Turf™ CLI, turf, is an agent of its own: it drives the same MCP server and engine your agent
uses, with a model you bring. It is a convenience, not a requirement. The MCP server is the product,
and the CLI is one way to use it.
When to use it
Section titled “When to use it”Use your own agent when you have one. Claude Code, Claude Desktop, Cursor, Codex, Gemini CLI and VS Code connect to the server directly (Connect your agent), and in Claude Code and Claude Desktop Turf runs on your Claude subscription, with no model API key.
Reach for the CLI when you want:
- an agent in the terminal, with no other client:
turf chat; - one command per rollout:
cd path/to/config && turf up, orturf destroy; - Turf in a script, a CI job or another agent:
turf exec, with--jsonand--yes; - your own look and voice on the agent you hand to your users, without a fork (Theming and co-branding).
The CLI needs a model: a hosted provider’s API key, or a local model with no key and no cost (Model providers).
Install
Section titled “Install”The Homebrew install puts turf beside the server and the engine, and so does the install script:
see Install locally. The npx install carries the server and the engine
without the CLI.
To build just the CLI from source (it is MPL-2.0):
go install github.com/turfbuild/turf@latest # a turf binary# or, from a clone:make build # bin/turfThe CLI launches turf-mcp-server as a subprocess and must find it, on PATH or where
TURF_MCP_SERVER (or --mcp-server) points:
which turf-mcp-server # is the server reachable?export TURF_MCP_SERVER=/path/to/turf-mcp-serverHow it fits
Section titled “How it fits”The CLI runs its agent on Docker’s docker-agent runtime. It never imports the server’s code: the only contract is the MCP protocol, spoken over stdio.
Commands
Section titled “Commands”| Command | What it does |
|---|---|
turf chat, or turf alone |
An interactive session in the terminal (Chat) |
turf up [instructions] |
Deploy or update the configuration in the current directory (Up and destroy) |
turf destroy [instructions] |
Destroy everything the configuration manages |
turf exec [message] |
Run one request without the TUI (Scripting with exec) |
turf login <host>, turf logout <host> |
Save or remove an API token for a registry or a remote state backend (Log in to a host) |
turf console [link] |
Sign this browser in to the local console, once (The console) |
turf telemetry [status|on|off] |
Show or change whether the engine sends anonymous usage telemetry (details) |
turf license |
Print the license and the third-party notices |
turf license accept |
Accept the license terms, once (Accept the license) |
turf license status |
Show whether the license terms are accepted |
turf version |
Print the version, the license in one line and the telemetry setting (as turf --version does) |
turf completion |
Generate the autocompletion script for your shell |
Every command takes the global flags: Flags and environment.
In this chapter
Section titled “In this chapter”- Chat: the TUI, the lean TUI, sessions, memory,
/guide. - Up and destroy: one command per rollout, what you answer in the
terminal,
--yes. - Scripting with exec: one request, headless;
--jsonevents; exit status. - Log in to a host:
turf login,turf logout,TF_TOKEN_<host>. - The console:
turf consolesigns your browser in once. - Flags and environment: every flag, variable and file.
- Model providers: hosted keys, models on your own machine, OpenAI-compatible endpoints,
turf.yaml. - Skills: your own procedures, in
.turf/skills. - Theming and co-branding: terrain themes, custom themes, a distributor’s
branding:. - Troubleshooting: when turf won’t start, or a local model fails.
Examples
Section titled “Examples”Runnable examples live in turfbuild/turf-examples:
- Configuring the CLI:
a per-project
.turf/turf.yamlwith credential-basedfirst_availablemodel fallback and named models, plus a project skill in.turf/skills/. Copy it as a starting point for your own.turf/. - Infrastructure configurations: ordinary HCL you drive with
turf -C <dir>. A local Kubernetes® kind cluster (a CRD and a custom resource, or a Helm® release; credential-free, Docker only), Azure and GCP modules, and tours of language features (Terraform® actions, turf actions).
License
Section titled “License”The CLI’s source is licensed under the Mozilla Public License 2.0, which governs the source and
anything you build from it. Turf as every release ships it, the turf, turf-mcp-server,
turf-engine, turf-builtin-provider and turf-ui programs and the container images that hold
them, is proprietary software under the
Turf Community Edition License 1.0. It is free for individuals,
education and small businesses within the Community limits; government and larger organizations need
a commercial license (licensing).
The terms are accepted once. On its first run in a terminal, turf asks: type yes. Or run
turf license accept beforehand. Where there is no terminal, such as a CI job, turf prints the
license notice and exits with status 77 unless TURF_ACCEPT_EULA=yes or --accept-eula is given,
and giving either accepts the terms. turf license status shows whether they are accepted, and
turf license prints the license and the third-party notices.
Turf™ is a trademark of Turf LLC. Terraform® is a trademark of HashiCorp. Ansible® is a trademark of Red Hat, LLC, registered in the United States and other countries. Helm®, Kubernetes®, Prometheus® and OpenTelemetry® are registered trademarks, and Jaeger™ is a trademark, of the Linux Foundation. OpenTofu® and Model Context Protocol® are registered trademarks of LF Projects, LLC. All other trademarks are the property of their respective owners. Turf is not affiliated with, endorsed by, or sponsored by HashiCorp, IBM, Red Hat, the Linux Foundation, LF Projects or the OpenTofu project.
© 2026 Turf LLC. Free for individuals, education and small businesses within the Community limits, under the Turf Community Edition License 1.0. Government and larger organizations need a commerciallicense.turf.build · Discord ·GitHub