CLI reference
Every beetree command, generated from the binary.
This page is generated from the beetree binary (task docs:cli). Do not edit it by hand.
beetree
BeeTree is a behavior tree ecosystem that makes it easy to author, share, and deploy behavior trees to any game engine.
Define behavior trees in an engine-agnostic .beetree.yaml specification, then generate native code for Unity (C#), Unreal (C++), and Godot (GDScript).
Quick start:
beetree init Initialize a new project
beetree new <name> Create a behavior tree
beetree builder [file] Launch the interactive TUI editor
beetree validate <file> Validate a tree spec
beetree generate unity <file> Generate engine code (unity/unreal/godot)
beetree
beetree builder
Launch the interactive behavior tree editor.
If a .beetree.yaml file is provided, it will be loaded for editing. Otherwise, a new empty tree is created.
Navigate mode:
a Add a child node
e Edit the selected node
d Delete the selected node
c Duplicate the selected node
m Start a move, then press m on the target to place it
p Edit node parameters
b Edit blackboard variables
u Undo the last change
U Redo
r Run the step-through simulation
R Run the whole tree and show the final status and trace
v Validate the tree
/ Search nodes by name
s Save
S Save as a new path
q Quit (prompts if unsaved)
? Show the help overlay
Up/Down Move the selection
Left/Right Collapse or expand the node
Enter Collapse or expand the node
Move mode:
Up/Down Choose the target parent
m Place the node under the target
Esc Cancel the move
Simulate mode:
S Resolve the paused leaf as Success
F Resolve the paused leaf as Failure
R Resolve the paused leaf as Running
Esc Stop the simulation
q Leave the finished simulation
Evaluate mode:
Up/Down Scroll the trace of a full evaluation
Esc Close the full evaluation
q Close the full evaluation
beetree builder [file]
Examples
beetree builder
beetree builder trees/enemy-ai.beetree.yaml
beetree diff
Show the differences between two .beetree.yaml specs node by node: nodes added, removed or reordered, changed parameters, policies and references, and changes to blackboard variables and custom node declarations.
beetree diff <file1> <file2>
Examples
beetree diff trees/enemy-ai.beetree.yaml trees/enemy-ai-v2.beetree.yaml
beetree doctor
Run diagnostics on the current BeeTree project.
beetree doctor
Examples
beetree doctor
beetree generate
Generate native game engine code from a .beetree.yaml specification.
First run generates everything including stubs. Subsequent runs regenerate tree definitions but skip existing stubs unless –overwrite is passed.
Use –all to generate for all .beetree.yaml files found in the trees/ directory.
beetree generate
Examples
beetree generate unity trees/enemy-ai.beetree.yaml
beetree generate godot trees/enemy-ai.beetree.yaml --output generated/godot
beetree generate unreal --all --dry-run
beetree generate godot
Generate Godot GDScript code from one .beetree.yaml spec, or from every spec in trees/ with –all.
Tree definitions are regenerated on every run; node stubs are written once and kept on later runs unless –overwrite is passed. –dry-run lists the files without writing them.
beetree generate godot [file] [flags]
Examples
beetree generate godot trees/enemy-ai.beetree.yaml
beetree generate godot trees/enemy-ai.beetree.yaml --output generated/godot
beetree generate godot --all --dry-run
Flags
--all Generate for all .beetree.yaml files in trees/
--dry-run Preview what would be generated
--output string Output directory for generated code
--overwrite Overwrite existing stub files
beetree generate unity
Generate Unity C# code from one .beetree.yaml spec, or from every spec in trees/ with –all.
Tree definitions are regenerated on every run; node stubs are written once and kept on later runs unless –overwrite is passed. –dry-run lists the files without writing them.
beetree generate unity [file] [flags]
Examples
beetree generate unity trees/enemy-ai.beetree.yaml
beetree generate unity trees/enemy-ai.beetree.yaml --output generated/unity
beetree generate unity --all --dry-run
Flags
--all Generate for all .beetree.yaml files in trees/
--dry-run Preview what would be generated
--output string Output directory for generated code
--overwrite Overwrite existing stub files
beetree generate unreal
Generate Unreal C++ code from one .beetree.yaml spec, or from every spec in trees/ with –all.
Tree definitions are regenerated on every run; node stubs are written once and kept on later runs unless –overwrite is passed. –dry-run lists the files without writing them.
beetree generate unreal [file] [flags]
Examples
beetree generate unreal trees/enemy-ai.beetree.yaml
beetree generate unreal trees/enemy-ai.beetree.yaml --output generated/unreal
beetree generate unreal --all --dry-run
Flags
--all Generate for all .beetree.yaml files in trees/
--dry-run Preview what would be generated
--output string Output directory for generated code
--overwrite Overwrite existing stub files
beetree init
Creates a beetree.yaml manifest and project directory structure in the current directory.
beetree init [flags]
Examples
beetree init
beetree init --name enemy-ai
Flags
--name string Project name (defaults to directory name)
beetree login
Sign this terminal in to beetreecraft.com with an API key, so push, pull and search –mine work without setting anything else.
Make a key on your profile page (https://beetreecraft.com/app/#/profile). pull and search –mine need the trees:read scope; push needs trees:read and trees:write.
login asks for the key without showing what you type, or reads it from standard input with –key-stdin. It never takes the key as an argument, so the key stays out of your shell history. It checks the key with the site before storing it, in your config directory, readable by you alone.
BEETREE_API_KEY, when set, is used instead of the stored key (for scripts and CI). BEETREE_API_URL points the terminal at another copy of the API.
beetree login [flags]
Examples
beetree login
beetree login --key-stdin < key.txt
beetree whoami
Flags
--key-stdin Read the key from standard input instead of a prompt
beetree logout
Delete the API key that beetree login stored. The key itself keeps working
until you revoke it on your profile page (https://beetreecraft.com/app/#/profile).
beetree logout
Examples
beetree logout
beetree new
Creates a new .beetree.yaml file in the trees/ directory.
Available templates (–template):
default Starter tree with selector, sequence, condition, and action
patrol NPC patrol loop with waypoints
combat Priority-based combat AI with flee/attack/chase/idle
utility Utility-selector based decision making
blank Minimal empty tree (just a root selector)
beetree new <name> [flags]
Examples
beetree new enemy-ai
beetree new guard --template patrol
Flags
--template string tree template (default, patrol, combat, utility, blank) (default "default")
beetree node
Manage behavior tree node types
beetree node
beetree node add
Add a new child node under the specified parent.
beetree node add <file> <parent-name> <node-name> [flags]
Examples
beetree node add trees/enemy.beetree.yaml combat reload --type action --node Reload
beetree node add trees/enemy.beetree.yaml root flee_check --type condition --node FleeCheck
Flags
--decorator string Decorator type (for decorator nodes)
--node string Node class name (e.g., Patrol, HasTarget)
--type string Node type (action, condition, sequence, selector, parallel, decorator) (default "action")
beetree node edit
Edit a node’s name, type, node class, or decorator in place.
beetree node edit <file> <node-name> [flags]
Examples
beetree node edit trees/enemy.beetree.yaml patrol --name guard
beetree node edit trees/enemy.beetree.yaml attack --type condition --node HasAmmo
beetree node edit trees/enemy.beetree.yaml flee --decorator negate
Flags
--decorator string New decorator type
--name string New node name
--node string New node class name
--type string New node type
beetree node list
List the node types a tree can use, with a one-line description of each and whether it is a core type or an extension. –filter narrows the list to core or extension types.
beetree node list [flags]
Examples
beetree node list
beetree node list --filter core
Flags
--filter string Filter by category: core, extension
beetree node move
Detach a node (and its subtree) and reattach under a new parent.
beetree node move <file> <node-name> --to <parent-name> [flags]
Examples
beetree node move trees/enemy.beetree.yaml patrol --to combat
Flags
--to string Destination parent node name
beetree node remove
Remove a node and all its children from the tree.
beetree node remove <file> <node-name>
Examples
beetree node remove trees/enemy.beetree.yaml patrol
beetree pull
Fetch a tree saved on beetreecraft.com and write it as a .beetree.yaml file in the current directory, named after the tree (or the file given with -o).
Name the tree by its id (the last column of beetree search) or by the
address of its page, such as https://beetreecraft.com/app/#/tree/<id>.
pull needs this terminal signed in (beetree login) with a key that has
the trees:read scope (make one on your profile page). It reads public trees and your own private ones; another
person’s private tree answers “not found”, the same as a tree that does not
exist.
The first line of the file records where it came from and when. pull never overwrites a file that differs from the tree on the site: it shows what would change and stops, unless –force is given.
beetree pull <id or page address> [flags]
Examples
beetree pull 7f3c9a2e
beetree pull https://beetreecraft.com/app/#/tree/7f3c9a2e -o trees/guard.beetree.yaml
beetree pull 7f3c9a2e --force
Flags
--force Replace a file that differs from the tree on the site
-o, --output string File to write (default: the tree's name, as <name>.beetree.yaml)
beetree push
Validate a .beetree.yaml file and save it to your account on beetreecraft.com.
A new tree is private: only you can see it. Pass –public to share it, so
anyone can find it with beetree search and fetch it with beetree pull.
When your account already has a tree with the same name (metadata.name), push
updates that tree after showing what changes, and keeps its visibility unless
–public or –private is given. It never makes a second copy unless –new is
given. An invalid tree is not sent: push shows the errors beetree validate
shows.
push needs this terminal signed in (beetree login) with a key that has
the trees:read and trees:write scopes (make one on your profile page).
beetree push <file> [flags]
Examples
beetree push guard.beetree.yaml
beetree push guard.beetree.yaml --public
beetree push guard.beetree.yaml --new
Flags
--new Save a new copy even when your account has a tree of the same name
--private Make an existing public tree private again
--public Make the tree public, so anyone can find and pull it
beetree render
Render a .beetree.yaml specification file as a visual tree diagram.
Supported formats:
ascii - Indented ASCII tree with [TAG] labels (default)
sigil - Unicode sigil tree (→ ? ! ¿ ◇ ⇒)
compact - Sigil tree with indentation only (ideal for diffing)
oneline - Single-line S-expression (for commit messages, search)
mermaid - Mermaid flowchart syntax
dot - Graphviz DOT digraph
beetree render <file> [flags]
Examples
beetree render trees/enemy-ai.beetree.yaml
beetree render trees/enemy-ai.beetree.yaml --format mermaid
beetree render trees/enemy-ai.beetree.yaml --format dot | dot -Tsvg > enemy-ai.svg
Flags
--format string Output format: ascii, sigil, compact, oneline, mermaid, dot (default "ascii")
beetree search
Search the public trees people have shared on beetreecraft.com by name, description or tag. With no words, list them all.
Each line shows the tree’s name, its author, tags, likes and, last, its id.
–mine lists your own trees instead, private ones included; it needs this
terminal signed in (beetree login) with a key that has the trees:read
scope (make one on your profile page). With a key, the search reads the live listing; without
one, it reads the public snapshot, refreshed daily.
–json prints the API’s answer as it came, for scripts.
beetree search [words...] [flags]
Examples
beetree search patrol
beetree search --mine
beetree search guard --json
Flags
--json Print the API's answer as JSON, for scripts
--mine beetree login List your own trees, private ones included (needs beetree login)
beetree simulate
Walk the behavior tree and simulate execution, showing node traversal and resulting statuses. Use –override to force specific node outcomes, or –step to pause at each leaf and choose Success, Failure or Running yourself (answer s, f or r); composites resolve from your answers and the trace prints at the end. –step uses the same walker as the TUI.
beetree simulate <file> [flags]
Examples
beetree simulate trees/enemy-ai.beetree.yaml
beetree simulate trees/enemy-ai.beetree.yaml --override check_health=FAILURE
beetree simulate trees/enemy-ai.beetree.yaml --step
Flags
--override strings Force node outcome: name=STATUS (can repeat)
--step Pause at each leaf and choose its status interactively
beetree validate
Check each .beetree.yaml file against the tree format: it must parse, use known node types and decorators, give every node a unique name and the children its type needs, give each blackboard default a value of its type, use no field the format does not define, and refer only to subtrees it declares. Each problem names the file and the path to the node, and the command exits non-zero when any file is invalid.
beetree validate <file>...
Examples
beetree validate trees/enemy-ai.beetree.yaml
beetree validate examples/*.beetree.yaml
beetree version
Print the version of this beetree binary, to compare with the latest release.
beetree version
Examples
beetree version
beetree whoami
Show the account this terminal is signed in as, the name of the API key and its scopes, and what the key lets you do. The key itself is never printed.
It exits with an error when the terminal is not signed in or the key is refused, so a script can check before it pushes.
beetree whoami
Examples
beetree whoami