Create modules
Reference for archr-launcher modules (API 2) - execution model, module.toml, permissions, extension points, JSON-RPC protocol, Module store and two examples.
A module is an external program, in any language the image can run, that archr-launcher starts inside a sandbox and talks to over JSON. The module declares what it adds (Start menu tiles, shortcuts and widgets, quick menu items, Settings pages, event hooks) in a module.toml; the launcher draws everything with its own components. A module never draws pixels, never reads the controller directly and never runs as root.
This page describes API 2. Modules with api_version = 1 still run; the permissions config_write, hooks, system and launch need api_version = 2. Users install and manage modules in Settings › System › Modules (see Launcher).
To have a coding assistant such as Claude Code write and check a module from these rules, install the AI skill for themes and modules.
Execution model
Each module is a separate process speaking JSON-RPC 2.0, one object per line (NDJSON), over its stdin and stdout. The launcher starts it with systemd-run --pipe under its own unprivileged user: one uid (equal to the gid) per module id, from 60600 to 61099, assigned the first time the launcher sees the module. Sandbox and cgroup limits are set by systemd.
Two modes, declared in the manifest:
| mode | process lifetime | typical use | cost |
|---|---|---|---|
oneshot | one process per message: one line in, then it exits | user actions, rare events | nothing resident in RAM; each call pays the process start |
daemon | one process while the launcher is on screen | live values (battery), focus events, launch.before | one resident process plus the systemd-run that waits for it |
Starting a sandboxed process is not free, so focus events (focus.system, focus.game) go only to daemons.
Lifetime rules:
- No module runs during a game. Before handing the screen to a game, the launcher sends
game.started, thenshutdown, waits 500 ms and kills what is left. When the launcher comes back, a daemon receivesgame.ended. - Daemons start one at a time, after the first frame, about 2 s after launch.
- End of stdin (EOF) means the module must exit.
- At most 3 daemons at the same time; the fourth is refused with a notice.
Languages
The guaranteed runtimes are shell (sh/bash) with jq and native aarch64 binaries (Rust, Go, C). Python may be present on the image, but a module must not depend on it (runtime = "python3" is refused).
Package layout
<id>/
module.toml required
main.sh | bin/<aarch64 binary>
locales/en.toml required; pt_BR.toml, es.toml, ru.toml recommended
icons/<name>.svg unmodified Lucide 0.468.0 SVGs, only the ones used
preview.png 640×480, shown in the Module store
LICENSE
README.mdThe folder is named after the id. Installed modules go to /storage/.config/archr-launcher/modules/<id>/. Each module also gets a writable data folder, /storage/.config/archr-launcher/module-data/<id>/ (its HOME), and a read-only copy of its settings, /storage/.config/archr-launcher/module-settings/<id>.json, which only the launcher writes.
To check a folder by hand:
archr-launcher --check-module examples/modules/bateria-detalhadaIt exits non-zero with the list of problems; warnings (unknown keys, wrong types) are shown but do not fail the check.
module.toml
id = "bateria-detalhada" # [a-z0-9-]{3,40}, unique on the device
version = "1.0.0" # x.y.z
api_version = 2 # 1 or 2
min_launcher = "0.1.0" # optional
name = "@name" # text, "@key" from locales/, or a table per language
description = "@description"
author = "Fulano <fulano@exemplo.org>"
license = "MIT"
homepage = "https://github.com/fulano/archr-bateria"
icon = "battery-full" # Lucide name; the SVG ships in icons/
[run]
runtime = "bash" # "sh" | "bash" | "native"
entry = "main.sh" # path inside the module
mode = "daemon" # "daemon" | "oneshot"
[limits]
memory_mb = 16 # default 32, between 8 and 64
[permissions] # all optional; missing = denied
# net = true
# read = ["roms"]
# config_read = ["system.language"]
# config_write = ["system.cpugovernor"] # API 2
# hooks = ["launch"] # API 2
# system = ["cpu-profile"] # API 2
# launch = true # API 2
[[hooks]]
event = "focus.game" # event subscriptionFatal errors (the module does not run): invalid id, version, api_version or [run]; an unknown or not yet available permission; more than 48 page rows; an icon that is not an intact Lucide SVG; a missing locales/en.toml. Anything else invalid becomes a warning and the field is ignored.
Translations: locales/<language>.toml uses the same flat key = "text" format as the launcher's own catalogs (en, pt_BR, es, ru). Labels written as @key are looked up in the module's catalog, falling back to en. name and description can also be a table per language ({ en = "...", pt_BR = "..." }); the Module store shows those before the module is installed, while with @key it shows the repository name. Dynamic text can arrive ready or as {"key": "@status.charging", "args": {...}} for the launcher to format.
Icons: Lucide only. icon = "<name>" plus the unmodified SVG in icons/<name>.svg; the validator compares it with the Lucide 0.468.0 set and rejects anything else.
Extension points
Everything is declared in the manifest, so the launcher can show it without starting the module; only dynamic content (values, lists, decisions) comes from the process.
- Start menu tiles (
[[start.tiles]]): up to 2 per module and 4 in total; the row scrolls when it does not fit. A tile shows a live value under its title when the module sendsui.updatetotile:<id>. Fields:id,label,icon(optional, defaults to the module icon) andopen = "<page>"(opens that Settings page) oraction = "<name>"(sendsaction.invoke). - Start shortcuts (
[[start.shortcuts]], same fields): one per module, two in total, between Wi-Fi and Sleep. The label appears under the row while the shortcut has focus. - Start widgets (
[[start.widgets]], same fields): one per module, two in total. A 2×1 block between the tiles and the shortcuts, with the module icon and name, a large value, a text beside it and a bar. The module sendsui.updatetowidget:<id>withvalue,detailandprogress(0 to 100). Position and size come from the theme (start_widgets, see Themes). - Quick menu (Y) item (
[[quick]]):context = "game"or"system", an optionalsystems = [...]filter (empty = all) and anaction, inserted before Sleep. The action receives{system, game_key, rom}for a game or{system}for a system. One item per module, three in total. - Settings pages (
[[settings.pages]]and[[settings.pages.rows]]): pages under Settings › System › Modules › <module>, with the same fixed layout as the rest of Settings (a theme changes only colors, fonts and icons). Up to 8 pages and 48 rows per module. - Events (
[[hooks]]): see the table in the protocol section.
Row types for Settings pages:
type | behavior | fields |
|---|---|---|
toggle | switch; writes key | key, default (bool) |
check | box checked with A | key, default (bool) |
value | ‹ › between choices | key, choices, labels, default |
slider | ‹ › numeric (becomes a value with the steps) | key, min, max, step, default |
action | A sends action.invoke; the row shows "…" until the reply | action, confirm (optional question) |
text | read-only; the value comes from ui.update to row:<id> | id, initial value |
keyboard | opens the launcher's keyboard; writes key | key, max (≤ 64), secret |
progress | title, text on the right and a bar; all from ui.update to row:<id> (value, progress 0 to 100) | id |
list | rows sent by the module: ui.update to row:<id> with items: [{id, title, subtitle?, value?, action?}] (up to 20); A on a row with id and action sends action.invoke with context: {item: "<id>"} | id |
Common fields: label, subtitle, section (heading above the row). The launcher owns the values: it writes module-settings/<id>.json atomically and the module only reads it (ARCHR_MODULE_SETTINGS). Toggles and checks become booleans, sliders numbers, the rest text. The module can ask for settings.set only on keys it declared.
keyboard rows with secret = true stay out of that file. They go to module-settings/<id>.secret.json (ARCHR_MODULE_SECRETS), mode 0600, owned by the module's own user. The value also arrives in initialize and settings.changed over stdin, never as a process argument or in the log.
There is no access to the launcher's internal state, raw input or pixels, and no way to replace whole launcher screens. The manifest keys screens, collections, replace and provider are ignored with a warning.
Permissions and sandbox
Each process runs as the module's own user, so one module cannot read another's /proc entries, environment, files or signals. The sandbox includes NoNewPrivileges, no capabilities, ProtectSystem=strict and TasksMax=16. It hides the whole /storage partition and binds back only the module's own folder (read-only), its data folder (writable, mode 0700) and its settings and secrets files (read-only). /sys and /proc stay readable (battery, CPU, memory). D-Bus and the userdb sockets are inaccessible, so no module talks to system services. Memory is capped by limits.memory_mb, CPU is shared by weight (CPUWeight=20, Nice=10).
Without net, the process has no network (PrivateNetwork, AF_UNIX only). With net, only AF_UNIX, AF_INET and AF_INET6 are allowed, localhost is denied (except the systemd-resolved DNS stub, 127.0.0.53 and .54) and so is every address of the device itself. The image's archr-modules-firewall enforces the second part, and the launcher gives a module network only after it sees /run/archr/modules-firewall.
Permissions are declared in the manifest and shown before installing:
| permission | effect | shown to the user |
|---|---|---|
| (none) | own folder, /sys and /proc read-only | "No special access" |
net = true | network allowed | "Network · Accesses the internet" (amber) |
read = ["roms", "bios", "screenshots"] | read-only access to /storage/roms, /storage/roms/bios, /storage/roms/screenshots | "Reads your ROMs" … (amber together with net) |
config_read = [...] | config.get for the listed keys only | "Reads settings" |
config_write = [...] | config.set for the listed keys only, values checked (API 2) | "Changes settings" (amber) |
hooks = ["launch"] | receives launch.before before each game (API 2) | "Sees each game you open" |
system = ["cpu-profile"] | in launch.before, may pick the CPU governor of that launch (API 2) | "Picks the CPU profile of a game" |
system = ["brightness"] | system.call changes brightness, 10 to 100 % (API 2) | "Changes the screen brightness" |
system = ["volume"] | system.call changes volume, 0 to 100 % (API 2) | "Changes the volume" |
system = ["wifi"] | system.call turns Wi-Fi on or off (API 2) | "Turns Wi-Fi on and off" (amber) |
system = ["screenshot"] | system.call takes a screenshot of the launcher (API 2) | "Takes screenshots of the launcher" |
launch = true | game.launch right after the user picks one of the module's actions (API 2) | "Opens games" |
Amber permissions are listed first.
Keys accepted in config_read: system.language, system.timezone, system.cpugovernor, system.hostname, global.netplay.nickname, global.retroachievements, audio.volume, display.brightness. Passwords, tokens and Wi-Fi keys never.
Keys accepted in config_write:
| key | accepted values |
|---|---|
system.cpugovernor | performance, ondemand, schedutil, powersave |
global.netplay.nickname | [A-Za-z0-9 _.], 1 to 32 characters |
Even with roms, /storage/roms/backup and /storage/roms/backups stay inaccessible. The permission write is reserved: asking for it blocks the module for now.
Users see the permissions before installing ("Allow and install"). A module copied by hand appears switched off with "Waiting for your permission" and shows the same screen on first use. If an update asks for new permissions, the Module store shows only the new ones and asks for consent again; without consent for everything it asks, the module does not run.
Failures
These count as a failure: timeout, invalid JSON, a non-zero exit, dying before replying, and not reading stdin. 3 failures in 10 minutes switch the module off until the user turns it on again in Settings › System › Modules. A daemon that crashes restarts after 1 s, 5 s and 30 s. If a version that fails was just updated from the store, the previous version comes back by itself.
Time limits: initialize 3 s, action.invoke 1 s (daemon), a whole oneshot 2 s.
Protocol
JSON-RPC 2.0, one UTF-8 object per line (\n, up to 64 KiB), on the module's stdin/stdout. Every message has "jsonrpc": "2.0". Stderr is the log: the launcher logs up to eight stderr lines, each cut to 200 characters. Complete stderr capture in the unit journal (journalctl -u 'archr-mod-<id>*') is not guaranteed.
Environment: HOME and ARCHR_MODULE_DATA (writable folder), ARCHR_MODULE_DIR (code, read-only), ARCHR_MODULE_SETTINGS (settings JSON), ARCHR_MODULE_SECRETS (JSON of the secret rows; absent without them), ARCHR_MODULE_ID, ARCHR_API_VERSION, ARCHR_LAUNCHER_VERSION, ARCHR_LANG, ARCHR_DEVICE.
Launcher → module, requests (with id, need a reply):
| method | params | result |
|---|---|---|
initialize (daemon only) | {api_version, launcher_version, language, device, settings, permissions, capabilities} | {"ready": true} |
action.invoke | {action, context:{system?, game_key?, rom?}} | {} |
shutdown (daemon only) | {} | {}, then exit |
launch.before (daemon only, needs hooks = ["launch"]) | {game:{system, game_key, name}} | {"decision":"allow"} or {"decision":"modify","changes":{"governor":"<g>"}} |
launch.before: all replies together have 300 ms. A late module counts as allow for that launch (the game never waits), and 3 late replies in a row count as one failure. There is no deny: a module cannot stop the user from playing. changes.governor is valid only with system = ["cpu-profile"] and one of the four governors; the launcher passes --governor=<g> to runemu.sh for that run only and does not change the user's setting. If two modules choose, the first by id wins. Netplay and Moonlight do not ask.
Launcher → module, events (notifications, no id): {"jsonrpc":"2.0","method":"event","params":{"name":"focus.game","data":{...}}}, only for events subscribed in [[hooks]]:
| event | data | sent to |
|---|---|---|
launcher.started | {cold} (false when coming back from a game) | daemon and oneshot |
game.started | {game:{system, game_key, name}} | daemon and oneshot (the process stops right after) |
game.ended | {game:{system, game_key, name}, exit_code, seconds} | daemon and oneshot |
focus.system | {system}, after 400 ms without moving | daemon only |
focus.game | {system, game_key, name}, after 400 ms without moving | daemon only |
settings.changed | {key, value} | daemon, always, no subscription needed |
Module → launcher:
| method | type | params |
|---|---|---|
ui.update | notification | {target: "tile:<id>" | "shortcut:<id>" | "widget:<id>" | "row:<id>" | "quick:<id>", value?: text or {key, args}, detail?: text, progress?: 0 to 100, items?: [...], hidden?: bool} |
ui.notify | notification | {text: text or {key, args}} or {key, args} → notice banner, at most one every 10 s |
log | notification | {level: "info" | "error", message} |
settings.set | request | {key, value}, only keys declared in the manifest → {} |
config.get | request | {key}, needs config_read → {value} (null if absent) |
config.set | request | {key, value}, needs config_write and an accepted value → {}; a value equal to the current one is not written; 1 per second and 10 per hour (-32003) |
game.launch | request | {system, game_key}, needs launch → {} |
system.call | request | {name, value?}, needs the action in system → {} when the script finished well, -32000 if it failed |
system.call runs a closed list of actions. The launcher calls the script that owns each one, with a 15 s time limit, never a command from the module:
name | value | what runs | limit |
|---|---|---|---|
brightness | integer 10 to 100 | brightness set <v> and the on-screen indicator | 1 per second |
volume | integer 0 to 100 | volume <v> and the on-screen indicator | 1 per second |
wifi | true / false | wifictl enable / wifictl disable; notice banner | 1 per minute |
screenshot | none | archr-screenshot (respects archr.screenshot.enabled); notice banner; refused (-32001) while a keyboard is open | 1 every 10 s |
Brightness never goes below 10 %, so the screen does not look off. The banner says which module touched Wi-Fi or took the screenshot.
game.launch is valid only until 5 s after the user picks one of the module's actions (tile, shortcut, Y item, action row), once per pick, and only for emulated games (never tools, ports or collections). The launcher opens the game through the same path as the user's own choice: it waits for pending saves, closes Settings, runs launch.before, stops all modules and hands over the screen. If it cannot (lobby open, another launch pending, system not loaded yet), it refuses and logs it; the {} only confirms receipt.
ui.update reaches the screen at most 4 times per second (the launcher merges them). hidden: true hides a tile, shortcut or item until a hidden: false.
In oneshot mode the launcher writes one message (request or event) and closes stdin; the module may emit notifications (ui.update, ui.notify, log) and, if there was an id, exactly one reply. There is no initialize or shutdown; settings come from ARCHR_MODULE_SETTINGS. Module requests (config.get, config.set, settings.set, game.launch) work only in daemons.
Errors (error: {code, message}): -32700 invalid JSON, -32600 invalid request, -32601 unknown method, -32602 invalid params, -32001 permission denied, -32002 timeout, -32003 rate limit, -32004 not found, -32000 the launcher could not do it (for example, save). A module must answer -32601 to methods it does not know; the launcher does not count that as a failure.
Example 1: "Bateria detalhada" (bash + jq, daemon)
A Start menu tile with charge and power, and a page with battery health, a switch and a refresh interval. No permissions: it only reads /sys.
module.toml
id = "bateria-detalhada"
version = "1.0.0"
api_version = 1
min_launcher = "0.1.0"
name = "@name"
description = "@description"
author = "Fulano <fulano@exemplo.org>"
license = "MIT"
homepage = "https://github.com/fulano/archr-bateria"
icon = "battery-full"
[run]
runtime = "bash"
entry = "main.sh"
mode = "daemon"
[limits]
memory_mb = 24
[[start.tiles]]
id = "bateria"
label = "@name"
icon = "battery-full"
open = "main"
[[settings.pages]]
id = "main"
title = "@name"
[[settings.pages.rows]]
type = "text"
id = "agora"
label = "@row.now"
section = "@section.state"
[[settings.pages.rows]]
type = "text"
id = "saude"
label = "@row.health"
[[settings.pages.rows]]
type = "toggle"
key = "watts"
label = "@row.watts"
section = "@section.options"
default = true
[[settings.pages.rows]]
type = "value"
key = "intervalo"
label = "@row.interval"
choices = ["5", "15", "30"]
labels = ["@every.5", "@every.15", "@every.30"]
default = "15"
[[settings.pages.rows]]
type = "action"
action = "atualizar"
label = "@row.refresh"locales/pt_BR.toml (the other three languages use the same keys)
"name" = "Bateria detalhada"
"description" = "Carga, potência e saúde da bateria no menu Start."
"section.state" = "Estado"
"section.options" = "Opções"
"row.now" = "Agora"
"row.health" = "Saúde"
"row.watts" = "Mostrar potência"
"row.interval" = "Atualizar a cada"
"row.refresh" = "Atualizar agora"
"every.5" = "5 segundos"
"every.15" = "15 segundos"
"every.30" = "30 segundos"
"st.Charging" = "{pct} % · carregando"
"st.Discharging" = "{pct} %"
"st.Full" = "{pct} % · completa"
"st.watts" = "{pct} % · {w} W"main.sh
#!/bin/bash
# Bateria detalhada: archr-launcher daemon module (API 1), bash + jq.
PS=/sys/class/power_supply
watts=true
interval=15
send() { printf '%s\n' "$1"; }
battery() {
for d in "$PS"/*; do
if [ "${d##*/}" = battery ] || [ "$(cat "$d/type" 2>/dev/null)" = Battery ]; then
echo "$d"
return
fi
done
}
update() {
local d pct status ua uv w now target full design health
d=$(battery)
[ -n "$d" ] || return
pct=$(cat "$d/capacity" 2>/dev/null || echo 0)
status=$(cat "$d/status" 2>/dev/null || echo Discharging)
ua=$(cat "$d/current_now" 2>/dev/null)
uv=$(cat "$d/voltage_now" 2>/dev/null)
if [ "$watts" = true ] && [ -n "$ua" ] && [ -n "$uv" ] && [ "$status" = Discharging ]; then
w=$(awk -v a="$ua" -v v="$uv" 'BEGIN { p = a * v / 1e12; if (p < 0) p = -p; printf "%.1f", p }')
now=$(jq -cn --argjson pct "$pct" --arg w "$w" '{key: "@st.watts", args: {pct: $pct, w: $w}}')
else
case $status in Charging | Full) ;; *) status=Discharging ;; esac
now=$(jq -cn --argjson pct "$pct" --arg k "@st.$status" '{key: $k, args: {pct: $pct}}')
fi
for target in tile:bateria row:agora; do
send "$(jq -cn --arg t "$target" --argjson v "$now" \
'{jsonrpc: "2.0", method: "ui.update", params: {target: $t, value: $v}}')"
done
full=$(cat "$d/charge_full" 2>/dev/null)
design=$(cat "$d/charge_full_design" 2>/dev/null)
if [ -n "$full" ] && [ "${design:-0}" -gt 0 ]; then
health="$((100 * full / design)) %"
else
health="-"
fi
send "$(jq -cn --arg h "$health" \
'{jsonrpc: "2.0", method: "ui.update", params: {target: "row:saude", value: $h}}')"
}
reply() { send "$(jq -cn --argjson id "$1" --argjson r "$2" '{jsonrpc: "2.0", id: $id, result: $r}')"; }
handle() {
local method id key value
method=$(jq -r '.method // empty' <<<"$1")
id=$(jq -c '.id // null' <<<"$1")
case $method in
initialize)
watts=$(jq -r 'if .params.settings.watts == false then false else true end' <<<"$1")
interval=$(jq -r '.params.settings.intervalo // "15"' <<<"$1")
reply "$id" '{"ready": true}'
update
;;
event)
if [ "$(jq -r '.params.name' <<<"$1")" = settings.changed ]; then
key=$(jq -r '.params.data.key' <<<"$1")
value=$(jq -r '.params.data.value' <<<"$1")
case $key in
watts) watts=$value ;;
intervalo) interval=$value ;;
esac
update
fi
;;
action.invoke)
[ "$(jq -r '.params.action' <<<"$1")" = atualizar ] && update
reply "$id" '{}'
;;
shutdown)
reply "$id" '{}'
exit 0
;;
*)
[ "$id" = null ] || send "$(jq -cn --argjson id "$id" --arg m "$method" \
'{jsonrpc: "2.0", id: $id, error: {code: -32601, message: $m}}')"
;;
esac
}
while true; do
if IFS= read -r -t "$interval" line; then
handle "$line"
elif [ $? -gt 128 ]; then
update # nothing arrived within the interval
else
exit 0 # EOF: the launcher closed stdin
fi
doneExample 2: "Perfil de CPU por sistema" (sh + jq, daemon, API 2)
Picks the CPU governor of each game launch by system. It uses launch.before and, with it, --governor= on runemu.sh. The version in examples/modules/perfil-cpu is the API 1 variant: a Y menu item that only suggests a governor.
module.toml
id = "perfil-cpu"
version = "1.0.0"
api_version = 2
min_launcher = "0.1.0"
name = "@name"
description = "@description"
author = "Fulano <fulano@exemplo.org>"
license = "MIT"
homepage = "https://github.com/fulano/archr-perfil-cpu"
icon = "cpu"
[run]
runtime = "sh"
entry = "main.sh"
mode = "daemon"
[permissions]
hooks = ["launch"]
system = ["cpu-profile"]
[[settings.pages]]
id = "main"
title = "@name"
[[settings.pages.rows]]
type = "value"
key = "pesados"
label = "@row.heavy"
subtitle = "@row.heavy_sub"
choices = ["performance", "schedutil"]
labels = ["@gov.performance", "@gov.schedutil"]
default = "performance"
[[settings.pages.rows]]
type = "value"
key = "leves"
label = "@row.light"
subtitle = "@row.light_sub"
choices = ["ondemand", "powersave"]
labels = ["@gov.ondemand", "@gov.powersave"]
default = "powersave"main.sh
#!/bin/sh
# Daemon: answers launch.before inside the 300 ms the launcher allows.
send() { printf '%s\n' "$1"; }
setting() {
value=$(jq -r --arg k "$1" '.[$k] // empty' "$ARCHR_MODULE_SETTINGS" 2>/dev/null)
printf '%s' "${value:-$2}"
}
while IFS= read -r msg; do
eval "$(printf '%s' "$msg" | jq -r '@sh "id=\(.id // "null") method=\(.method // "") system=\(.params.game.system // "")"')"
case $method in
initialize) send "{\"jsonrpc\":\"2.0\",\"id\":$id,\"result\":{\"ready\":true}}" ;;
shutdown) send "{\"jsonrpc\":\"2.0\",\"id\":$id,\"result\":{}}"; exit 0 ;;
launch.before)
case $system in
n64|psp|dreamcast|saturn|nds|psx) governor=$(setting pesados performance) ;;
nes|gb|gbc|gamegear|mastersystem|atari2600|pcengine) governor=$(setting leves powersave) ;;
*) governor= ;;
esac
if [ -z "$governor" ]; then
send "{\"jsonrpc\":\"2.0\",\"id\":$id,\"result\":{\"decision\":\"allow\"}}"
else
send "{\"jsonrpc\":\"2.0\",\"id\":$id,\"result\":{\"decision\":\"modify\",\"changes\":{\"governor\":\"$governor\"}}}"
fi ;;
*) [ "$id" = null ] || send "{\"jsonrpc\":\"2.0\",\"id\":$id,\"error\":{\"code\":-32601,\"message\":\"method\"}}" ;;
esac
doneThe launcher checks governor against the closed list and passes --governor=<g> to runemu.sh for that run only; the user's own CPU governor setting does not change.
Testing
- By hand, a
oneshot:echo '{"jsonrpc":"2.0","id":1,"method":"action.invoke","params":{"action":"sugerir","context":{"system":"n64"}}}' | ARCHR_MODULE_SETTINGS=/dev/null sh main.sh - By hand, a daemon: send
initialize, then whatever you want, and close stdin. - On a PC:
archr-launcher --check-module <folder>checks the manifest, locales, Lucide icons and sizes. With a test root (ARCHR_LAUNCHER_ROOT=<folder>) the launcher runs modules without a sandbox and warns in the log; use it only for development. - On the device: copy the folder to
/storage/.config/archr-launcher/modules/<id>/over SSH and switch it on in Settings › System › Modules (it appears as "Local"). Errors:journalctl -u 'archr-mod-<id>*'.
Module store
The Module store is in Settings › System › Modules, with the tabs Reviewed, All and Installed. It works like the Theme store and adds a permissions screen.
The signed catalog of reviewed modules is implemented in the launcher, but the catalog has not been published yet. Without a valid catalog, modules get no review badge and no automatic updates.
-
Discovery: every public, non-archived GitHub repository with the topic
archr-launcher-module. Modules reviewed by the ArchR project get the "Reviewed by ArchR" badge and come first. The list comes from thereviewed.jsonof the latest release ofarchr-linux/archr-modules, with the repository and the digest of the reviewed package; publishing another package removes the badge until it is reviewed again. -
Signed list:
reviewed.jsoncomes withreviewed.json.sig, an Ed25519 signature of the whole file made with the project's key. The launcher accepts the list only with a valid signature, anexpiresdate still in the future and aserialnot lower than the last one it saw or the build'sMIN_SERIAL. Without a valid list, no module gets a badge or updates itself, and the store says why. An installed module shows the badge only if the digest of the package on the device is in the list. -
Release rules: the latest non-pre-release, tagged
v<version>matching the manifest'sversion, with three assets:<id>-<version>.tar.gz, a loose copy ofmodule.tomlandpreview.png. The loosemodule.tomlmust be byte-identical to the one in the package. Tarball up to 8 MB, unpacked up to 16 MB, at most 500 entries, everything inside<id>/. Only files and folders: links, devices, absolute paths and..make the store refuse the whole package.tar -czf bateria-detalhada-1.0.0.tar.gz bateria-detalhada/ -
Verification: the loose
module.tomlis downloaded first, to show name and permissions without fetching the package. After the download the store checks the SHA-256 digest GitHub publishes for the asset and the identicalmodule.toml, and validates the package before putting it inmodules/<id>. Anidbelongs to one repository: another repository with the sameidis refused. -
Install: a screen with name, author, version, preview and the permissions list, then Allow and install.
-
Updates: a manual update is a button in the store. If permissions grow, only the new ones are shown and consent is asked again. The previous version is kept until the new one works.
-
Automatic updates (Settings › System › Modules › Update reviewed ones by themselves, off by default): once a day, 2 minutes after start and never during a game, the launcher installs a new version of a store module only if its package is in the signed reviewed list and it asks for nothing new (permission, tile, shortcut, widget, item, page or staying resident). It never updates a module that is switched off or failing. Otherwise the list shows "→ x.y.z available". A notice banner confirms each update.
-
Turn on/off and remove: Settings › System › Modules, one switch per module. Details (Y on the list) show the package digest, whether it matches the reviewed list, the last use and the failures of the last 10 minutes. Removing asks whether to delete the module's data and settings too.
-
Local install for developers: copy the folder to
modules/<id>/over SSH; it appears switched off, with a "Local" badge, and shows the permissions screen on first use.
Create themes
How to create, test and publish archr-launcher themes - theme.toml colors, fonts, style, images, views, Game Details, achievements, sounds and the Theme store.
AI skill for themes and modules
Install the archr-launcher-dev skill so Claude Code or another coding assistant can build, test and publish archr-launcher themes and modules.