TOML configuration guide for Tool-Tree

This guide is for Tool-Tree, the component that powers the function menu in the com.tool.tree Android app. All page configuration files must use TOML (XML is no longer supported). The parser lives in com.omarea.krscript.config.PageConfigReader and uses the org.tomlj:tomlj library.

This reference is intended for anyone authoring or maintaining a Tool-Tree .toml page: it documents every node type, every field (with its aliases, type, and default), and the runtime behavior around them - dependency evaluation, shell-script integration, page lifecycle, and load ordering. Sections 2-3 cover the shared rules and fields every node relies on; sections 5-16 document each node type in turn; sections 17-23 cover cross-cutting mechanics; sections 24-26 provide a worked example, a checklist of common mistakes, and a changelog of recently added fields.

A TOML configuration file describes the node tree of a page: each page is a list of nodes (group, action, switch, picker, text, page, editor, download, resource, menu, fab) displayed in the order they appear in the file. All nodes are declared flat at the top level of the document (dot-notation nesting like [[group.action]] has been removed) - a node that follows a [[group]] (and precedes the next one) automatically becomes a child of that group.

2. Syntax rules

2.1. Tables vs. arrays of tables

The parser accepts both a single TOML table such as [action] and an array-of-tables form such as [[action]]. The single-table form gives one entry; the double-bracket form is the repeatable form and is the recommended style for page nodes and child collections.

Do not mix forms for the same key as though they were separate entries. For example, declaring [group] and then another [[group]] is not a valid way to define two groups.
Recommended: use [[group]], [[action]], [[action.params]], [[text.rows]], and similar array-of-table forms whenever you may need more than one entry.

2.2. Node type = TOML table name

There is no separate type field for page nodes. A node's type is determined by its TOML table name. The root page parser reads the supported node tables from the document root:

Table nameNode typeDescription
groupContainerHolds child nodes - the flat entries declared after it become its children (no nesting)
pageSub-pageOpens another page when clicked
actionActionRuns a shell script
switchToggleOn/off switch with get/set shell
pickerPickerSingle/multi value selector
textRich text blockMulti-row text (bold/italic/link/photo...)
editorFile editorOpens a file in the built-in editor
downloadDownloadDownloads a file, then runs a script
resourceAsset extractionExtracts assets from APK (invisible)
menuOverflow menuToolbar 3-dot menu container
fabFloating buttonFAB container on the page

2.3. Group children = nearest preceding [[group]] (dot-notation removed)

All page-node types are declared as root-level [type] or [[type]] entries in the document. The dotted [[group.action]] / [[subgroup.type]] style is not supported. A child node simply belongs to the most recently declared [[group]] above it in the file; the parser assigns root entries to groups by source order.

This restriction applies to the page-node level. It does not remove node-owned child tables such as [[action.params]], [[action.params.options]], [[text.rows]], [[picker.options]], [[menu.items]], or [[fab.items]]; those are explicitly supported nested tables.
[[group]]
title = "CPU"

[[switch]]        # child of group "CPU"
...

[[action]]        # also a child of group "CPU"
...

[[group]]
title = "Battery"

[[switch]]        # child of group "Battery"
...
Unsupported: entries nested as page nodes via dotted paths such as [[group.action]] are not collected as page nodes. Only supported node tables at the document root are traversed for the page content; specialized child tables such as [[action.params]] are still parsed by their owning node.
Reserved name: [[toml]] is not a node type. It is only a marker used to recognize inline TOML output from config-sh (see section 5). If it appears in a file, the parser skips it harmlessly. It may carry one page-level setting, auto-refresh (see section 17.4).

2.4. Display order = position in file

Display order is always top-to-bottom by the position of the [[name]] entry in the file, regardless of node type (group, action, page, text, switch ...) - even when types are interleaved (e.g. an action, then a page, then another action). The position is read directly from the tomlj API, so there is no need for an order field.

The parser uses TomlArray.inputPositionOf(index).line() to obtain the line number of each array element. If the API returns null (due to error or unsupported feature), the parser falls back to read order (seq) - it never crashes.

2.5. Boolean fields: static vs. shell-backed

Tool-Tree does not treat every TOML boolean-looking field the same way. Ordinary boolean fields use a strict truthy parser; only fields explicitly defined as Bool|Shell (or a field with equivalent custom shell handling) execute a non-boolean string as a shell command.

Field kindtrue / 1false / 0Other string
Ordinary Booltruefalsefalse, unless that specific field declares an extra accepted truthy word
Bool|ShelltruefalseRun as shell; output exactly "1" => true, otherwise false
Custom boolean fieldsSome fields add their own accepted words or special empty-value behavior. See the field's section for the exact rules.

For example, support/visible and action show can execute a shell expression when given a non-boolean string. By contrast, confirm and auto-off are ordinary booleans; a string such as "echo 1" does not become a shell command there.

Fields whose shell result only decides layout, such as node/group/param support and action show, are resolved during parsing. Switch/picker/toggle get, row visibility shells, and parse-time *-sh dynamic strings are collected into the pending-state batch described in section 21.

2.6. String resource references

Static display-text fields that Tool-Tree passes through its string-resource resolver may include a reference to the app's string resources via @string/name or @string:name. This includes titles, descriptions, summaries, option titles, parameter labels/placeholders, row text, warning text, row confirmation text, and lock messages. If the resource is not found, the original string is kept.

Not every TOML string field is a resource reference. Scripts, URLs, paths, parameter values, and other fields consumed as raw strings are not automatically rewritten by StringResRef. The separate load-key mechanism can perform whole-document text substitution before TOML parsing.
[[group]]
title = "@string/group_battery_title"

[[switch]]
title = "@string/switch_fast_charge_title"
desc = "@string:switch_fast_charge_desc"
get = "getprop sys.fastcharge"
set = "setprop sys.fastcharge $state"
Both @string/name and @string:name point to the same resource lookup - use whichever separator you prefer, they are interchangeable.

2.7. load-key / load-text / load-toml - inline key/value substitution and dynamic TOML

A page may declare one directive line anywhere in the document (typically at the very top):

load-key = "strings_en.txt"

[[switch]]
title = "@wifi_title"
get = "settings get global wifi_on"
set = "settings put global wifi_on $state"

Before the TOML is parsed, the parser reads the key file and substitutes every @name token in the whole document with the matching value. This is a plain text pre-processing step (it runs on the raw file, before Toml.parse()), so @name works inside any string field - titles, descs, scripts, options, lock messages...

