Command line
INFO
This page is generated from the CLI's own parser by scripts/docs_cli.py. askrgarden-cli <command> --help prints the same text.
The command is askrgarden-cli (askrgarden-cli.exe on Windows), the command-line program of the download; the installers can put it on the PATH. From a source checkout run .\askrgarden-cli.cmd (Windows) or ./askrgarden-cli.sh (macOS, Linux). Paths may be relative to the current folder.
Commands
| Command | What it does |
|---|---|
new | write a sample project |
validate | check a project file |
nodes | list node types (--json: full catalog with schemas) |
build | build and print stats |
export | build and write files |
engine-package | install the Unity / Godot / Unreal support package into a project or folder, or save it as a zip |
import | inspect a mesh, a PBRGenerator manifest or a texture pack (.pbrpack, .zip) |
pack-textures | write a .pbrpack from a PBRGenerator manifest and the maps it lists |
pbrgen | show where PBRGenerator (PBrokkR) is found and its version (exit 1: not found) |
make-textures | make a PBR texture set from an image with PBRGenerator |
pack | zip a project and its files into .treegenz |
unpack | unzip a .treegenz into a folder |
serve | run the local editor |
mcp | run the MCP server on stdio (for AI agents; see knowledge/product/mcp-server.md) |
Global options
| Argument | Default | Choices | What it does |
|---|---|---|---|
--version | — | — | show program's version number and exit |
new
Write a sample project.
Usage
askrgarden-cli new [-h] [--preset {acacia_umbrella,araucaria,bald_cypress,bamboo_clump,banana_plant,baobab,beech,birch,broadleaf,bush,cedar_of_lebanon,cherry_blossom,coconut_palm,colonized,cone_topiary,conifer,date_palm_small,dead_snag,dragon_tree,embauba,english_oak,eucalyptus,giant_sequoia,italian_cypress,italian_stone_pine,jabuticaba,jacaranda,joshua_tree,larch,lombardy_poplar,mango,mangrove,maple_autumn,norway_spruce,olive,round_boxwood_ball,royal_palm,rubber_tree_kapok,scots_pine,silver_birch,spiral_or_cloud_topiary,square_hedge_block,strangler_fig,weeping_willow,wild_bush,yellow_ipe}] [--name NAME] [--seed SEED] [--force] path| Argument | Default | Choices | What it does |
|---|---|---|---|
path (required) | — | — | project file to write (.treegen.json) |
--preset | broadleaf | 46 … | |
--name | — | — | |
--seed | — | — | |
--force | — | — |
Examples
askrgarden-cli new out/oak.treegen.json --preset broadleaf --seed 7
askrgarden-cli new out/spruce.treegen.json --preset norway_sprucevalidate
Check a project file.
Usage
askrgarden-cli validate [-h] [--json] path| Argument | Default | Choices | What it does |
|---|---|---|---|
path (required) | — | — | project file to check |
--json | — | — |
Examples
askrgarden-cli validate out/oak.treegen.json
askrgarden-cli validate out/oak.treegen.json --jsonnodes
List node types (--json: full catalog with schemas).
Usage
askrgarden-cli nodes [-h] [--json] [--lang {en,pt}] [-v]| Argument | Default | Choices | What it does |
|---|---|---|---|
--json | — | — | |
--lang | en | en, pt | |
-v, --verbose | — | — |
Examples
askrgarden-cli nodes
askrgarden-cli nodes -v --lang pt
askrgarden-cli nodes --json > catalog.jsonbuild
Build and print stats.
Usage
askrgarden-cli build [-h] path| Argument | Default | Choices | What it does |
|---|---|---|---|
path (required) | — | — | project file to build |
Examples
askrgarden-cli build out/oak.treegen.jsonexport
Build and write files.
Usage
askrgarden-cli export [-h] [-f FORMAT] [--all-formats] [-o OUT] [--impostor] [--fbx-via {native,blender}] [--no-textures] [--atlas] [--cards N] [--card-px CARD_PX] [--card-back {mirror,render}] [--cards-only] path| Argument | Default | Choices | What it does |
|---|---|---|---|
path (required) | — | — | project file to export |
-f, --format | — | — | glb, gltf, fbx, obj, usda (comma separated) |
--all-formats | — | — | |
-o, --out | — | — | output folder (default out/exports/<name>) |
--impostor | — | — | bake the impostor even if tree_output has it off |
--fbx-via | native | native, blender | |
--no-textures | — | — | write no texture files; materials keep their factors only (the impostor is left out) |
--atlas | — | — | merge all materials into one material with one texture set (one mesh per LOD, UVs remapped) |
--cards N | — | 1, 2, 3, 4 | also write vegetation cards: N crossed textured planes (1 = billboard), <name>_Card.<ext> + <name>_Card_BaseColor.png / _Normal.png |
--card-px | 512 | — | long side of one card frame in pixels, 128-2048 |
--card-back | mirror | mirror, render | back of each card plane: mirror the front frame (default) or render its own frame (the plant seen from the other side; 2N frames, single-sided material) |
--cards-only | — | — | write only the card files and the manifest |
Examples
askrgarden-cli export out/oak.treegen.json -f glb,fbx -o out/oak
askrgarden-cli export out/oak.treegen.json --all-formats --impostor
askrgarden-cli export out/oak.treegen.json --atlas
askrgarden-cli export out/grass.treegen.json -f glb --cards 2 --card-px 512 --cards-onlyengine-package
Install the Unity / Godot / Unreal support package into a project or folder, or save it as a zip.
Usage
askrgarden-cli engine-package [-h] [--zip] [--list] [{unity,godot,unreal}] [dest]| Argument | Default | Choices | What it does |
|---|---|---|---|
engine (required) | — | unity, godot, unreal | which engine |
dest (required) | — | — | engine project folder (the package goes where the engine looks for it), any other folder, or with --zip the folder for the zip |
--zip | — | — | write AskrGarden-<Engine>-<version>.zip instead of copying |
--list | — | — | list the engines and whether each is present in this build |
Examples
askrgarden-cli engine-package --list
askrgarden-cli engine-package unity D:/Projects/MyGame
askrgarden-cli engine-package godot out/packages --zipimport
Inspect a mesh, a PBRGenerator manifest or a texture pack (.pbrpack, .zip).
Usage
askrgarden-cli import [-h] [--project PROJECT] [--extract DIR] path| Argument | Default | Choices | What it does |
|---|---|---|---|
path (required) | — | — | a mesh (GLB, glTF, OBJ, FBX), a <prefix>_manifest.json or a texture pack |
--project | — | — | project file the manifest paths are relative to |
--extract DIR | — | — | texture pack: unpack into DIR/<pack name> and print the pbr_material params, instead of only describing it |
Examples
askrgarden-cli import some_mesh.fbx
askrgarden-cli import bark_manifest.json
askrgarden-cli import bark.pbrpack --extract texturespack-textures
Write a .pbrpack from a PBRGenerator manifest and the maps it lists.
Usage
askrgarden-cli pack-textures [-h] [-o OUT] [--kind {bark,leaf,ground,generic}] [--name NAME] [--tile-size TILE_SIZE] [--alpha-mode {opaque,mask}] [--alpha-cutoff ALPHA_CUTOFF] [--double-sided {yes,no}] manifest| Argument | Default | Choices | What it does |
|---|---|---|---|
manifest (required) | — | — | <prefix>_manifest.json (the maps sit beside it) |
-o, --out | — | — | output file (default: <prefix>.pbrpack beside the manifest) |
--kind | generic | bark, leaf, ground, generic | |
--name | — | — | pack and material name (default: the manifest's output prefix) |
--tile-size | — | — | physical size of one tile in meters |
--alpha-mode | — | opaque, mask | |
--alpha-cutoff | — | — | |
--double-sided | — | yes, no |
Examples
askrgarden-cli pack-textures bark_manifest.json --kind bark --tile-size 0.8pbrgen
Show where PBRGenerator (PBrokkR) is found and its version (exit 1: not found).
Usage
askrgarden-cli pbrgen [-h] [--pbrgen DIR]| Argument | Default | Choices | What it does |
|---|---|---|---|
--pbrgen DIR | — | — | PBRGenerator folder (default: $TREEGEN_PBRGEN, else ../PBRGenerator) |
Examples
askrgarden-cli pbrgen
askrgarden-cli pbrgen --pbrgen D:/tools/PBRGeneratormake-textures
Make a PBR texture set from an image with PBRGenerator.
Usage
askrgarden-cli make-textures [-h] [--kind {bark,leaf,ground,generic}] [--name NAME] [--project PROJECT] [-o OUT] [--input-kind {photo,height,normal}] [--preset PRESET] [--size SIZE] [--tile-size TILE_SIZE] [--seam-mode SEAM_MODE] [--normal-strength NORMAL_STRENGTH] [--timeout TIMEOUT] [--pbrgen DIR] image| Argument | Default | Choices | What it does |
|---|---|---|---|
image (required) | — | — | photo (or height / normal map) |
--kind | generic | bark, leaf, ground, generic | what the set is for (material defaults) |
--name | — | — | material and folder name (default: the image name) |
--project | — | — | project file: the set goes to <its folder>/textures/<name>/ (default: ./textures) |
-o, --out | — | — | textures folder (the set goes to OUT/<name>/); overrides --project's folder |
--input-kind | photo | photo, height, normal | |
--preset | — | — | a PBRGenerator preset name |
--size | — | — | work at this square size in pixels |
--tile-size | — | — | physical size of one tile in meters |
--seam-mode | — | — | how the photo is made to tile (default: periodic for bark and ground) |
--normal-strength | — | — | |
--timeout | 300.0 | — | seconds before the run is stopped |
--pbrgen DIR | — | — | PBRGenerator folder (default: $TREEGEN_PBRGEN, else ../PBRGenerator) |
Examples
askrgarden-cli make-textures photos/oak_bark.jpg --kind bark --project out/oak.treegen.jsonpack
Zip a project and its files into .treegenz.
Usage
askrgarden-cli pack [-h] [-o OUT] path| Argument | Default | Choices | What it does |
|---|---|---|---|
path (required) | — | — | project file to bundle |
-o, --out | — | — |
Examples
askrgarden-cli pack out/oak.treegen.jsonunpack
Unzip a .treegenz into a folder.
Usage
askrgarden-cli unpack [-h] [-o OUT] path| Argument | Default | Choices | What it does |
|---|---|---|---|
path (required) | — | — | the .treegenz bundle |
-o, --out | — | — |
Examples
askrgarden-cli unpack oak.treegenz -o shared/oakserve
Run the local editor.
Usage
askrgarden-cli serve [-h] [--host HOST] [--port PORT] [--root ROOT] [--library LIBRARY] [--open] [--app] [--exit-when-closed]| Argument | Default | Choices | What it does |
|---|---|---|---|
--host | 127.0.0.1 | — | |
--port | 8770 | — | |
--root | — | — | app folder (examples, bundled textures; default: the folder AskrGarden runs from) |
--library | — | — | folder for saved trees and exports (default: the saved setting, else Documents/AskrGarden) |
--open | — | — | open the browser |
--app | — | — | open the editor in an app window (Edge or Chrome --app); falls back to the browser |
--exit-when-closed | — | — | stop the server once the editor page is closed (what the askrgarden program does) |
Examples
askrgarden-cli serve --open
askrgarden-cli serve --app --library D:/Treesmcp
Run the MCP server on stdio (for AI agents; see knowledge/product/mcp-server.md).
Usage
askrgarden-cli mcp [-h] [--root ROOT] [--library LIBRARY] [--allow DIR]| Argument | Default | Choices | What it does |
|---|---|---|---|
--root | . | — | workspace folder: relative paths start here (default: the current one) |
--library | — | — | user library folder (default: the saved setting, else Documents/AskrGarden) |
--allow DIR | — | — | one more folder tools may read and write (repeatable) (repeatable) |
Examples
askrgarden-cli mcp --root D:/Projects/MyGame --allow D:/Shared/Textures