Command-line utility for managing a Tildagon (EMF Camp badge) over USB
Project description
tildagon-cli
A command-line utility for managing a Tildagon (EMF event badge) over USB.
A browsable command reference is also available in manual.html — open it directly in a browser.
Table of Contents
Background
tildagon.py wraps mpremote to run MicroPython commands on the badge over USB serial. It can manage apps, WiFi credentials, and settings without needing to interact with the badge UI. I wanted to be able to do things like adding and removing apps in bulk at the CLI, so I made this. Built on Linux, but should be fine on other OSes - assuming things like port are specified in a platform-specific manner.
Install
Requirements: Python 3.13+
From PyPI (recommended — installs the tildagon command plus mpremote automatically):
uv tool install tildagon-cli
pipx install tildagon-cli or pip install tildagon-cli work the same way if you don't use uv.
Run without installing: uv run accepts a URL directly, so the script can be run with no local checkout and no separate mpremote install — dependencies (click, rich, mpremote) are declared inline and handled automatically by uv:
uv run https://codeberg.org/andypiper/tildagon-cli/raw/branch/main/tildagon.py -- --help
Local checkout without uv run:
chmod +x tildagon.py
ln -s "$(pwd)/tildagon.py" ~/.local/bin/tildagon
(this form still needs mpremote installed separately: pip install mpremote.)
Shell completion (zsh):
_TILDAGON_COMPLETE=zsh_source tildagon > ~/.zfunc/_tildagon
Add to ~/.zshrc if not already present:
fpath+=~/.zfunc
autoload -Uz compinit && compinit
Usage
uv run tildagon.py [--port /dev/ttyACM0] <command>
On Linux, the device is often /dev/ttyACM0 (default). Override with --port / -p.
Every command accepts -h as well as --help, e.g. tildagon apps install --help.
Commands
info
Show firmware version, MicroPython version, frontboard type, and attached hexpansions.
uv run tildagon.py info
battery
Show battery level and charge state.
uv run tildagon.py battery
df
Show flash filesystem usage on the badge.
uv run tildagon.py df
Wraps mpremote df. If Avail (KB) is negative and Use% is over 100%, the badge's flash is full — that shows up as apps crashing on OSError: 28 (ENOSPC) whenever they try to write settings or cache files. Free space with apps uninstall.
name
Get or set the badge display name.
uv run tildagon.py name get
uv run tildagon.py name set "Jonty"
wifi
Read or update WiFi credentials.
uv run tildagon.py wifi get
uv run tildagon.py wifi set <ssid> <password>
autoexec
Get, set, or clear the app that launches automatically at startup instead of the default launcher.
uv run tildagon.py autoexec get
uv run tildagon.py autoexec set "Settings"
uv run tildagon.py autoexec clear
autoexec set writes /autoexec.bat with the exact app name as shown in the launcher menu. Requires newer firmware.
dev
Get, enable, or disable developer mode.
uv run tildagon.py dev get
uv run tildagon.py dev enable
uv run tildagon.py dev disable
Developer mode adds a handful of (shark-prefixed) debug apps to the launcher menu (BoopSpinner, Menu demo, Text demo, Inhibit LEDs, ESPNow ping), and unlocks manual editing of a hexpansion's unique ID in the Hexpansions app. Developer mode can be toggled on the badge itself by pressing confirm 5 times on the "Software version" line in Settings; there is no in-UI way to turn it back off, so use dev disable.
apps
List, install, or uninstall badge apps.
uv run tildagon.py apps list
uv run tildagon.py apps install path/to/myapp [path/to/another]
uv run tildagon.py apps uninstall <directory> [<directory> ...]
uv run tildagon.py apps uninstall
apps list shows the display name alongside the directory name (needed for uninstall), reading metadata from either tildagon.toml or tildagon.json (the app store writes the latter). Installing reboots the badge automatically. Run apps uninstall with no arguments to pick apps to remove from a numbered list instead of copying directory names by hand.
store
Search and install apps from the Tildagon App Store.
uv run tildagon.py store search [query] [--category Games,Apps] [--author x] [--license MIT] [--service github] [--capability neopixels] [--requires nmea] [--supports x] [--limit 10]
uv run tildagon.py store install [<code> ...] [--category Games,Apps] [--author x] [--license MIT] [--service github] [--capability neopixels] [--requires nmea] [--supports x] [--limit 10]
uv run tildagon.py store url <code> [<code> ...]
uv run tildagon.py store failures
store url prints the app store page for one or more codes (from store search), e.g. to open in a browser. store search and store install take the same filters (comma-separated, matched against the store API) and sort newest first, so store search --limit 10 shows the 10 most recently released apps (the table title shows "N of TOTAL" when a limit truncates the match count). --capability filters on apps that require or support a given capability; --requires/--supports narrow to just one side. Short names like neopixels expand to the full capability registry URL automatically. Run store install with no codes (optionally filtered) to browse a numbered list and pick apps interactively instead of looking up codes first; multiple codes are resolved in a single store request. store failures lists app submissions that failed to publish, with the validation reason — useful when an app you expect isn't showing up.
settings
Show all badge settings (passwords redacted by default), or get/set/clear a single key.
uv run tildagon.py settings
uv run tildagon.py settings --raw
uv run tildagon.py settings get <key>
uv run tildagon.py settings set <key> <value>
uv run tildagon.py settings clear <key>
monitor
Open the badge REPL for debugging. Useful for seeing tracebacks from crashing apps.
uv run tildagon.py monitor
Press Ctrl-C to interrupt the running app, Ctrl-D to soft-reset while staying connected, Ctrl-] to exit.
reboop / reboot
Reset the badge.
uv run tildagon.py reboop
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tildagon_cli-0.1.0.tar.gz.
File metadata
- Download URL: tildagon_cli-0.1.0.tar.gz
- Upload date:
- Size: 17.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6bd344bc04973cfaf70d68c933340b46f653c90fae887bdac020d54da4f6eb72
|
|
| MD5 |
3c84ff5b88a8a28b8f0b38868c7793df
|
|
| BLAKE2b-256 |
6c4bbfd40d1a29eae414b84a658bec7b43a48b1c6634ebc5c4145a96e755cad6
|
File details
Details for the file tildagon_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: tildagon_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0050a4f9c22ac86512db6f0898138b2b4be0b06af81e88e81ad25bed330ed6cb
|
|
| MD5 |
1af4cdf215f54c4b29f64bb7c63ca1f9
|
|
| BLAKE2b-256 |
e16686f9be63e13e8ae1d556c428b825dffa6214a318c3b5b9117f97c76b7c99
|