DirectiveDescription
load-key = "path"Path of the key file - resolved like every other path (relative to the page config dir, app-private dir, APK assets, or absolute), and accepts the {HOME}/{ICON} path placeholders described in §2.8
load-key-sh = "script"shell Script whose output is the key file path instead of a static path
load-text = """..."""Key lines written inline (name = "value" per line) instead of a file path. Accepts """...""" / '''...''' (multi-line, raw) and "..." (with escapes) / '...' (single line). May repeat
load-text-sh = "script"shell Script whose output is key text (e.g. load-text-sh = 'cat lang/extra.bash'). May repeat
load-toml = "path"Path of a .toml fragment - resolved like load-key. The directive line is replaced by the file content before parsing
load-toml-sh = "script"shell Script whose output is TOML text. The directive line is replaced by that output before parsing. Use any quote form ("..." with \" escapes, '...', """...""", '''...'''), e.g. load-toml-sh = 'bash menu.sh "$PAGE_CONFIG_DIR"'

The key file itself is a simple list of lines name = "value" (name starts with a letter/underscore; value is quoted; \ escape sequences are supported):

# strings_en.txt
wifi_title = "Wi-Fi booster"
wifi_desc = "Keep Wi-Fi on during sleep"
Substitution details: unknown @name references are left untouched; values are re-escaped (\ → \\, " → \") so they are safe inside TOML strings; the directive line itself is removed from the document after processing. Only the first load-key directive line is applied - later ones are ignored (load-toml* lines may repeat).
Quote forms - identical for load-key*, load-toml* and load-text*: "..." (with \" / \\ escapes), '...' (literal), """...""" and '''...''' (multi-line, raw). So a script can use either quote style, e.g. load-key-sh = 'echo "$PAGE_CONFIG_DIR/lang/vi.bash"'. Every load-key* line is removed from the document, but only the first one is applied.

Inline key text: load-text / load-text-sh

load-text takes the key lines directly, so no separate key file is needed. It can be combined with load-key in the same page:

load-key = "strings_en.txt"
load-text = """
extra_title = "Added inline"
wifi_desc = "Overrides the key file"
"""
load-text-sh = 'cat lang/more.bash'
Rules: load-text* is applied after load-key - keys missing from the key file are added, a same-name key is overridden, and a later load-text* line wins over an earlier one. Several lines are allowed. Each key line is a single line: name = "value" (escapes supported), name = 'value' or unquoted name=value (rest of the line, taken as-is - handy for echo "PTSH=$PTSH"); lines that do not match are ignored and an empty / failed output is skipped. Shell order in the shared round-trip: load-toml-sh, load-key-sh, then load-text-sh. The whole directive (including a multi-line block) is removed from the document before parsing.

Dynamic TOML: load-toml / load-toml-sh

These directives are handled in the same step as load-key, before Toml.parse(). All load-key-sh and load-toml-sh scripts run together in one shell round-trip. Order inside that round-trip: every load-toml-sh first (file order), load-key-sh last - so a toml script may create or delete the key file (e.g. lang/auto.bash) before the key path is resolved. Each load-toml* line is replaced in place by the loaded text, then {ROT}/{LOT} and the @name substitution run once over the merged document - so dynamic output can use @name too, and nodes keep the position (and group) of the directive line.

load-key = "strings_en.txt"
load-toml-sh = 'bash $ETC/menu-addon.sh "$PAGE_CONFIG_DIR"'

[[group]]
title = "@main_title"
# menu-addon.sh prints only what it needs - no [[group]]
echo '[[menu]]
[[menu.items]]
title = "@pin_text"
type = "checkbox"
get = "[ -f pin ] && echo 1"
silent = true
script = "touch pin"'
Rules: put the directive on its own line, between tables (never between the key/value lines of a table, because the inserted [[...]] headers would cut that table). Several load-toml* lines are allowed. Empty / failed output is skipped. Output is not scanned again, so load-key*/load-toml* lines inside it are dropped (no recursion). $1 is not set automatically - pass "$PAGE_CONFIG_DIR" (or $PAGE_CONFIG_FILE) yourself.
Do not print [[group]] from a script that only adds menu/fab entries: a [[group]] in the output opens a new group and every static node written after the directive would be assigned to it. Invalid TOML in the output makes the whole page fail to parse, like any other TOML error.
The token prefix used to change from $name to @name - a shell variable like $PATH/$HOME/$1 inside a script/run field would otherwise collide with a load-key of the same name. For the same reason, avoid naming a load-key string, color, or android - those are reserved by the @string/..., @color/... and @android:color/... resource references from §2.6 and §3.2, and a load-key with one of these names would shadow them.

2.8. Path placeholders: {HOME}, {ICON}

These are resolved by the path lookup itself (PathAnalysis), not by the whole-document text substitution above - so they only take effect inside fields that are actually treated as a path: icon/icon-sh output, photo, bg, logo, row icon/photo, html-file, the editor's file, resource-file/resource-dir, and load-key/load-key-sh above.

PlaceholderDescription
{HOME}The app's toolkit "home" directory. Equivalent to writing the absolute path by hand, but portable across app installs
{ICON}The app's icon directory (home/etc/icon) - a shortcut for icon assets shipped alongside the config, e.g. icon = "{ICON}/wifi.png"

2.9. Built-in variables: {ROT}, {LOT}, {TEXT_ROOT}

Unlike {HOME}/{ICON}, these are substituted directly on the raw document text and are always available with no load-key directive required. They report root state or provide a root-status label:

PlaceholderValue
{ROT}"1" if the device is rooted, "0" otherwise
{LOT}Opposite of {ROT}: "1" if not rooted, "0" if rooted
{TEXT_ROOT}Empty string when rooted; "ROOT" when the device is not rooted
[[action]]
title = "Flash module"
lock = "{LOT}|Requires root access"
script = "..."
The example above locks the action (with message "Requires root access") only on non-rooted devices, since {LOT} resolves to "1" there. {TEXT_ROOT} is useful when a label or script should contain the literal ROOT only on non-rooted devices. Because these substitutions happen on raw text before TOML parsing, they can appear inside string fields such as lock, script, or title.

3. Shared fields (NodeInfoBase + ClickableNode + RunnableNode)

These are the shared fields used by most visible page nodes through NodeInfoBase, with additional fields inherited by clickable and runnable nodes. Some page-level containers such as [[group]], [[menu]], [[fab]], and the invisible [[resource]] node are parsed by specialized code and do not accept every shared field listed below. [[text]] reads only key, support and load-after from this table - its title, desc and summary (and -sh forms) are not supported.

3.1. NodeInfoBase (shared by normal page nodes)

FieldAliasTypeDefaultDescription
title-String""Display title. Accepts @string/...
title-sh-String""shell Script that produces title dynamically. Runs during parse; overrides title
desc-String""Short description shown below title
desc-sh-String""shell Script that produces desc dynamically
summary-String""Extra info shown in small grey text
summary-sh-String""shell Script that produces summary dynamically
keyindex, idString""Explicit key/ID used by the node. The parser default is empty; the model also has an internal UUID in index, but that does not become key automatically. Long-pressing an item (add to the menu favorites / home screen) needs an id. If key is empty, the id is generated from the raw title as auto:<title> (a repeated title gets #2, #3...; a @key language reference is kept as @key so the id does not change with the app language). Not generated when title-sh is used or the title is empty. Editing or reordering same-titled items can break saved favorites - set an explicit key for stability.
cell-String""Only used inside a [[group]] with card = true (section 4.5): adjacent entries with the same cell value share one card, stacked with divider lines. Empty = the entry gets a card of its own
supportvisibleBool|ShelltrueHide/show this node. Accepts true/false or a shell returning "1"
load-after-Boolfalsetrue: a supported root-level page node is deferred instead of being built with the initial page result, then inserted at its original position (inside its group if any) after the page has already loaded. Use for a slow-to-build entry that would otherwise delay initial rendering. Parsed as an ordinary boolean; shell is not supported.

3.2. ClickableNode (for page, action, switch, picker, editor, terminal, download)

FieldAliasTypeDescription
iconicon-pathStringIcon path shown on the left of the item
icon-sh-Stringshell Script that produces the icon path dynamically. Runs during parse (batched with title-sh/desc-sh/summary-sh); overrides icon
logologo-pathStringLarge icon used when creating a shortcut (different from small icon)
photophoto-pathStringLarge image shown in the detail dialog
photo-sh-Stringshell Script that produces the photo path dynamically. Runs during parse (batched with title-sh/icon-sh/...); overrides photo
photo-real-sizephoto-original-sizeBooltrue: show image at its real size, no stretching
photo-gif-numgif-num, gif_numInt>0: image is an animated GIF (photo_1.png, photo_2.png...)
photo-gif-timegif-time, gif_timeIntTime per frame (ms; default 300)
photo-gif-autoplaygif-autoplay, gif_autoplayBooltrue (default): auto-play the GIF
photo-gif-loopphoto-gif-loop-count, gif-loop, gif-loop-count, gif_loop_countIntLoop count (0 = infinite)
photo-real-gifreal-gif, photo-gif-realBooltrue: photo points to a REAL .gif file (decoded via AnimatedImageDrawable) instead of the simulated frame-sequence GIF above. Requires Android 9 / API 28+ - on older devices this flag is ignored and falls back to a static first frame. When enabled, photo-gif-num/multi-path frame lists are not needed for this field
icon-gif-numicon-gif_numIntSame as photo-gif-num but for the small icon
icon-gif-timeicon-gif_timeIntTime per frame for the icon
icon-gif-autoplayicon-gif_autoplayBoolAuto-play icon GIF
icon-gif-loopicon-gif-loop-count, icon-gif_loop_countIntLoop count for the icon GIF
icon-real-gificon-gif-realBoolSame as photo-real-gif but for the small icon - REAL .gif file, Android 9/API 28+ only
bg-imagebg-photo, bg, bg-path (legacy)StringBackground image for the item/dialog. Same name and meaning on [[text]]/[[text.rows]]; background color is bg-color
bg-image-shbg-photo-sh, bg-sh (legacy)Stringshell Script that produces the background image path dynamically. Runs during parse (batched); overrides bg-image
bg-scale-StringHow the bg-image image fills the item (action, switch): fit (default, the image drives the item height) | crop (fills the item, centerCrop, does not change the height) | stretch (fills the item, fitXY). With crop/stretch the item must be tall enough from its own content
locklock-stateStringLock the item (no interaction allowed). true/1 = locked; or the format "state|message", e.g. lock = "1|Requires root" - the message is shown when the user clicks the locked item. The whole field is plain text, so the message accepts @string/... resource references (§2.6) as well as {ROT}/{LOT} and @key load-key substitution (§2.7-2.9), e.g. lock = "{LOT}|@root_required_msg"
lock-sh-Stringshell Script that checks the lock state dynamically (returns "1" = locked)
disableddisableBooltrue: the item is dimmed and cannot be tapped, long-pressed or triggered by key (no message is shown, unlike lock). The switch of a [[switch]] is disabled too. false (default): normal. Not the same as readonly of [[editor]] (file is read-only) or of a param
disabled-shdisable-shStringshell Script that decides dynamically: prints 1 = dimmed and not clickable, anything else = clickable again. Runs during parse (batched) and again whenever the item is refreshed (e.g. reload of its block); overrides disabled
widgetshow-widgetBoolIcon widget at the end of the item (arrow of [[page]], run/list button of [[action]], [[switch]] toggle, download icon and progress ring of [[download]], ...). false hides it; true forces it to show even if the group hides it; not set = follows the widget of its [[group]] (shown when the group does not set it). The item still works when tapped. A hidden switch no longer shows its on/off state, and a hidden download ring no longer shows progress (the progress text in desc is still updated)
title-belowtitle-bottomBoolOnly for entries drawn as a card (inside a [[group]] with card, columns or column-width). true moves the title under the icon row (icon on the left, widget on the right, then the title, then desc); false keeps the title next to the icon even if the group moves it. Not set = follows the title-below of its [[group]] (title next to the icon when the group does not set it). An entry without an icon keeps its title beside the (empty) icon slot, since there is nothing to go under. Ignored in normal list items (section 4.5)
min-sdksdk-minIntMinimum Android SDK version
max-sdksdk-maxIntMaximum Android SDK version (default 100)
target-sdksdk-targetIntTarget Android SDK version

3.3. RunnableNode (for action, switch, picker, download)

FieldAliasTypeDescription
confirm-BoolAsk for confirmation before running. The dialog shows the node title and its desc (also desc-sh); when desc is empty a default question is shown (kr_confirm_default, translated). warning is ignored while confirm = true; summary is never used
confirm-textconfirm-messageStringMessage of the confirmation dialog instead of desc (implies confirm = true). Legacy: confirm = "text" also works
warnwarningStringWarning text shown in the confirmation dialog
warn-shwarning-shStringshell Script that produces warning dynamically
auto-offauto-closeBoolAuto-close the log dialog after running.
auto-finish-BoolAuto-close the page after running
auto-kill-BoolAuto-kill related processes
auto-restart-BoolAuto-restart the service
interruptibleinterruptableBoolAllow interrupting mid-run
need-inputneeds-input, require-inputBoolScript uses read to receive keyboard input
reload-page-BoolReload the whole page after running
reload-Bool|Stringtrue = reload page; or a comma-separated list of block IDs to refresh only those blocks
shell-StringInteraction mode, NOT the script content: default (log dialog) / bg-task (background, no dialog) / hidden. Use script to declare the script itself
bg-taskbackground-task, async-taskBoolRun in background (no log dialog) - equivalent to shell = "bg-task"
shell-by-String[[action]] only. |-separated list of params names to test, e.g. "key1|key2". Rule i uses the i-th entry of shell-by, shell-value and shell-mode. A list with a single entry is shared by every rule
shell-value-String[[action]] only. |-separated expected values, one per rule, e.g. "1|2". Inside a rule, several accepted values are separated by ,: "2,3|4" means rule 1 matches 2 or 3, rule 2 matches 4. A rule matches when the param named in shell-by equals any of its values (entries are trimmed; comparison is exact and case-sensitive; spaces inside a value are fine, | and , are not)
shell-mode-String[[action]] only. |-separated run mode for each rule: hidden, bg-task (or bg), log (or default). Rules are checked left to right and the first match wins; if none matches, a param is missing or a mode is invalid, shell is used. Example: shell = "hidden", shell-by = "addon_features_toml", shell-value = "2|3|4", shell-mode = "bg-task|log|log"
scriptset, setstateStringMain script for action/download; set-state script for switch/picker (receives $state)
Refreshing the page: use reload-page = true or reload = true to make the app reload the whole page after a script finishes (e.g. after toggling a switch, to refresh the summary). To refresh only specific blocks (e.g. only the affected switches), use reload = "id1,id2".

4. [[group]] - Container for child nodes

[[group]] is a container that groups related nodes. It has no icon and is not clickable - it's just a title with a list of child nodes below it.

4.1. Group fields

FieldAliasTypeDefaultDescription
title-String""Group title shown as a small secondary-colored heading
title-sh-String""shell Script that produces title
keyindex, idStringautoUnique ID
supportvisibleBool|ShelltrueHide/show the group - a hidden group ALSO hides all of its children (every entry until the next [[group]] is skipped, their shells are not run). Accepts shell too!
linedivider, separatorBoolfalseDraws a thin divider line between the entries of the group. Only shown between visible entries, so it appears from 2 visible entries up. In a grid group (see 4.4) it separates the rows and the cells
cardcardsBoolfalseEach entry gets its own framed card instead of sharing one frame for the whole group; entries can be merged into one card with cell (section 4.5). Works with or without columns
columnscols, gridInt|Bool1Number of columns, 1-6. Above 1 the entries of the group are laid out as a grid of cards (section 4.4). columns = true (or "auto") turns the grid on with an automatic column count, using column-width = 160 unless you set another; false = 1
column-widthcol-widthInt (dp)0 (160 when columns = true)Automatic column count: group width ÷ column-width, clamped to min-columns..max-columns, recalculated when the screen rotates, folds or is resized. Takes priority over a numeric columns
min-columnsmin-colsInt1Minimum number of columns in automatic mode (1-6), even when the screen is narrow
max-columnsmax-colsInt6Maximum number of columns in automatic mode (1-6), even when the screen is wide
widgetshow-widgetBool(not set)false hides the icon widget at the end of every entry of the group (arrow, run button, switch, download icon/ring); an entry can override it with its own widget (section 3.2). Also applies in card/grid groups
title-belowtitle-bottomBool(not set)true moves the title of every card of the group under the icon (section 4.5); an entry can override it with its own title-below. Default (not set / false) keeps the title next to the icon. Only affects cards, not the normal one-frame list

4.2. Demo

Demo (Android UI)
<Settings
CPU
⚡
Optimize CPU
Set governor to performance
›
Governor
performance
›
Memory
🗑
Clear cache
›
[[group]]
title = "CPU"

[[action]]
title = "Optimize CPU"
desc = "Set governor to performance"
script = "echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"

[[picker]]
title = "Governor"
get = "cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"
set = "echo $state > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"

[[group]]
title = "Memory"

[[action]]
title = "Clear cache"
script = "sync; echo 3 > /proc/sys/vm/drop_caches"

4.3. Grouping rules (no nesting)

Since dot-notation was removed, groups can no longer be nested inside each other. Every [[group]] is a top-level sibling: declaring a new [[group]] closes the previous one, and all following entries belong to the new group. Entries declared before the first [[group]] (or after an [[end]]) are not part of any group, and only [[text]] is displayed there: it is drawn edge to edge, without a card. Every other node type declared outside a group is not displayed. To stop wrapping without opening another group, put an empty [[end]] line: everything after it is outside any group again until the next [[group]]. [[end]] is optional and only needed for this; a following [[group]] already closes the previous group by itself. It also clears the hidden state of a group with support = false.

Groups also don't support inline resource-file/resource-dir fields (see section 16) and have no desc/summary - a group is just a title + its children.

4.4. Grid layout (columns)

With columns above 1, or with column-width, the clickable entries of the group ([[action]], [[page]], [[switch]], [[picker]], [[download]], [[editor]], [[terminal]], [[chat]]) become cards placed side by side. Each card is one line with the icon (only when the entry has one), the title (at most 2 lines) and a small widget at the end (arrow, run button, switch, download icon / progress ring); desc and summary are below. An entry without an icon simply starts with its title. A group without these fields keeps the normal one-entry-per-line layout.

Demo (Android UI)
<Tools
Tools
⚡
CPU
›
Performance
🗑
Cache
›
Clear cache
🔋
Battery
›
Saver mode
Network
›
DNS
# Fixed: 2 columns
[[group]]
title = "Tools"
columns = 2
line = true

[[action]]
title = "CPU"
desc = "Performance"
icon = "cpu.png"
script = "echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"

# Automatic, shortest form: columns = true (cells at least 160dp wide)
[[group]]
title = "Auto"
columns = true

# Automatic, tuned: 2 to 4 columns
[[group]]
title = "Auto tuned"
columns = true
column-width = 160
min-columns = 2
max-columns = 4
Choosing column-width: a 1080 px wide screen is about 360-410 dp wide (density 2.6-3.0), so the group is about 330-380 dp wide. 160 gives 2 columns in portrait and 4-5 in landscape (capped by max-columns); 120 would give 3 columns in portrait but the cards get tight for titles. A card needs about 110 dp for its icon, widget and padding. Recommended: columns = true, min-columns = 2, max-columns = 4.
Rules: entries that are not cards ([[text]]) take a full row of their own. If the last row has fewer cards than columns, those cards stretch to fill the whole row (for example 3 cards in 2 columns: the third card takes the full width). Cards in one row have the same height. rows, photo and bg of an entry are drawn inside its card. columns is capped at 6; when column-width is set it wins over columns, a narrow screen may give 1 column (still drawn as cards), and in automatic mode the column count never exceeds the number of cards in the group,.

4.5. Card mode (card = true)

By default a group is one frame holding all its entries. With card = true the group itself has no frame; every entry becomes a small card with its own frame (same look as a normal group: background, corners, blur, border), separated by a 16 dp gap (the same spacing as between groups). It works with columns / column-width for a grid of separate cards, and alone (columns = 1) for a vertical list of separate cards. line is ignored in card mode.

To put several entries into one card, give them the same cell value. Adjacent entries with the same cell are stacked inside one card, separated by divider lines; the neighbouring cards in the row stretch to the same height.

[[group]]
title = "Tools"
card = true
columns = 2

[[action]]
title = "A"                # card 1 (one entry)

[[action]]
title = "B1"
cell = "b"                 # card 2 (B1 + B2 stacked)

[[action]]
title = "B2"
cell = "b"

In card mode the last row is not stretched: when it has fewer cards than columns (for example 3 cards in 2 columns), the leftover card keeps the width of one column and the rest of the row stays empty. (Grids without card = true still stretch the last row, section 4.4.)

Rules: [[text]] entries are not cards and take a full row. Entries with an empty cell always get their own card, and only adjacent entries are merged. Each card is a small group with its own blur, so a group with very many cards costs a bit more than a normal group.

By default the title sits next to the icon: [icon] Title [widget]. With title-below = true on the group (or on a single entry) the title moves under the icon row:

[ Icon ]            [ widget ]
Title
Desc
[[group]]
title = "Tools"
card = true
columns = 2
title-below = true         # every card: title under the icon

[[action]]
title = "Clean"
icon = "clean.png"

[[action]]
title = "Boost"
icon = "boost.png"
title-below = false        # this card keeps the title beside the icon
title-below needs an icon: an entry without an icon keeps the normal layout. It also works for cards of a columns / column-width grid (section 4.4) and for entries merged with cell.

5. [[page]] - Sub-page

[[page]] is not an action - it's a link to another page. Clicking it opens a new page (another .toml file, an HTML page, or another Activity).

Field inheritance: [[page]] combines its own page-specific fields with fields inherited from NodeInfoBase and ClickableNode. The tables below list all three groups explicitly so a page field such as title, desc, or icon is visible here instead of being hidden behind a generic “shared fields” note.

5.1. Page-specific fields

These fields are handled directly by [[page]]. A page can also use the inherited NodeInfoBase and ClickableNode fields listed in the next two tables.

FieldAliasTypeDescription
config-StringPath to the sub-page .toml file (relative or absolute)
config-sh-Stringshell Script returning inline TOML content or a .toml file path. A result ending in .toml is treated as a path; otherwise inline TOML is accepted when the first two non-empty output lines contain [[toml]] or [[group]]
open-StringThe key/id of an item inside the page given by config. After the sub-page opens, that item is run automatically (same mechanism as a Favorites shortcut). Empty = just open the page. Ignored for html, link and activity pages
html-StringOnline HTML URL - opens in a WebView
linkhrefStringURL opened by the system browser
activitya, intentStringActivity intent to launch (e.g. com.example.MyActivity)
before-loadbefore-readStringshell Script run before reading the sub-page config
after-loadafter-readStringshell Script run after reading completes
load-okload-successStringshell Script run if load succeeds
load-failload-errorStringshell Script run if load fails
process-Booltrue: show items one by one as they build (with progress bar) instead of waiting (see section 22)
placeholder-countplaceholder_countIntOnly used when process = true. Number of skeleton placeholders shown up-front while waiting for the first real item. Default: 1 (see section 22)
rows-ArrayRich-text rows shown below the page (see section 11)
rows-sh-Stringshell Script that prints [[rows]] tables (inline TOML, also accepts [[<type>.rows]]) to build the rows dynamically. Runs during parse (batched); a non-empty valid result replaces the static rows, empty/error/invalid TOML keeps them
resource-file-StringName of a single asset file to extract (see section 16)
resource-dir-StringName of an asset directory to extract entirely (see section 16)
resources-ArrayList of resource tables; each entry can contain file and/or dir (see section 16)

5.2. NodeInfoBase fields

All NodeInfoBase fields below are available on [[page]]. The same fields are shared by other normal page nodes; see §3 Shared fields for their general behavior.

FieldAliasTypeDefaultDescription
title-String""Display title. Accepts @string/...
title-sh-String""shell Script that produces title dynamically. Runs during parse; overrides title
desc-String""Short description shown below title
desc-sh-String""shell Script that produces desc dynamically
summary-String""Extra info shown in small grey text
summary-sh-String""shell Script that produces summary dynamically
keyindex, idString""Explicit key/ID used by the node. The parser default is empty; the model also has an internal UUID in index, but that does not become key automatically. Long-pressing an item (add to the menu favorites / home screen) needs an id. If key is empty, the id is generated from the raw title as auto:<title> (a repeated title gets #2, #3...; a @key language reference is kept as @key so the id does not change with the app language). Not generated when title-sh is used or the title is empty. Editing or reordering same-titled items can break saved favorites - set an explicit key for stability.
supportvisibleBool|ShelltrueHide/show this node. Accepts true/false or a shell returning "1"
load-after-Boolfalsetrue: a supported root-level page node is deferred instead of being built with the initial page result, then inserted at its original position (inside its group if any) after the page has already loaded. Use for a slow-to-build entry that would otherwise delay initial rendering. Parsed as an ordinary boolean; shell is not supported.

5.3. ClickableNode fields

All ClickableNode fields below are available on [[page]]. They control the page item presentation, locking, SDK constraints, images, and shortcuts; see §3 Shared fields for the common definitions.

FieldAliasTypeDescription
iconicon-pathStringIcon path shown on the left of the item
icon-sh-Stringshell Script that produces the icon path dynamically. Runs during parse (batched with title-sh/desc-sh/summary-sh); overrides icon
logologo-pathStringLarge icon used when creating a shortcut (different from small icon)
photophoto-pathStringLarge image shown in the detail dialog
photo-sh-Stringshell Script that produces the photo path dynamically. Runs during parse (batched with title-sh/icon-sh/...); overrides photo
photo-real-sizephoto-original-sizeBooltrue: show image at its real size, no stretching
photo-gif-numgif-num, gif_numInt>0: image is an animated GIF (photo_1.png, photo_2.png...)
photo-gif-timegif-time, gif_timeIntTime per frame (ms; default 300)
photo-gif-autoplaygif-autoplay, gif_autoplayBooltrue (default): auto-play the GIF
photo-gif-loopphoto-gif-loop-count, gif-loop, gif-loop-count, gif_loop_countIntLoop count (0 = infinite)
photo-real-gifreal-gif, photo-gif-realBooltrue: photo points to a REAL .gif file (decoded via AnimatedImageDrawable) instead of the simulated frame-sequence GIF above. Requires Android 9 / API 28+ - on older devices this flag is ignored and falls back to a static first frame. When enabled, photo-gif-num/multi-path frame lists are not needed for this field
icon-gif-numicon-gif_numIntSame as photo-gif-num but for the small icon
icon-gif-timeicon-gif_timeIntTime per frame for the icon
icon-gif-autoplayicon-gif_autoplayBoolAuto-play icon GIF
icon-gif-loopicon-gif-loop-count, icon-gif_loop_countIntLoop count for the icon GIF
icon-real-gificon-gif-realBoolSame as photo-real-gif but for the small icon - REAL .gif file, Android 9/API 28+ only
bgbg-pathStringBackground image for the item/dialog
bg-sh-Stringshell Script that produces the background image path dynamically. Runs during parse (batched); overrides bg
locklock-stateStringLock the item (no interaction allowed). true/1 = locked; or the format "state|message", e.g. lock = "1|Requires root" - the message is shown when the user clicks the locked item. The whole field is plain text, so the message accepts @string/... resource references (§2.6) as well as {ROT}/{LOT} and @key load-key substitution (§2.7-2.9), e.g. lock = "{LOT}|@root_required_msg"
lock-sh-Stringshell Script that checks the lock state dynamically (returns "1" = locked)
min-sdksdk-minIntMinimum Android SDK version
max-sdksdk-maxIntMaximum Android SDK version (default 100)
target-sdksdk-targetIntTarget Android SDK version

5.4. Demo

Demo (Android UI)
<CPU
📊
App list
Manage installed apps
›
⚙
Advanced settings
Open external config file
›
[[page]]
title = "App list"
desc = "Manage installed apps"
config = "pages/app_list.toml"

[[page]]
title = "Advanced settings"
desc = "Open external config file"
config = "/sdcard/Tool-Tree/advanced.toml"
config-sh returns one of two things: either a .toml file path (output ending with .toml), or inline TOML content. Inline TOML is recognized when the 1st or 2nd non-empty line of the output starts with [[group]] or the reserved marker [[toml]] - see PageConfigSh.looksLikeInlineToml(). Anything else shows an error dialog.

6. [[action]] - Action (runs a shell script)

[[action]] is the most common node type: clicking it shows a dialog (if it has confirm/params/warning), then runs the script and shows the output in a log dialog.

6.1. Action fields

FieldAliasTypeDescription
scriptset, setstateStringMain shell script. Receives $param_name env vars from params. The field is optional; when omitted or empty, the action has no main script to execute.
locklock-stateStringStatic lock: true/1 or the "1|message" format (message accepts @string/..., @key, {ROT}/{LOT} - see §3.2). When locked, the action is not clickable
lock-sh-Stringshell Script to check lock dynamically (returns "1" = locked)
menu-Booltrue: action does NOT appear in the list; instead appears as its own icon on the toolbar
show-Bool|Shelltrue (or shell): auto-open this action's dialog when entering the page (only once)
keep-dialog-BoolDefault false. true: after pressing confirm in the params dialog, the dialog stays open behind the log dialog, so closing the log returns to the params screen (values kept as entered). Cancel still closes it. Ignored (dialog closes as usual) when the effective shell mode is bg-task or hidden (including via shell-by)
params-sh-Stringshell Script that prints [[params]] tables (inline TOML, also accepts [[action.params]]) to build the parameter list dynamically. Runs during parse (batched). A non-empty valid result replaces the static [[action.params]]; empty/error/invalid TOML keeps them. Per-param -sh fields inside the output still run when the dialog opens
params-ArrayList of input parameters - see section 7
rows-ArrayRich-text rows shown below the item - see section 11
rows-sh-Stringshell Script that prints [[rows]] tables (inline TOML, also accepts [[<type>.rows]]) to build the rows dynamically. Runs during parse (batched); a non-empty valid result replaces the static rows, empty/error/invalid TOML keeps them
+ all fields of RunnableNode, ClickableNode, NodeInfoBase (see section 3)

6.2. Demo

Demo (Android UI)
<CPU⋮
⚡
Optimize CPU
Set governor to performance
›
🔥
Clear cache
Clear system cache
›
[[action]]
title = "Optimize CPU"
desc = "Set governor to performance"
menu = true
key = "optimize_cpu"
script = "echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"

[[action]]
title = "Clear cache"
desc = "Clear system cache"
confirm = true
warn = "This will clear all app caches"
script = "sync; echo 3 > /proc/sys/vm/drop_caches"
auto-off = true
menu = true and show = true are independent: an action can be both on the toolbar (menu=true) and auto-open its dialog (show=true). When an action moves to the toolbar (menu=true), an unset key falls back to title to use as the Menu itemId.

7. [[action.params]] - Input parameters

Per-param script (apply): each param can carry a snippet; on confirm, the snippets of all non-readonly params are merged (hidden ones only with depend-include-hidden = true, the default) (in param order) and run together, followed by the action script.

[[action]]
title = "Setup"
script = 'echo "Done: $mode"'

[[action.params]]
name = "mode"
type = "spinner"
options = ["a|Mode A", "b|Mode B"]
apply = 'setprop sys.mode $mode'

[[action.params]]
name = "wifi"
type = "switch"
apply = '[ "$wifi" = "1" ] && svc wifi enable || svc wifi disable'

With mode=b, wifi=1 the merged script is:

setprop sys.mode $mode
[ "$wifi" = "1" ] && svc wifi enable || svc wifi disable
echo "Done: $mode"

Dynamic params: see params-sh in section 6.1.

[[action]]
title = "Wi-Fi setup"
params-sh = "sh {HOME}/gen_wifi_params.sh"
script = "echo $ssid $pass"

gen_wifi_params.sh prints:

[[params]]
name = "ssid"
title = "Network"
type = "spinner"
options-sh = "nmcli -t -f SSID dev wifi"

[[params]]
name = "pass"
title = "Password"
type = "password"

Each [[action.params]] defines one input field in the dialog shown when the user clicks an action. The parameter's value is passed to the action's script via the $param_name environment variable.

7.1. Basic param fields

FieldAliasTypeDescription
name-Stringrequired Variable name (unique within an action). Becomes $name in the script
title-StringDisplay label
title-sh-Stringshell Script that produces title dynamically
label-StringSecondary label
label-sh-Stringshell Script that produces label
desc-StringShort description
desc-sh-Stringshell Script that produces desc
desc-onon-desc, desc-checkedStringNote shown SPECIFICALLY when the checkbox/switch is ON (only for type=bool/checkbox/switch)
desc-on-shon-desc-sh, desc-checked-shStringshell Script that produces desc-on
type-StringInput type: text/int/number/bool/checkbox/switch/seekbar/file/folder/app/packages/spinner/single-select/multi-select/color/password/rows (display-only block, see 7.3)
value-String|ArrayDefault value. Also accepts a TOML array of strings (e.g. value = ["a", "b"]) for multi-select - each entry is one selected value, joined internally using separator
value-sh-Stringshell Script that fetches value dynamically (runs when dialog opens)
placeholder-StringHint when empty
placeholder-sh-Stringshell Script that produces placeholder
required-BoolRequired input
readonly-Bool|ShellRead-only (no editing). true/1/readonly = read-only, false/0/empty = editable; any other string is stored as a shell (readonlySh) evaluated later
maxlength-IntMax character count (type=text)
max-lines-IntMax visible lines of a text input (default 2). The box grows with the content up to this many lines, then scrolls. Ignored for int/number/password
min-IntMinimum value (seekbar)
max-IntMaximum value (seekbar). Default Int.MAX_VALUE
options-ArrayList of choices (spinner/single-select/multi-select) - [[action.params.options]] with title/value (val is accepted as a short alias of value)
items-Array of StringShorthand choice list - each entry is "value|title" or just "value". Takes priority over options tables when both are declared. The same string list may also be written as options = ["value|title", ...]
options-shoption-shStringshell Script that produces options dynamically
multiple-BoolAllow multiple files/options
separator-StringValue separator (multi). Default \n
suffix-StringFile extension filter (e.g. "zip,apk"). Only type=file
mime-StringMIME type filter. Only type=file
path-homehome-path, pathhomeStringInitial directory when opening file picker. Accepts {HOME} placeholders
editable-BoolEnables direct manual editing for supported chooser fields. For type=file/type=folder, the picker field becomes an editable path input, so the user can type or modify the path directly; the chooser button remains available. For type=spinner/type=single-select, the selected-value field becomes editable so the user can type a value manually or choose one from the options. Default: false.
supportvisibleBool|ShellHide/show the param
sort-BoolMove readonly params to the bottom. Every param that should take part in the sorting must declare sort = true (a param without readonly counts as editable and stays above the readonly ones)
allow-no-selectionno-selectBoolAllow spinner to be empty (e.g. when you need to distinguish "not selected" from "first item")
rememberremember-valueBoolPersist the user's last chosen/entered value (keyed by page config path + action key + param name) and auto-restore it as the default the next time the dialog opens - overrides static value. If the param also has value-sh, the shell result still wins (it reflects the real current system state); the remembered value is only used when value-sh is absent. Default: true - set remember = "false" to opt out and always fall back to static value
applyparam-scriptStringshell Script snippet merged into ONE script and run when the user confirms the action dialog, before the action's script. Uses $name of any param (not $state). Skipped when the param is readonly, or hidden by depend-on with depend-include-hidden = false (with the default true, a hidden param still runs its apply and passes its value). Works with params from params-sh

7.2. Common type values

typeUIRelated fields
textText inputvalue, placeholder, maxlength, required
int / numberNumeric text input - value is validated against min/max when the dialog is confirmed (out-of-range blocks OK, empty = no validation)value, min, max, required
bool / checkbox / switchToggle ON/OFFvalue = "1"/"0", desc-on for ON-state note
seekbarSlidermin, max, value
fileFile pickersuffix, mime, path-home, multiple, editable
folderDirectory pickerpath-home, multiple, editable
appApp pickermultiple
spinner / single-selectDropdown single choice; with editable=true, the value field can also be typed manuallyoptions/options-sh, allow-no-selection, editable
multi-selectCheckbox list multi choiceoptions, multiple=true, separator
colorColor picker widget - accepts #RRGGBB/#AARRGGBB hex or a resource reference (@color/name, @android:color/name); an invalid value blocks OKvalue (default color)
passwordSingle-line text field whose characters are hidden on screen; an eye icon beside it shows/hides the text. The value passed to the script is the real text. No fullscreen expand button. Note: remember still applies (default true)value, placeholder, readonly
packagesAlias of app - same app-chooser UI and behaviormultiple
rowsDisplay-only block of rich-text rows and a photo placed between inputs (no input, no name needed, nothing is passed to the script) - see 7.3[[action.params.rows]], bg-color, stroke-color, radius, padding, photo-position

7.3. type = "rows" - text and image blocks inside the dialog

A param with type = "rows" is not an input: it renders its own [[action.params.rows]] (same row fields as section 11: text, text-sh, bold, color, link, line, photo, photo-sh...). Its position is decided by its order in the TOML: put the block before, between or after the other params. Use several blocks to interleave text and images. It replaces the old [[action.params-rows]] (removed; the old position = "bottom" is now just "put the block last").

FieldAliasesTypeDescription
type-StringMust be "rows"
name-StringOptional. Only needed so depend-on/support rules can show or hide the block; its value is never sent to the script
rows-Array[[action.params.rows]] tables. A block shows its text rows, then one photo (the last row that has photo/photo-sh)
photo-positionphoto-posStringtop = photo above the text; default bottom
bg-colorbg, background, bgcolorColorOptional background of the block (#RRGGBB/#AARRGGBB). Setting it (or stroke-color) turns the frame on
stroke-colorborder-colorColorOptional border color
stroke-widthborder-widthInt (dp)Border width (default 1)
radiuscornerInt (dp)Corner radius of the frame (default 12)
padding-Int (dp)Inner padding (default 12 when framed, 0 otherwise)
[[action.params]]
type = "rows"
bg-color = "#1A2196F3"
radius = 12
photo-position = "top"

[[action.params.rows]]
photo = "{ICON}/guide.png"

[[action.params.rows]]
text = "Get your API key first"
bold = true

[[action.params]]
name = "API_KEY"
type = "password"

[[action.params]]
type = "rows"

[[action.params.rows]]
text-sh = "chatbot --list-websites"
line = true
Divider spacing: a row that has only line = true (no text, icon, toggle or progress) is drawn as a thin line that takes no height of its own. margin-top (dp) is the distance from the bottom of the line above to the divider, and margin-bottom (dp) is the distance from the divider to the top of the line below. Both default to 0, so with no margins the divider sits right between the two text lines. Negative values are allowed on a divider row to pull the divider closer to the text than the text line's natural padding (a divider that is the very first row of a block ignores negative values). The margin-bottom of the row above and the margin-top of the row below also add to the gap. If the row has its own content as well as line = true, its margins apply to that content, not to the divider. This applies to every rows block: [[action.params.rows]], [[action.rows]], [[text.rows]], [[page.rows]], [[download.rows]], [[switch.rows]], [[picker.rows]], [[editor.rows]].
A rows block with no visible rows (or support = false) is skipped. A dialog counts only real inputs (not rows blocks) when deciding between the small dialog and the full-screen one (more than 4).

7.4. Demo

Demo - params dialog
<Set CPU max freq
Frequency (kHz)
Enter max frequency
2400000
Governor
performance
Apply to all CPUs
Config file
›
[[action]]
title = "Set CPU max freq"
script = """
for cpu in /sys/devices/system/cpu/cpu*/cpufreq; do
  [ "$all_cpus" = "0" ] && [ "$cpu" != "/sys/devices/system/cpu/cpu0/cpufreq" ] && continue
  echo $freq > "$cpu/scaling_max_freq"
  echo $gov > "$cpu/scaling_governor"
done
"""

[[action.params]]
name = "freq"
title = "Frequency (kHz)"
desc = "Enter max frequency"
type = "text"
value = "2400000"

[[action.params]]
name = "gov"
title = "Governor"
type = "spinner"
value = "performance"

[[action.params.options]]
title = "Performance"
value = "performance"

[[action.params.options]]
title = "Powersave"
value = "powersave"

[[action.params]]
name = "all_cpus"
title = "Apply to all CPUs"
type = "switch"
value = "1"

[[action.params]]
name = "cfg"
title = "Config file"
type = "file"
suffix = "conf"

7.5. Dependencies (depend-*)

A param can be hidden/shown (or switched to readonly) based on the value of another param. This is a large feature - see section 18 for details.

8. [[switch]] - On/off toggle

[[switch]] displays an ON/OFF toggle. When the user toggles it, the set script is called with the env var $state set to "1" or "0". When the page loads, the get script is called to read the current state.

8.1. Switch fields

FieldAliasTypeDescription
getgetstateStringScript to read state. Returning "1"/"true" = ON. If omitted, the switch starts OFF
setsetstateStringScript to set state. Receives $state = "1"/"0". If omitted or empty, changing the switch does not run a set-state script.
locklock-stateStringStatic lock: true/1 or the "1|message" format (message accepts @string/..., @key, {ROT}/{LOT} - see §3.2)
lock-sh-Stringshell Script to check lock dynamically (returns "1" = locked)
rows-ArrayRich-text rows shown below the item - see section 11
rows-sh-Stringshell Script that prints [[rows]] tables (inline TOML, also accepts [[<type>.rows]]) to build the rows dynamically. Runs during parse (batched); a non-empty valid result replaces the static rows, empty/error/invalid TOML keeps them
+ all fields of RunnableNode, ClickableNode, NodeInfoBase

8.2. Demo

Demo (Android UI)
<Display
Display
Dark mode
Enable dark UI
Auto brightness
[[group]]
title = "Display"

[[switch]]
title = "Dark mode"
desc = "Enable dark UI"
get = "cmd uimode night get | grep -q yes && echo 1"
set = "cmd uimode night $([ \"$state\" = \"1\" ] && echo yes || echo no)"

[[switch]]
title = "Auto brightness"
get = "settings get system screen_brightness_mode"
set = "settings put system screen_brightness_mode $state"
The parser does NOT run get immediately when parsing each switch. Instead, all get scripts of switches/pickers are queued into pendingSwitchStates and run exactly once at the end of readConfigToml() via resolvePendingStates() - reducing N shell round-trips to 1 (see section 21).

9. [[picker]] - Value selector

[[picker]] displays a current value; clicking it opens a popup to choose one (or more) values from a list. When the user confirms, the set script is called with $state = the chosen value.

9.1. Picker fields

FieldAliasTypeDescription
getgetstateStringScript to read the current value. If omitted, no dynamic current-state read is performed.
setsetstateStringScript to set the value. Receives $state. If omitted or empty, no set-state script is executed.
options-ArrayStatic options list - [[picker.options]] with title/value (val is accepted as a short alias of value)
items-Array of StringShorthand static choice list - each entry is "value|title" or just "value". Takes priority over [[picker.options]] when both are declared (the two are alternative ways to write the same static list, not additive). The same string list may also be written as options = ["value|title", ...]
option-shoptions-shStringshell Script that produces options dynamically. Each line value|title or just value
multiple-BoolAllow selecting multiple values
separator-StringSeparator for multi-select values (default \n)
locklock-stateStringStatic lock: true/1 or the "1|message" format (message accepts @string/..., @key, {ROT}/{LOT} - see §3.2)
lock-sh-Stringshell Script to check lock dynamically (returns "1" = locked)
rows-ArrayRich-text rows shown below the item - see section 11
rows-sh-Stringshell Script that prints [[rows]] tables (inline TOML, also accepts [[<type>.rows]]) to build the rows dynamically. Runs during parse (batched); a non-empty valid result replaces the static rows, empty/error/invalid TOML keeps them
+ all fields of RunnableNode, ClickableNode, NodeInfoBase

9.2. Demo

Demo (Android UI)
<CPU
Governor
performance
›
Max freq
2400000 kHz
›
[[picker]]
title = "Governor"
get = "cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"
set = "echo $state > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"

[[picker.options]]
title = "Performance"
value = "performance"

[[picker.options]]
title = "Powersave"
value = "powersave"

[[picker]]
title = "Max freq"
get = "cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq"
set = "echo $state > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq"
option-sh = "cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies | tr ' ' '\\n'"
items and [[picker.options]] are mutually exclusive ways to define the static list: when items exists, the table form is ignored. For option-sh, a non-empty/non-error shell result becomes the effective option list; if the shell result is empty, error, or null, the parser falls back to the static options.

10. [[text]] - Rich text block

[[text]] is a non-clickable display block containing multiple rich-text rows. Use it for notices, instructions, or inline image/gif blocks.

10.1. Text fields

FieldAliasTypeDescription
rows-ArrayRich-text rows - see section 11. The parser also accepts an empty list.
rows-sh-Stringshell Script that prints [[rows]] tables (inline TOML, also accepts [[<type>.rows]]) to build the rows dynamically. Runs during parse (batched); a non-empty valid result replaces the static rows, empty/error/invalid TOML keeps them
bg-imagebg-photoStringBackground image path of the whole text block (same loader as action bg: {HOME}/{ICON}, relative paths). Can also be set on any [[text.rows]] row; the last non-empty one wins
bg-image-shbg-photo-shStringshell Script that prints the background image path (batched with the rows scripts; overrides bg-image)
bg-scale-Stringfit (default, like action: image drives the height, fitCenter) | crop (fills the block, centerCrop, does not change the height) | stretch (fills the block, fitXY)
+ NodeInfoBase fields key, support, load-after. [[text]] has no title / desc / summary (nor their -sh forms): they are ignored - put the content in [[text.rows]]. Outside any [[group]], [[text]] is shown edge to edge (no card)

10.2. Demo

Demo (Android UI)
<Notice
CAUTION
The actions below may affect the system.
$ run backup --full
See more at: example.com/docs
[[text]]
[[text.rows]]
text = "CAUTION"
bold = true

[[text.rows]]
text = "The actions below may affect the system."

[[text.rows]]
line = true

[[text.rows]]
text = "  $ run backup --full"
monospace = true

[[text.rows]]
text = "See more at: example.com/docs"
italic = true

11. [[text.rows]] - Rich text row

Dynamic rows (rows-sh): every node that has rows (text, action, page, switch, picker, download, editor) accepts rows-sh, a script that prints the rows as inline TOML.

[[text]]
rows-sh = "sh {HOME}/gen_rows.sh"

gen_rows.sh prints:

[[rows]]
text = "CPU: 8 cores"
bold = true

[[rows]]
text = "Temp: 41 C"

This is the most common display component: used in [[text]], [[action]], [[page]], [[download]], [[action.params.rows]] and [[switch]], [[picker]], [[editor]]. Each row is a single line of text that can have style, icon, toggle, photo, etc.

11.1. Row fields

FieldAliasTypeDefaultDescription
text-String""Text content
shtext-shString""shell Script that produces text dynamically
markdownmdBoolfalsetrue: interpret text (or the sh result) as inline Markdown - bold/italic/strikethrough/color/link/code - before displaying, see section 11.4 for the full syntax
autolinkauto-linkBooltrueAuto-detect bare links (http://, https://, www.) in text (or the sh result) and make them clickable (underlined, opens in the browser; www. gets http:// added). Trailing punctuation such as . , ) is not part of the link. Not applied to a row that already has its own click action (link, activity, script, reset, toggle), and never inside `code` or an existing [text](url). false turns it off for this row
boldbBoolfalseBold
italiciBoolfalseItalic
underlineuBoolfalseUnderline
strikethroughline-through, delete-line, delBoolfalseStrikethrough
monospacemono, codeBoolfalseMonospace font (for code/log)
letter-spacingletterspacing, spacingFloat0Letter spacing (em units)
line-heightlineheight, row-heightFloat0Line height multiplier (1.5 = +50%)
margin-topspacing-top, top-marginInt0Extra space above the row (dp). Drawn as one blank gap line directly above the row, so a multi-line row is never split by it
margin-bottomspacing-bottom, bottom-marginInt0Extra space below the row (dp). Applied once, to the last line of the row only - a multi-line row is not expanded on every line
alphaopacityFloat-1Opacity 0.0-1.0 or 0-255
foregroundcolorString-1Text color (e.g. #FF0000)
bg-colorbg, background, bgcolor (legacy)String-1Background color of the row. For an image use bg-image (on a node bg was always the image, hence the new explicit name)
size-Int-1Font size (sp)
break-BoolfalseLine break after this row
linedivider, separator (legacy)BoolfalseDraw a horizontal divider before this row. The divider itself has no height: a row with only line = true is exactly margin-top + margin-bottom tall (both default 0, negative values allowed), see the callout below. Prefer line: on [[picker]] and params separator is the value separator string
align-Stringnormalnormal/center/right. Rows sharing the same line are grouped by align into up to 3 zones (left/center/right, max 4 rows each) and pinned accordingly - see section 11.5
linkhrefString""URL to open on click
activitya, intentString""Intent to open on click
copy-BoolfalseAllow the user to long-press and select/copy text. Applies to the WHOLE [[text.rows]] block at once (all rows share one text view) - setting it on any single row turns on selection for the entire block. To copy only one row, use copy-row
copy-rowrow-copyBoolfalseLong-press this row to copy its whole text to the clipboard; a "Copy successful" toast is shown. Only the pressed row is copied, and only rows with copy-row = true react - the other rows of the same block are not copied. A row that also has link, activity or on-click keeps its normal tap action; the long-press only copies. Can be combined with copy in the same block (a long-press on a copy-row row copies the row, elsewhere it selects text)
reset-Int|String-1Row index (0-based, within the same [[text.rows]] list) to refresh when THIS row is clicked - re-runs that row's dynamic sh/icon-sh/progress-sh and, when applicable, its photo-sh. Combine with script to run a script first, then refresh the target row. Also accepts "self"/"this" (= refresh THIS row itself) and "all" (= rebind the whole rows list from scratch). See section 11.6
photophoto-pathString""Large image (own line, separate from text)
photo-sh-String""shell Script that produces the row's photo path dynamically. Re-runs every time the rows are re-rendered (batched with text-sh/icon-sh, NOT cached - unlike node-level photo-sh); overrides photo
bg-imagebg-photoString""Background image of the whole text block (not just this row). Note: bg on a row is the background color. If several rows set it, the last non-empty one wins; a value on [[text]] is the default
bg-image-shbg-photo-shString""shell Script that produces the background image path. Runs with the rows batch and again on this row's refresh-interval/reset
bg-scale-Stringfitfit | crop | stretch - how the background image fills the block (see [[text]] bg-scale)
photo-real-sizephoto-original-sizeBoolfalseShow image at real size
photo-gif-numgif-num, gif_numInt0>0: image is animated (photo_1.png...)
photo-gif-timegif-time, gif_timeInt300Time per frame (ms)
photo-gif-autoplaygif-autoplay, gif_autoplayBooltrueAuto-play the GIF
photo-gif-loopphoto-gif-loop-count, gif-loop, gif-loop-count, gif_loop_countInt0Loop count (0=infinite)
photo-real-gifreal-gif, photo-gif-realBoolfalsetrue: row's photo is a REAL .gif file (via AnimatedImageDrawable), not the simulated frame-sequence GIF above. Android 9/API 28+ only - older devices fall back to a static first frame
html-filehtml-pathString""Local .html file rendered inline in its own WebView block below the row's text (resolved like photo: relative to the page config dir, app-private dir, assets, or an absolute path). Ignored if html-url is also set
html-urlhtml-linkString""http/https page loaded directly into the WebView block. Takes priority over html-file if both are set
html-height-Int260Height of the WebView block (dp)
iconicon-pathString""INLINE small icon (same line, different from photo)
icon-sh-String""shell Script that produces the row's inline icon path dynamically. Re-runs every time the rows are re-rendered (batched with text-sh/photo-sh, NOT cached); overrides icon
icon-positionicon-posStringbeforebefore / after the text
icon-size-Int0Icon size (dp)
icon-gif-numicon-gif_numInt0>0: inline icon is animated (icon_1.png, icon_2.png...)
icon-gif-timeicon-gif_timeInt300Time per frame (ms)
icon-gif-autoplayicon-gif_autoplayBooltrueAuto-play the icon animation. false: only the first frame is shown (no tap-to-play, unlike node/photo icons - inline icon has no dedicated hit area)
icon-gif-loopicon-gif-loop-count, icon-gif_loop_countInt0Loop count (0=infinite)
icon-real-gificon-gif-realBoolfalseSame as photo-real-gif but for the row's inline icon - REAL .gif file, Android 9/API 28+ only
scriptrunString""shell Script to run when the row is clicked. Runs on a background thread (no longer blocks the UI) while a thin progress bar shows just below the toolbar; the bar disappears once the script finishes
toasttoast-resultBoolfalsetrue: show the (non-empty) result of script/run and a toggle's set as a short Toast instead of the default log dialog. Applies to both script's result and a toggle's set result
toggletoggle-typeString""checkbox/switch = show a small toggle next to the row; spinner = the row shows its current value followed by a small arrow (e.g. Mode Fast ▾); tapping opens a drop-down list to choose another value (see section 11.7)
getgetstateBool|ShellfalseToggle initial state. A shell returning exactly "1" = checked (queued into pending states - see section 21). With toggle = "spinner": the current value (a value from items, or a shell that prints it)
setsetstateString""shell Script run when the user toggles (receives $state = "1"/"0"); with toggle = "spinner" it receives the chosen value in $state
itemsoptionsArray[]Only with toggle = "spinner": the choices, as strings "value|Title" (title optional, accepts @string/...), same format as [[picker]] items
confirm-BoolfalseSame meaning as on nodes: ask before running script or before applying a toggle change (set). true shows the default question; legacy: a string value is still accepted as the message
confirm-textconfirm-messageString""Message of the confirmation (implies confirm = true)
refresh-intervalrefresh, intervalInt0Seconds interval to automatically re-run this row's sh/icon-sh/photo-sh and redraw it, without waiting for the whole item to rebind (e.g. list scroll). 0 (default) = no auto refresh; when several rows declare it, the shortest interval wins
refresh-barrefreshbarBoolfalseShow a thin countdown bar under this row that drains from full to empty until the next automatic refresh. Needs refresh-interval > 0. The bar only appears and starts counting after the page has finished loading, and refills each time the row refreshes and then stays full for 1 second before it starts draining (so each cycle lasts refresh-interval + 1 s while the bar is shown; while the refresh script is still running the bar stays full). It is redrawn about 30 times per second so the bar drains smoothly. Best used on a row that sits on its own line; when several rows share one line the bar spans the whole line
refresh-bar-colorrefreshbarcolorStringgreenFill color of the countdown bar (e.g. #4CAF50). Default: green #4CAF50
progress-Float-1-1 (default) = no progress bar; any value >= 0 draws a small inline progress bar right after the row's text/icon, filled to progress / progress-max
progress-sh-String""shell Script that produces the progress value dynamically (output must be a number). Re-runs on every rows render (batched with text-sh/icon-sh/photo-sh) and on reset refreshes; overrides progress
progress-maxprogressmaxFloat100Value that corresponds to a 100% full bar. Default 100 (so progress acts as a percentage)
progress-color-Stringdefault greenFill color of the bar (e.g. #4CAF50). Default: material green
progress-track-colorprogress-bg (legacy)Stringdefault greyTrack color of the bar. Default: translucent grey. Naming rule: *-color is always a color, bg-image is always an image
progress-width-Int120Width of the progress bar (dp)
progress-height-Int8Height of the progress bar (dp)
flash-BooltrueWhen this row is refreshed via another row's reset and its text actually changed, the new text fades in smoothly (a short transition) so the user notices the new value. false = disable the effect for this row
flash-color-String-No longer used. The flash effect is now a text fade-in, not a colored highlight. The field is still accepted so existing configs keep loading, but it has no effect
supportvisibleBool|ShelltrueHide/show the row

11.2. Demo

Demo (Android UI)
<Info
Device info
Model: Pixel 7
Android: 14
ro.build.fingerprint=google/raven/...
Updated 2024-08-26
Show notifications
Display system notifications
[[text]]
[[text.rows]]
text = "Device info"
bold = true

[[text.rows]]
line = true

[[text.rows]]
text = "Model: Pixel 7"

[[text.rows]]
text = "Android: 14"

[[text.rows]]
text = "ro.build.fingerprint=google/raven/..."
monospace = true

[[text.rows]]
line = true

[[text.rows]]
text = "Updated 2024-08-26"
align = "center"
italic = true

[[text.rows]]
line = true

[[text.rows]]
text = "Show notifications"
toggle = "switch"
get = "settings get global heads_up_notifications_enabled"
set = "settings put global heads_up_notifications_enabled $state"
sh (alias text-sh) of a row is NOT queued into the pending-state system - it is left to the UI layer and evaluated when the row is rendered. get with a shell value IS queued into pendingRowCheckedStates and batched at the end - like switch/picker.

11.3. Inline HTML block (html-file / html-url)

A row can also render a full HTML page inline, in its own WebView block below the text - useful for content richer than Markdown can express (custom layout, images, JS-driven widgets).

[[text.rows]]
text = "Changelog"
bold = true

[[text.rows]]
html-file = "changelog.html"
html-height = 300

[[text.rows]]
text = "Project homepage"

[[text.rows]]
html-url = "https://example.com"
Same limit as photo: each [[text]]/[[action]] item has only one HTML block - if several rows declare html-file/html-url, the last one wins. The WebView follows the app's light/dark theme (force-dark) and has a transparent background so it blends with the item - transparency only takes effect for HTML content that does not set its own CSS background color.

11.4. Inline Markdown syntax reference (markdown = true)

When a row has markdown (alias md) set to true, its text/sh result is parsed as simple inline Markdown before display.

SyntaxResult
**text** / __text__Bold
***text*** / ___text___Bold + italic
*text* / _text_Italic. A single */_ must hug the text (no space right after the opening mark or right before the closing one), so 2 * 3 * 4 stays literal; an underscore inside a word (my_var_name) is never italic
~~text~~Strikethrough
{text}(color)Custom text color - color is a color name (e.g. red) or hex (#RRGGBB/#AARRGGBB)
[text](url)Clickable link, opens url. An optional title is ignored: [text](url "title") opens url. Balanced parentheses inside url are allowed
<https://...> / <name@mail.com>Clickable link whose label is the address itself (an email opens as mailto:)
![alt](url)Images are not drawn; shown as a clickable link labelled with a picture mark and alt
==text==Highlighted (yellow background). The marks must hug the text, so a == b == c stays literal
^text^ / ~text~Superscript / subscript. No spaces allowed inside, e.g. x^2^, H~2~O
`text`Rounded background box around text (like an inline "code" chip). The content is parsed recursively, so it can nest the other marks above - e.g. `{text}(red)` = box + red text, `[text](url)` = box + clickable link
`text|R`Same rounded box, with R (a plain number, dp) overriding the box's corner radius for this span only. No |R suffix = default radius. Also works combined with nesting, e.g. `{text}(red)|16`
``text``Literal rounded box (like ```text```) whose content may contain a single backtick, e.g. ``a`b`` shows a`b. One space just inside each side is trimmed
```text```Same rounded box as `text`, but the content is shown literally - Markdown marks inside are NOT interpreted (use this to display raw symbols, e.g. ```**not bold**``` shows the asterisks as-is). Also accepts the |R corner-radius suffix
[[text.rows]]
text = "Status: `{OK}(green)` - link: `[details](https://example.com)` - `big|20`"
markdown = true
Nesting only works inside single backticks (`...`) - triple backticks (```...```) always keep their content literal, by design, so they can be used to show raw Markdown symbols without any of them being interpreted.

11.5. Pinning rows to the left / center / right of the same line

Rows that would join the same line by default (no break/line/margin-top on a later row, no margin-bottom on an earlier one) are grouped, then bucketed by align into up to 3 zones: normal = left, center = center, right = right. If each zone has at most 4 rows and at least one row uses center/right, the group renders as a true multi-column line: left content stays flush left, center is centered across the full line width, right is flush against the right edge - regardless of how many rows end up in each zone (1 to 4). Unlike the earlier version of this feature, a pinned row can now have anything a normal row can: icon/icon-sh/toggle/link/activity/script/markdown/underline/strikethrough all work in any zone.

[[text.rows]]
text = "kkkkk"

[[text.rows]]
text = "ffffffg"
align = "right"

Up to 4 rows per zone, mixed content, three zones at once:

[[text.rows]]
text = "CPU"

[[text.rows]]
text = "68°C"

[[text.rows]]
text = "Governor"
align = "center"

[[text.rows]]
text = "Details"
align = "right"
link = "https://example.com/cpu"
If any single zone ends up with more than 4 rows (e.g. 5 rows all left-aligned in the same group), the whole group silently falls back to the old shared-line behavior instead: every row is simply joined left-to-right in declaration order, and align on the first row of the group decides the alignment of the group as a whole (no more per-zone pinning for that group). A row following a pinned group always starts on a new line, even without break. This layout assumes each zone's content is short enough to fit on one line - if a zone's text is long enough to wrap, the wrapped portion will not stay aligned to that zone.

11.6. Reset a single row on demand (reset)

A row with reset = N acts as a refresh button for row index N (0-based, within the same [[text.rows]] list): tapping it re-runs only that row's sh/icon-sh/progress-sh and updates just that row's text, without rebinding the whole block (icons/GIFs/other rows are left untouched). Combine with script to run a script first and then refresh the row that displays its result.

[[text.rows]]
sh = "cat /sys/class/thermal/thermal_zone0/temp"
icon = "ic_temperature"

[[text.rows]]
text = "🔄 Refresh"
align = "right"
reset = 0

Besides a numeric index, reset also accepts two special string values:

ValueBehavior
reset = "self" (or "this")Refreshing THIS row itself - re-runs its own sh/icon-sh/progress-sh in place. A row can therefore be both the data source and its own refresh button (with script running first)
reset = "all"Rebinds the ENTIRE [[text.rows]] list from scratch - equivalent to a full block re-render (all rows' dynamic scripts re-run)
If the target row happens to be part of a group using the multi-column pin layout from section 11.5, reset automatically rebinds that whole block instead of just the one row, to avoid breaking the column spacing - this is expected, not a bug.

11.7. Spinner on a row (toggle = "spinner")

A row with toggle = "spinner" and items shows its text followed by the currently selected title and a small arrow. Tapping the value opens a drop-down list (same style as the [[picker]] pop-up) right under the row; choosing an entry updates the row and runs set with $state = the chosen value. confirm asks before applying, toast = true shows the script output as a toast. get is either one of the item values or a shell that prints the current value; when omitted the first item is selected. A row with toggle = "spinner" but no items is shown as plain text.

[[text.rows]]
text = "Mode"
toggle = "spinner"
items = ["fast|Fast", "normal|Normal", "slow|Slow"]
get = "glog my_mode"
set = 'slog my_mode "$state"'

11.8. Inline progress bar (progress) and flash highlight (flash)

A row can embed a small horizontal progress bar inline, right after its text/icon - useful for battery/thermal/storage gauges without leaving the text flow. The bar is driven either statically or by a script:

[[text]]
[[text.rows]]
sh = "df -h /data | tail -1 | awk '{print $5}'"
text = "/data usage"
progress-sh = "df /data | tail -1 | awk '{gsub(\"%\",\"\"); print $5}'"
progress-max = 100
progress-color = "#FF9800"
progress-track-color = "#33888888"
progress-width = 120
progress-height = 8

[[text.rows]]
text = "🔄 Refresh"
align = "right"
reset = "all"
Like text-sh/icon-sh/photo-sh of a row, progress-sh is re-evaluated on every rows render (batched into one shell round-trip) and by refresh-interval timers - the bar updates live together with the row's text. The output must be a plain number; when combined with refresh-interval + reset you get a self-updating gauge.

The companion flash effect makes a reset-driven value change visible: whenever a row is updated through reset and its rendered text actually differs from before, the new text fades in over a short animation (about 0.3 s) and the effect then removes itself, leaving the row exactly as it was. It is on by default - set flash = false on a row to opt out. flash-color is no longer used (the effect used to be a colored highlight rectangle) and is kept only so older configs still load.

12. [[editor]] - Open file in the text editor

[[editor]] lets the user open a file in the built-in text editor (TextEditorActivity) to view or edit it. If the file does not exist, the editor creates it when the user saves.

12.1. Editor fields

FieldAliasTypeDefaultDescription
filepathString""required at runtime Path of the file to open. The parser accepts an empty value, but the editor UI rejects an editor entry with no file path.
file-shpath-shString""shell Script that prints the file path dynamically. Runs during parse (batched with title-sh/desc-sh/icon-sh/...); a non-empty result overrides file, an empty result or error keeps file
wrap-BooltrueEnable line wrapping
runrunnableBooltrueShow the Run button in the editor (only for runnable files: sh/py, a shebang, or a .toml file). For a .toml file the button saves the file and opens it as a Tool-Tree page (see 12.2). run = false hides it. While the Run button is visible, Save moves from the toolbar into the 3-dot menu; when Run is hidden, Save is on the toolbar. A readonly file never shows Save. run works together with readonly (a read-only file can still run when run is not false)
placeholder-StringnullHint when file is empty
readonly-Bool|ShellfalseRead-only. Accepts shell too!
need-input-BoolfalseWhether the run script uses read
value-String""Initial content (only when file does not exist)
value-sh-String""shell Script that produces initial content (higher priority than value)
rows-Array[]Rich-text rows shown below the item - see section 11
rows-sh-String""shell Script that prints [[rows]] tables (inline TOML, also accepts [[<type>.rows]]) to build the rows dynamically. Runs during parse (batched); a non-empty valid result replaces the static rows, empty/error/invalid TOML keeps them
+ ClickableNode fields (icon, lock, min-sdk...) and NodeInfoBase (title, desc...)

12.2. Demo

Demo (Android UI)
<CPU
📝
Edit build.prop
/system/build.prop
›
📝
Create new script
/sdcard/myscript.sh
›
[[editor]]
title = "Edit build.prop"
desc = "/system/build.prop"
file = "/system/build.prop"
readonly = "test -w /system/build.prop || echo 1"

[[editor]]
title = "Create new script"
desc = "/sdcard/myscript.sh"
file = "/sdcard/myscript.sh"
value = "#!/system/bin/sh\necho hello"

[[editor]]
title = "Active config"
file-sh = "echo /data/adb/modules/demo/$(getprop ro.product.device).conf"

[[editor]]
title = "View-only script (no Run)"
file = "/sdcard/myscript.sh"
run = false

12.2. Run a TOML file as a page

When the opened file has the .toml extension, the Run button saves pending changes and opens the file as a regular Tool-Tree page (the file is read like a [[page]] whose config is its absolute path). Every node of the file - actions, switches, pickers, nested pages and so on - can then be tapped and run directly, and relative paths in the file (load-toml, icons, nested config) resolve against the folder of the opened file. Press Back or swipe right on the page to return to the editor and keep editing; run it again to see the new result. If saving fails, the page is not opened. run = false hides the button as for any other file.

value is only written when the file does not exist. If the file already exists, value/value-sh are ignored - the existing file content is preserved.

13. [[terminal]] - Interactive bash terminal (Termux-style)

[[terminal]] opens a full-screen terminal (TerminalActivity) with a real PTY, so interactive programs such as vim, htop or nano work. The look follows Termux: black screen, extra-keys rows (ESC / - HOME ↑ END PGUP, TAB CTRL ALT ← ↓ → PGDN), pinch to zoom, long-press to select text.

13.1. Terminal fields

FieldAliasTypeDefaultDescription
cwddirString{HOME}Start directory. {HOME} is replaced by the toolkit home; {PAGE_CONFIG_DIR} / {PAGE_WORK_DIR} by the folder of the page config (the extracted copy for pages inside assets). Falls back to $HOME if the directory does not exist
cmdcommandString""Shell commands run right after the environment is ready (the shell stays open when they finish)
rootsuBoolautoFollows the app: when the app has root the shell starts through su, otherwise it runs as the app user. false: always run as the app user, even if the device has root (typing su inside the terminal still works). true: same as the default, su if root is available, otherwise the app user
font-size-Int14Font size in sp (8-40) used the first time this terminal is opened. Once the user pinch-zooms, that size is remembered for this [[terminal]] item (identified by page + title + cwd + cmd) and used on every later open instead of this field. Changing title, cwd or cmd counts as a new item
exit-on-backback-exitBoolfalseDefault false: Back hides the terminal and the shell keeps running. true: Back stops the session you are viewing right away (no confirmation) and leaves the screen, or switches to another session if one is still open
close-on-exitauto-closeBoolfalseFor one-shot terminals: when true and cmd is set, the shell exits right after cmd finishes. Exit code 0 closes the session automatically; a non-zero exit code keeps the screen so you can read the output (press Enter to close). Ignored when cmd is empty
keep-screen-onkeep-awakeBoolfalseInitial state of the Keep screen on switch (terminal More menu). Applied only when the terminal is opened while no session is open yet; after that the user's own switch choice is never overridden. The setting is shared by all sessions and is off by default. Accepts true / 1
+ ClickableNode fields (icon, lock, min-sdk...) and NodeInfoBase (title, desc...)

13.2. Demo

[[terminal]]
title = "Terminal"
desc = "bash"
cwd = "{HOME}"

[[terminal]]
title = "Network info"
cmd = "ip addr"
font-size = 12

[[terminal]]
title = "Run once"
cwd = "{PAGE_CONFIG_DIR}"
cmd = "ls"
exit-on-back = true

[[terminal]]
title = "Monitor"
cmd = "top"
keep-screen-on = true

13.3. How it runs

  • Permission: follows the app by default (su when the app has root, otherwise the app user). Use root = false to force the app user.
  • PTY is created by the bundled busybox script; the window size is applied with stty at start and again (through stty -F) whenever the view is resized or rotated, so a full-screen program may redraw a moment late.
  • executor.sh variables: when the terminal opens, the generated executor.sh (all $ANDROID_ID, $ROOT, $HOME, $BIN, $PATH... variables) is sourced once, before cwd/cmd. COLUMNS/LINES set by executor.sh are unset afterwards so the terminal uses its real size. If the device is not arm64 executor.sh exits and the terminal closes.
  • Toolbar pages: the bar under the terminal has three pages. Swipe right for a built-in page of special characters (- _ | \ ~ ' " ` & ; and { } [ ] ( ) < > * #), swipe left for the text input box. The middle page is the normal key bar.
  • Screen and keys: the screen follows the normal system timeout unless Keep screen on is enabled (set keep-screen-on = true or switch it on in the More menu; off by default). The volume keys do nothing in the terminal, so the system volume panel does not appear. A bell character (\a) vibrates the device briefly.
  • More menu: the terminal's More button offers Keep screen on, WakeLock (keep CPU) (keeps the CPU awake for background shells; mirrors the notification button), Monospace font for keys (remembered across launches), a list of the URLs found in the output, and Share output (shares the whole transcript as a text file).
  • Shell environment: HOME is always the toolkit home (also in root mode) and umask is 022, so files created in the terminal are readable by other apps.
  • Page variables: PAGE_CONFIG_DIR, PAGE_CONFIG_FILE, PAGE_WORK_DIR and PAGE_WORK_FILE of the page that holds the [[terminal]] item are exported right after executor.sh, so cmd can use them. They are fixed when a session starts; reopening the item from another page starts a separate session.
  • If ~/.bashrc exists in the toolkit home it is sourced after executor.sh. The prompt is $ .
  • Hide / reopen: by default Back hides the terminal (set exit-on-back = true to stop the session instead); the shell keeps running in a foreground service with a notification (Open / Exit all). Tapping the same [[terminal]] item again reopens its most recent running session; a new one is created only if none is running.
  • Multiple sessions: swipe from the left edge to open the session list, tap New session to start another one with the same cwd/cmd/root, tap ✕ to close one. exit or Ctrl+D closes that session and switches to another one (or closes the screen when none is left).
Back does not kill the shell unless exit-on-back = true. Closing a session from the session list asks for confirmation while the shell is running. After the shell exits, press Enter to close.

14. [[chat]] - Chat-style page

[[chat]] opens a full-screen chat page (ChatActivity): type a message, press send, the script runs with the text in $MSG and its live output appears in a reply bubble. The reply bubble renders output like the shell log dialog: ANSI colors, \r progress lines overwrite the current line, and progress:[current/total] shows a thin progress bar in the bubble. A Stop button replaces Send while the script is running. The input box contains an options button on the left (only with [[chat.params]]) and a round send button on the right. The toolbar has a sessions button (opens the conversation list, see §14.4) and the 3-dot menu. Conversations are saved automatically and reopened the next time the page is opened. When the page opens, the input box is focused and the keyboard is shown automatically (not when the page is restored after a rotation or process restart).

14.1. Chat fields

FieldAliasTypeDefaultDescription
scriptset, setstateShell-Runs on every send. The sent text is exported as env $MSG and the id of the open conversation as $CHAT_ID; values saved from [[chat.params]] are exported too ($MSG and $CHAT_ID win on a name clash). Output (stdout + stderr) streams into the reply bubble
chat-titlebot-titleStringtitleTitle shown on the chat page toolbar. title stays the name of the item in the list
user-titleme-titleString-Name shown above the user's own bubbles (the counterpart of chat-title). Empty: no name is shown
greetingwelcomeString-First (greeting) bubble shown when the chat page opens and after type = "clear". Empty: no greeting
greeting-shwelcome-shShell-shell Script run once when the chat page opens (not when switching to another conversation). Its output streams into the first (greeting) bubble with the same ANSI / markdown rendering as replies. $MSG is empty; $CHAT_ID and the saved [[chat.params]] values are exported. Takes priority over greeting; if it prints nothing, greeting is used instead (no bubble when both are empty). The bubble is not stored; its last output is reused as the greeting of other conversations opened in the same visit. While it runs the Send button shows Stop and sending is blocked until it ends
placeholderhintString-Hint of the input box
max-lines-Int6The input box grows with the text up to this many lines
markdownmdBoolfalseRender the reply bubbles as Markdown (same inline syntax as §11.4: bold, italic, strikethrough, inline code, links, colors, highlight, superscript/subscript). Lines starting with ``` become separate code blocks with a copy button; code lines are never wrapped, long lines scroll sideways. Line-level syntax (chat only, at the start of a line): headings # to ###### , bullets - /* /+ (nested levels use • ◦ ▪), numbered lists 1. , task lists - [ ] /- [x] , quotes > , and horizontal rules ---/***/___. Tables (| a | b | header, a |---|:---:|---:| separator row for left/center/right alignment, then body rows) are drawn as a horizontally scrollable grid with a copy button (copies the Markdown source) and inline Markdown inside cells; escape a literal pipe as \|. Tables are not supported in [[text.rows]]. Also in chat replies: ~~~ code fences, Setext headings (a text line followed by a line of === or ---, at least 3 characters), a quote line continues on following lines without > until a blank line, wrapped bullet/numbered lines keep a hanging indent, and reference links ([text][id] / [id] with a line [id]: https://...). Setext headings and reference links are skipped when the reply contains a code fence (the text outside the fence is still handled block by block). Not supported: backslash escapes, HTML tags, footnotes, definition lines and math. A reply that contains ANSI colors keeps its colors and is not parsed as Markdown. User bubbles and a reply that is still running are shown as plain text
params-title-StringSettingsTitle of the dialog opened by the options button on the left of the input box (needs [[chat.params]])
params-icon-Pathdefault iconIcon of that options button
params-scriptapplyShell-Optional. Empty: pressing Confirm only saves the values. Set: it also runs once in the log dialog with the values as env
params-shell-StringdefaultHow params-script runs when the user confirms the params dialog. default (aliases log, dialog) = log dialog; hidden = silent, no log dialog (a Toast with the error output is shown only if the script writes to stderr; ignored while another hidden task is still running); bg-task (aliases bg, background) = background task with notification. Unknown values are ignored. Has no effect when params-script is empty
show-Bool|Shellfalsetrue (or shell returning 1): the first time the chat page is opened, the [[chat.params]] dialog opens automatically; once confirmed it is not opened again (see §14.2). Same behavior as show on [[action]]. Needs [[chat.params]], ignored without it

All common fields of RunnableNode (title, icon, lock, interruptable, ...) work as well.

14.2. [[chat.params]] - options button next to the input

Each [[chat.params]] is a normal param (same fields as [[action.params]]). When at least one exists, an options button appears on the left inside the input box and opens a params dialog (same dialog as an [[action]], including max-lines). Confirmed values are exported as env to every later script run; before the first confirm the param defaults (or remembered values) are used. With show = true on [[chat]] the dialog opens by itself on the first visit: it cannot be dismissed by tapping outside or Back, Cancel leaves the chat page, and after Confirm it does not open automatically again (the options button still opens it). The keyboard is not auto-shown on that first visit.

14.3. [[chat.menu]] - 3-dot menu

Each [[chat.menu]] is one item of the 3-dot popup (same fields as a menu item). Supported: script items (log dialog, or silent), type = "exit" | "finish" | "close" (close page) and type = "clear" (clear the messages of the open conversation, and also run its script silently when one is set). Not supported in chat and hidden: file, folder, spinner, checkbox, refresh, reload, restart, killapp, links and pages. File-chooser params in [[chat.params]] are not supported.

A menu item runs its own script, not the chat script. The script receives $menu_id / $state (the item's key/id, or its title when no key is set), $CHAT_ID (the open conversation) and the saved [[chat.params]] values. $MSG is not set. Use it for actions such as wiping the data that belongs to the open conversation:

[[chat.menu]]
title = "Clear memory"
script = 'rm -f "$HOME/.cache/$CHAT_ID.sql"'

type = "clear" clears the visible messages and does not change $CHAT_ID. When the item also has a script, it runs silently (no log dialog) after the messages are cleared, with the same variables as other menu scripts ($CHAT_ID, $menu_id, $state, saved [[chat.params]]). If a reply is still running, it is stopped first and the script starts a moment later so it cannot recreate the files it deletes. Without a script, type = "clear" only clears the visible messages, so files named after $CHAT_ID survive.

14.4. Sessions (conversation history)

  • Every conversation is stored on the device (up to 50 per [[chat]] item, oldest dropped first). A chat item is identified by its page + title, so renaming title starts an empty history.
  • Opening the page reopens the most recent conversation. The greeting bubble is not stored.
  • A running script is not stopped when you leave the chat page (back button, swipe back) or the screen is rotated. It keeps running in the background while the app process is alive; opening the same chat again reattaches to it, shows the live output and the Stop button, and the finished reply is saved as usual. The script is only stopped by the Stop button, by clearing the chat or by deleting that conversation. If Android kills the app process, the running script ends and only the output received so far is kept.
  • The toolbar sessions button (or a swipe from the right edge) opens a drawer listing the conversations, named after the first user message. Tap one to switch, New session to start another (does nothing while the current one is still empty), and the delete button (asks for confirmation) to remove one.
  • $CHAT_ID is unique per conversation and stays the same for its whole life, so a script can keep separate memory/context per conversation, e.g. --memory-file "$HOME/.cache/$CHAT_ID.sql". Deleting a conversation does not delete files your script created.
  • Each conversation runs independently: creating or switching to another conversation does not stop a running script. It keeps running in the background and its reply is saved when it finishes. A conversation whose script is still running is marked with ● in the sessions list. The Send/Stop button always refers to the open conversation only, so you can send in a new conversation while an older one is still running. Several conversations can run at the same time - keep their files apart with $CHAT_ID.

14.5. Example

[[chat]]
title = "Assistant"
chat-title = "Shell helper"
user-title = "You"
markdown = true
greeting = "Hi! Type a command name."
script = 'echo "[$MODE] You said: $MSG"; "$MSG" 2>&1'
max-lines = 6

[[chat.params]]
name = "MODE"
type = "text"
value = "safe"

[[chat.menu]]
title = "Clear history"
type = "clear"

[[chat.menu]]
title = "Clear memory"
script = 'rm -f "$HOME/.cache/$CHAT_ID.sql"'

[[chat.menu]]
title = "Close"
type = "close"

15. [[download]] - Download a file via HTTP

[[download]] is a new node type that displays download progress directly in the item (no separate dialog). When download completes, it runs the script with the env var $state = path of the downloaded file (cached, random name). The URL can be static (url) and/or dynamic (url-sh).

15.1. Download fields

FieldAliasTypeDescription
url-StringStatic URL (http/https) to download. Required if url-sh is not set
url-sh-Stringshell Script that returns the URL to download. Runs once, the first time the item is tapped - the result is cached into url for the rest of that page visit (pause/resume/retry reuse the cached value, the script is not re-run). Required if url is not set; if both are set, the result of url-sh overwrites url on that first tap
scriptset, setstateStringScript run after download. Receives $state = path of downloaded file
locklock-stateStringStatic lock: true/1 or the "1|message" format (message accepts @string/..., @key, {ROT}/{LOT} - see §3.2)
lock-sh-Stringshell Script to check lock dynamically (returns "1" = locked)
rows-ArrayRich-text rows shown below the item - see section 11
rows-sh-Stringshell Script that prints [[rows]] tables (inline TOML, also accepts [[<type>.rows]]) to build the rows dynamically. Runs during parse (batched); a non-empty valid result replaces the static rows, empty/error/invalid TOML keeps them
+ all RunnableNode fields: confirm, warn, reload, auto-finish...

15.2. Demo

Demo (Android UI)
<Update
⬇
Download update
update.zip - 24 MB / 53 MB
45%
[[download]]
title = "Download update"
url = "https://example.com/update.zip"
script = "unzip -o $state -d /sdcard/update && echo Update installed"

16. [[resource]] - Extract assets

[[resource]] is an invisible node (it returns null after initialization). It only extracts assets from the APK to storage (typically /data/data/<pkg>/files/... or cache). This is how to ship script files, images, etc. from the APK to outside so shell can call them.

You can also put resource-file/resource-dir fields directly inside [[page]]/[[action]]/[[switch]]/[[picker]]/[[text]] - no need to declare a separate [[resource]] entry. (Not available on [[group]].)

16.1. Fields

FieldAliasTypeDescription
resource-file-StringName of a single asset file to extract
resource-dir-StringName of an asset directory to extract entirely
resources-ArrayList of more complex resources - each entry is a table with file and/or dir
[[resource]]
resource-file = "busybox"

[[resource]]
resource-dir = "scripts"

# Or inline on the node that needs it - no separate [[resource]] entry required:
[[action]]
title = "Run bundled script"
resource-file = "run.sh"
script = "sh /data/data/com.tool.tree/files/run.sh"
Extraction is de-duplicated in memory (per app process): each asset name is written only once, repeated declarations reuse the first extracted path. Note that for a node carrying resource-* fields, support = false skips the whole node - its resources are not extracted either.

18. Dependencies (depend-*)

This is the largest feature of [[action.params]]: a param can be hidden/shown (or switched to readonly) based on the value of one (or more) other params in the same action. This is how to build complex dialogs that are still easy to manage - the UI auto-hides irrelevant fields when the user picks a different mode.

18.1. depend-* fields (only for [[action.params]])

FieldTypeDefaultDescription
depend-onStringnullName(s) of parent param(s), separated by |. E.g. "mode|cam". Alias: depend
depend-valueStringnullRequired matching value for each parent. Parents separated by |; within one parent: accepted values OR-separated by comma ,. E.g. "a|b,c"
depend-modeString"show""show": show when matched (default). "hide": hide when matched. Can be declared per-parent, separated by |: "show|hide"
depend-logicString"and"How to combine multiple parents: and / priority / priority-ltr / or / or-ltr / priority-rtl / or-rtl / xor / nand. Field alias: depend-priority
depend-defaultString"show"Default value when NO condition matches: "show" or "hide"
depend-initialString"auto"Initial state before any evaluation: "auto" / "show" / "hide". Alias: depend-initial-state
depend-negateBoolfalseInvert ALL conditions (NOT logic)
depend-thresholdInt-1Only for and: % of conditions that must match (0-100). E.g. 67 = at least 2/3
depend-include-hiddenBooltrueWhen a dependent param is hidden, true still includes its non-empty value in the submitted action parameters; false omits it
depend-cascadeBooltruetrue: parent hidden => child hidden too. false: only visible parents are used
depend-onchangeStringnullShell callback run when this param's dependency-driven visibility changes. Aliases: depend-on-change, depend-callback. The callback receives PARAM_NAME and PARAM_VISIBLE (1/0) as extra parameters.
depend-readonlyBoolfalsetrue: don't hide - just dim and lock interaction
depend-sortBoolfalsetrue: move locked/hidden params to the bottom (no longer requires depend-readonly)

18.2. Demo - simple dependency

Demo - hidden param
<Backup
Backup mode
Single file
Source file
/sdcard/file.zip
›
Destination folder
(hidden because mode != "folder")
›
[[action]]
title = "Backup"
script = """
if [ "$mode" = "file" ]; then
  cp "$src_file" /sdcard/backup/
else
  cp -r "$dst_folder" /sdcard/backup/
fi
"""

[[action.params]]
name = "mode"
title = "Backup mode"
type = "spinner"
value = "file"

[[action.params.options]]
title = "Single file"
value = "file"

[[action.params.options]]
title = "Whole folder"
value = "folder"

[[action.params]]
name = "src_file"
title = "Source file"
type = "file"
depend-on = "mode"
depend-value = "file"

[[action.params]]
name = "dst_folder"
title = "Destination folder"
type = "folder"
depend-on = "mode"
depend-value = "folder"
depend-sort = true works on its own and no longer needs depend-readonly = true. Params that are shown and editable stay on top; locked (or hidden) params move to the bottom, same as sort with readonly.

18.3. depend-logic reference

LogicMeaningExample
and (default)ALL conditions must matchdepend-on="a|b" => both a and b must match depend-value
priorityleft-to-right, first matching condition winsIf a matches => result follows a's mode; if a doesn't match, check b...
priority-rtlright-to-left, opposite of priorityIf b matches before a
xorEXACTLY ONE condition must matcha matches OR b matches, not both
nandnegation of andNOT all matching => true

18.4. depend-default and depend-initial

When no dependency condition matches, the fallback visibility is controlled by depend-default (default: show). The separate depend-initial value controls the state shown before the first dependency evaluation.

depend-initial = "auto" (default) auto-determines based on depend-default. Use "show"/"hide" when you want to avoid "flicker" when the dialog first opens - the UI will pin to that state until evaluation completes.

19. Shell-script fields - overview

In Tool-Tree, many fields accept a static value plus a dedicated -sh field, or explicitly allow a shell expression in the field itself. These modes are not interchangeable; the table below lists the dynamic fields supported by the current parser and UI.

FieldApplies toDescription
title-shNode, param, optionProduce title dynamically
desc-shNode, paramProduce desc dynamically
summary-shNodeProduce summary dynamically
warn-sh / warning-shRunnableNodeProduce warning dynamically
label-shActionParamInfoProduce label dynamically
placeholder-shActionParamInfoProduce placeholder dynamically
desc-on-shActionParamInfo (type=bool)Produce desc-on dynamically
value-shActionParamInfo, EditorNodeFetch current value
options-sh / option-shPickerNode, ActionParamInfo, PageMenuOptionProduce options list dynamically
get / getstateSwitchNode, PickerNode, PageMenuOption (checkbox/spinner), TextRow (toggle)Read current state (batched via pending states at parse time)
set / setstate / scriptActionNode, SwitchNode, PickerNode, DownloadNode, PageMenuOption, TextRow (toggle)Set new state on user interaction
lock / lock-stateClickableNode, PageNode, PageMenuOptionCheck lock state (static, or "state|message" format)
lock-shClickableNode (page, action, switch, picker, download, editor)Check lock state dynamically (returns "1" = locked)
icon-shClickableNode (page, action, switch, picker, download, editor)Produce icon path dynamically - runs during parse, batched with title-sh/desc-sh/summary-sh
photo-shClickableNode (page, action, switch, picker, download, editor)Produce photo path dynamically - runs during parse, batched with the other node-level -sh fields
bg-image-sh (bg-sh)ClickableNode (page, action, switch, picker, download, editor)Produce background image path dynamically - runs during parse, batched. bg-sh is the legacy name
file-sh / path-shEditorNodeProduce the editor file path dynamically - runs during parse, batched; overrides file when non-empty
icon-sh (row)TextRowProduce row's inline icon path dynamically - re-runs every render (batched with text-sh/photo-sh of the row, not cached)
bg-image-sh (row / text)TextRow, TextNodeProduce the text block background image path - re-runs every render and on the row's refresh (batched with the rows scripts)
photo-sh (row)TextRowProduce row's photo path dynamically - re-runs every render (batched, not cached)
progress-sh (row)TextRowProduce the row's inline progress-bar value dynamically (a number) - re-runs every render (batched with text-sh/icon-sh/photo-sh)
url-shDownloadNodeProduce download URL dynamically - runs once on first tap, cached into url for the rest of that page visit
support / visibleNormal page nodes, groups, params, menu/fab items, rowsHide/show; most node/param/group uses support the shell-backed form, while row visibility has its own boolean-or-shell handling

20. resolveBoolOrShell

The resolveBoolOrShell() function is used only where the parser explicitly allows a static boolean or a shell expression. "1"/"true" are true, "0"/"false" are false, and another string is executed immediately; only output exactly equal to "1" is true.

Current parser usersPurpose
support/visible on normal nodes and action paramsInclude/exclude the entry before it is built
support/visible on [[group]]Include/exclude the group and therefore its following child nodes
show on [[action]]Decide whether the action is auto-shown
readonly on [[editor]]Resolve the editor's read-only state
[[action.params]] readonly has similar shell support, but it uses its own custom parsing and is evaluated together with the other parameter-open scripts when the action dialog is opened.

21. Pending states

To reduce shell round-trips while parsing, the parser collects dynamic work intended for the parse-time pending pass and submits those scripts together after the document has been parsed.

QueueCollected fromResult applied to
pendingSwitchStatesswitch getchecked = true when output is "1"/"true" (and not "error")
pendingPickerStatespicker getcurrent value
pendingRowCheckedStatesrow get (toggle)row checked = (output trimmed == "1")
pendingRowVisibleStatesrow support (non-boolean value)row removed from its list when output != "1"
pendingDynamicStringstitle-sh/desc-sh/summary-sh of nodes, warn-sh of runnable nodes, title-sh of picker/param optionsreplaces the static string
pendingCheckboxStatesget of [[menu]]/[[fab]] checkbox itemsitem checked = true when output is "1"/"true" (and not "error"). A later debounced refresh also runs when the options menu is created.

After the whole document is parsed, resolvePendingStates() submits its collected scripts in a single batch via ScriptEnvironmen.executeMultipleResultRoot(), then distributes the results to the affected nodes/rows. Dynamic action-parameter fields such as value-sh, label-sh, placeholder-sh, options-sh, and parameter readonly are evaluated later when the action dialog is opened.

22. process = true

Setting process = true on a [[page]] instructs the rendering engine to build and render child nodes progressively on the UI as they are parsed, accompanied by a linear progress indicator, rather than holding display until the entire tree has loaded. Note that a [[group]] is emitted to the UI only after ALL of its children have been collected (group + children appear together), while items outside any group are emitted one by one as soon as they are parsed.

While the first real item is still being built, the page shows placeholder-count shimmering skeleton cards up-front so it doesn't look empty (default: 1). As soon as the FIRST real item finishes loading, the skeleton(s) are hidden immediately - they no longer wait for the whole page to finish loading.

[[page]]
title = "Kernel tweaks"
config = "kernel.toml"
process = true
placeholder-count = 3

23. Page lifecycle

Sub-pages trigger lifecycle callbacks during initialization and reading. before-load executes before parsing begins, followed by after-load upon parsing completion. Dependent on the parse status, load-ok or load-fail shell scripts execute accordingly.

24. Script output control sequences

While a script (from [[action]], [[switch]], [[download]] ...) is running, its log dialog is not just a plain text viewer. If a running script echos a line matching one of the special tags below, the log dialog intercepts that line (it is not printed as normal output) and performs a UI action instead. This lets a shell script drive dialogs, prompts, progress bars, and even control the app process itself, without leaving the log screen.

All tags follow the same pattern: tagname:[content], printed on its own line via echo. They only work while the log dialog is open and reading the script's live output.

24.1. exit:[kill] / exit:[restart]

Terminates the app process from inside a running script. exit:[kill] simply kills the app process; exit:[restart] relaunches the app first and then kills the old process, giving the effect of a full app restart.

[[action]]
title = "Apply and restart app"
confirm = true
warn = "The app will restart to apply changes"
script = """
setprop persist.sys.my_tweak 1
echo "exit:[restart]"
"""
Note: everything printed by the script after the exit:[...] line is never processed - the process is torn down as soon as the tag is detected.

24.2. choose:[value1|Label1,value2|Label2,...]

Pauses the script and renders a row of buttons directly in the log dialog. Each option is value|Label (the |Label part is optional - if omitted, the value itself is used as the label). When the user taps one, its value is written back to the script's standard input, and the script resumes.

[[action]]
title = "Set governor"
script = """
echo "choose:[performance|Performance,powersave|Power saving,schedutil|Balanced]"
read governor
echo "userspace" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor 2>/dev/null
for cpu in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do
  echo "$governor" > "$cpu"
done
echo "Governor set to: $governor"
"""

24.3. pick:[values] / pickv:[values] / pickh:[values]

Same idea as choose:[...] (comma-separated value|Label list, sent back via stdin on tap), but rendered as tappable links inline in the log text rather than as separate buttons. pickv:[...] (or plain pick:[...]) stacks the choices vertically; pickh:[...] lays them out horizontally.

[[action]]
title = "Choose log level"
script = """
echo "Select a verbosity level:"
echo "pickh:[1|Low,2|Medium,3|High]"
read level
echo "Verbosity set to level $level"
"""

24.4. input:[prompt]

Shows a text input field in the log dialog with prompt as its hint. Whatever the user types and submits is written back to the script's standard input, letting the script keep going with free-form text instead of a fixed list of choices.

[[action]]
title = "Rename backup"
script = """
echo "input:[Enter a name for this backup]"
read name
mv /sdcard/backup/last.zip "/sdcard/backup/${name}.zip"
echo "Saved as ${name}.zip"
"""

24.5. progress:[current/total]

Drives the progress bar shown at the top of the log dialog. Echo this repeatedly while a long-running task advances. current = -1 switches the bar to indeterminate (spinning) mode; current >= total hides the bar (task finished).

[[action]]
title = "Copy large folder"
script = """
echo "progress:[-1/100]"
total=$(ls /sdcard/source | wc -l)
i=0
for f in /sdcard/source/*; do
  cp "$f" /sdcard/target/
  i=$((i+1))
  echo "progress:[$i/$total]"
done
echo "progress:[$total/$total]"
echo "Done: $i files copied"
"""

24.6. am:[...] (send an Android Intent)

Sends an Android Intent directly from a shell script, without needing a separate am start binary call wired up elsewhere. Supported sub-commands are start, startservice, foregroundservice, and broadcast, using the same -a/-d/-n flags as the standard Android am command line tool, plus typed extras.

Extra flagTypeDescription
--es key valueStringAttach a string extra named key with the given text value.
--ei key valueIntAttach a 32-bit integer extra named key.
--ez key valueBooleanAttach a boolean extra; the value is parsed as true or false.
--el key valueLongAttach a 64-bit integer extra named key.
--ef key valueFloatAttach a single-precision floating-point extra.
--ed key valueDoubleAttach a double-precision floating-point extra.
--eu key valueUriAttach a URI extra. Values containing :// are parsed as URIs; absolute paths are converted to file URIs.
--esa key v1 v2 ...String[]Attach a string-array extra. Values continue until the next option beginning with -.
--eia key v1 v2 ...Int[]Attach an integer-array extra. Each value must be a valid integer.
--esn keyString?Attach a null string extra. The key is followed by no value.
[[action]]
title = "Open developer options"
script = """
echo "am:[start -a android.settings.APPLICATION_DEVELOPMENT_SETTINGS]"
"""

[[action]]
title = "Broadcast a custom event"
script = """
echo "am:[broadcast -a com.example.MY_ACTION --es status ok --ei code 200]"
"""
Echo am:[help] from any script to print the full command/extras syntax straight into the log dialog - handy for testing without leaving the app.

25. Full example

A representative TOML configuration showcasing groups, actions, parameters, switches, and rich text rows:

# Top-level item (declared before the first [[group]]) - only [[text]] is shown outside a group, edge to edge
[[text]]
[[text.rows]]
text = "Every entry below belongs to the nearest [[group]] above it"
italic = true

[[group]]
title = "System Performance"

[[switch]]
title = "Performance Mode"
desc = "Enable performance governor"
get = "getprop sys.perf.mode"
set = "setprop sys.perf.mode $state"
lock-sh = "[ -f /data/adb/.perf-ready ] && echo 1"

[[action]]
title = "Set CPU Frequency"
script = "echo $freq > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq"
reload = "perf-mode"

[[action.params]]
name = "freq"
title = "Frequency (kHz)"
type = "spinner"

[[action.params.options]]
title = "Mode 1"
value = "1800000"

[[action.params.options]]
title = "Mode 2"
value = "2200000"

[[action.rows]]
text = "Applies to CPU0 only"
italic = true

[[group]]
title = "Maintenance"

[[action]]
title = "Clear cache"
confirm = true
warn = "Cache will be wiped!"
script = "sync; echo 3 > /proc/sys/vm/drop_caches"
auto-off = true

# Page menu (3-dot) and FAB - collected wherever they appear
[[menu]]
handler = "echo Menu: $key"

[[menu.items]]
title = "Refresh"
type = "refresh"

[[menu.items]]
title = "Performance Mode"
type = "checkbox"
get = "getprop sys.perf.mode"
script = "setprop sys.perf.mode $state"

[[fab]]
[[fab.items]]
title = "Flash zip"
type = "file"
suffix = "zip"
script = "sh $state"

26. Tips & pitfalls

  • Use [[node]] for repeatable entries; a single [node] table is also accepted by the parser for one entry. Do not mix the two forms as if they were separate entries for the same key.
  • Groups are flat - never use dotted [[group.action]] nesting (those children are silently ignored). Declare children flat, right after their [[group]].
  • [[toml]] is a reserved marker for inline-TOML detection (config-sh) - do not use it as a node table name.
  • Use selective refresh via reload = "id1,id2" instead of reloading the entire page after action execution.
  • Config problems are shown in one dialog with a single OK button (selectable text, so it can be copied). Syntax errors give Line N, column M; the page is not loaded. Warnings (page still loads) are reported for: an unknown block name such as [[acton]] (a close name is suggested), a [[download]] without url/url-sh, and a load-toml file that does not exist or cannot be read. When load-toml/load-key are used, line numbers refer to the merged content. An invalid rows-sh/params-sh output is reported the same way. The same warning is not repeated on the same screen while the page auto-refreshes.

27. Changelog - recently added fields

Only the 3 most recent TOML changes are kept here, for quick reference when upgrading an existing config.

  • 2026-11-29 - [[chat]]: creating or switching to another conversation no longer stops a running script; it keeps running in the background and the sessions list marks it with ●. Stopping now only happens via Stop, clearing the chat, or deleting that conversation (section 14.4).
  • 2026-11-18 - [[group]] with card = true: a last row with fewer cards than columns is no longer stretched to the full width; the leftover card keeps one column width (section 4.5).
  • 2026-11-18 - New title-below (alias title-bottom) on [[group]] and clickable nodes: in card / grid mode title-below = true moves the title under the icon instead of beside it; a group value is inherited by its entries (sections 3.2, 4.1, 4.5).