Skip to content

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 ​

CommandWhat it does
newwrite a sample project
validatecheck a project file
nodeslist node types (--json: full catalog with schemas)
buildbuild and print stats
exportbuild and write files
engine-packageinstall the Unity / Godot / Unreal support package into a project or folder, or save it as a zip
importinspect a mesh, a PBRGenerator manifest or a texture pack (.pbrpack, .zip)
pack-textureswrite a .pbrpack from a PBRGenerator manifest and the maps it lists
pbrgenshow where PBRGenerator (PBrokkR) is found and its version (exit 1: not found)
make-texturesmake a PBR texture set from an image with PBRGenerator
packzip a project and its files into .treegenz
unpackunzip a .treegenz into a folder
serverun the local editor
mcprun the MCP server on stdio (for AI agents; see knowledge/product/mcp-server.md)

Global options ​

ArgumentDefaultChoicesWhat it does
--version——show program's version number and exit

new ​

Write a sample project.

Usage

text
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
ArgumentDefaultChoicesWhat it does
path (required)——project file to write (.treegen.json)
--presetbroadleaf46 …
--name——
--seed——
--force——

Examples

sh
askrgarden-cli new out/oak.treegen.json --preset broadleaf --seed 7
askrgarden-cli new out/spruce.treegen.json --preset norway_spruce

validate ​

Check a project file.

Usage

text
askrgarden-cli validate [-h] [--json] path
ArgumentDefaultChoicesWhat it does
path (required)——project file to check
--json——

Examples

sh
askrgarden-cli validate out/oak.treegen.json
askrgarden-cli validate out/oak.treegen.json --json

nodes ​

List node types (--json: full catalog with schemas).

Usage

text
askrgarden-cli nodes [-h] [--json] [--lang {en,pt}] [-v]
ArgumentDefaultChoicesWhat it does
--json——
--langenen, pt
-v, --verbose——

Examples

sh
askrgarden-cli nodes
askrgarden-cli nodes -v --lang pt
askrgarden-cli nodes --json > catalog.json

build ​

Build and print stats.

Usage

text
askrgarden-cli build [-h] path
ArgumentDefaultChoicesWhat it does
path (required)——project file to build

Examples

sh
askrgarden-cli build out/oak.treegen.json

export ​

Build and write files.

Usage

text
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
ArgumentDefaultChoicesWhat 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-vianativenative, 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, 4also write vegetation cards: N crossed textured planes (1 = billboard), <name>_Card.<ext> + <name>_Card_BaseColor.png / _Normal.png
--card-px512—long side of one card frame in pixels, 128-2048
--card-backmirrormirror, renderback 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

sh
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-only

engine-package ​

Install the Unity / Godot / Unreal support package into a project or folder, or save it as a zip.

Usage

text
askrgarden-cli engine-package [-h] [--zip] [--list] [{unity,godot,unreal}] [dest]
ArgumentDefaultChoicesWhat it does
engine (required)—unity, godot, unrealwhich 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

sh
askrgarden-cli engine-package --list
askrgarden-cli engine-package unity D:/Projects/MyGame
askrgarden-cli engine-package godot out/packages --zip

import ​

Inspect a mesh, a PBRGenerator manifest or a texture pack (.pbrpack, .zip).

Usage

text
askrgarden-cli import [-h] [--project PROJECT] [--extract DIR] path
ArgumentDefaultChoicesWhat 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

sh
askrgarden-cli import some_mesh.fbx
askrgarden-cli import bark_manifest.json
askrgarden-cli import bark.pbrpack --extract textures

pack-textures ​

Write a .pbrpack from a PBRGenerator manifest and the maps it lists.

Usage

text
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
ArgumentDefaultChoicesWhat it does
manifest (required)——<prefix>_manifest.json (the maps sit beside it)
-o, --out——output file (default: <prefix>.pbrpack beside the manifest)
--kindgenericbark, 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

sh
askrgarden-cli pack-textures bark_manifest.json --kind bark --tile-size 0.8

pbrgen ​

Show where PBRGenerator (PBrokkR) is found and its version (exit 1: not found).

Usage

text
askrgarden-cli pbrgen [-h] [--pbrgen DIR]
ArgumentDefaultChoicesWhat it does
--pbrgen DIR——PBRGenerator folder (default: $TREEGEN_PBRGEN, else ../PBRGenerator)

Examples

sh
askrgarden-cli pbrgen
askrgarden-cli pbrgen --pbrgen D:/tools/PBRGenerator

make-textures ​

Make a PBR texture set from an image with PBRGenerator.

Usage

text
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
ArgumentDefaultChoicesWhat it does
image (required)——photo (or height / normal map)
--kindgenericbark, leaf, ground, genericwhat 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-kindphotophoto, 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——
--timeout300.0—seconds before the run is stopped
--pbrgen DIR——PBRGenerator folder (default: $TREEGEN_PBRGEN, else ../PBRGenerator)

Examples

sh
askrgarden-cli make-textures photos/oak_bark.jpg --kind bark --project out/oak.treegen.json

pack ​

Zip a project and its files into .treegenz.

Usage

text
askrgarden-cli pack [-h] [-o OUT] path
ArgumentDefaultChoicesWhat it does
path (required)——project file to bundle
-o, --out——

Examples

sh
askrgarden-cli pack out/oak.treegen.json

unpack ​

Unzip a .treegenz into a folder.

Usage

text
askrgarden-cli unpack [-h] [-o OUT] path
ArgumentDefaultChoicesWhat it does
path (required)——the .treegenz bundle
-o, --out——

Examples

sh
askrgarden-cli unpack oak.treegenz -o shared/oak

serve ​

Run the local editor.

Usage

text
askrgarden-cli serve [-h] [--host HOST] [--port PORT] [--root ROOT] [--library LIBRARY] [--open] [--app] [--exit-when-closed]
ArgumentDefaultChoicesWhat it does
--host127.0.0.1—
--port8770—
--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

sh
askrgarden-cli serve --open
askrgarden-cli serve --app --library D:/Trees

mcp ​

Run the MCP server on stdio (for AI agents; see knowledge/product/mcp-server.md).

Usage

text
askrgarden-cli mcp [-h] [--root ROOT] [--library LIBRARY] [--allow DIR]
ArgumentDefaultChoicesWhat 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

sh
askrgarden-cli mcp --root D:/Projects/MyGame --allow D:/Shared/Textures