Prompt to hardware, in your terminal: detect a board, chat to build, deploy, watch serial.
Project description
axiometa-cli
Prompt → hardware, in your terminal. The CLI is a thin client of the same backend Studio's browser talks to: codegen stays in the cloud (Claude + the catalog + your auth/limits), and only the local half — provision the toolchain, deploy, read the serial channel — runs on the machine the board is plugged into. Same brain as Studio; the terminal (or a Pi) is the body instead of the browser.
It is one experience whether the board speaks Arduino or MicroPython — the board's facts decide the
deploy verb (deploy = compile+flash on Arduino; run/install on MicroPython).
Install
Raspberry Pi / Linux / macOS (from a checkout):
./cli/install.sh
axiometa provision # one-time: arduino-cli + ESP32 core + libs (+ mpremote)
axiometa # detect a board and start building
Windows / any OS (pip):
pip install -e cli
axiometa provision
axiometa
Config (env, all optional):
AXIOMETA_BACKEND=https://studio.axiometa.io # or your local backend
AXIOMETA_TOKEN=... # your auth (carried to the backend)
AXIOMETA_KNOWLEDGE=/path/to/backend/knowledge/boards # auto-found next to a repo checkout
The experience (axiometa)
Typing axiometa with no verb runs the guided loop:
- Detect — lists connected boards, naming the silicon from its USB identity (ESP32-S3 vs RP2040).
- Target — confirms the board + language, picks the port, writes
axiometa.json. - Toolchain — if
arduino-cli/mpremoteis missing, offersaxiometa provision. - Chat — describe what to build; Axie streams its reply, shows what it's reading, and writes the project files. Refine in follow-ups ("make it blink faster").
- Deploy — when the device program is (re)generated, offers to flash it (Arduino) or run/install it (MicroPython), streaming the toolchain output.
- Monitor — after a successful deploy, streams the serial channel so you see the device talk.
Mid-chat commands: /flash /deploy /run /install /monitor /serve /board /help /exit.
Verbs (scripting / power use)
axiometa provision # install the local toolchain (one-time)
axiometa devices # list connected boards (with USB identity)
axiometa board pi-hat # set the target (writes axiometa.json)
axiometa prompt "blink the RGB LED on port 1 red" # one-shot: generate + write files
axiometa flash --firmware mp.uf2 # RP2040 over SWD: lay MicroPython on the chip (Pi HAT)
axiometa run # MicroPython: test in RAM (ephemeral)
axiometa install # MicroPython: persist to flash
axiometa deploy # Arduino: compile + flash
axiometa monitor # stream serial to the terminal
axiometa serve # serve browser/*.html on 127.0.0.1 (ssh -L hint when headless)
The Pi HAT (RP2040 flashed over SWD, talked-to over UART)
The Pi HAT's RP2040 has no USB — the Raspberry Pi is both its programmer and its host, over the 40-pin header. So the Pi HAT path differs from a USB board, and the CLI handles it:
axiometa flash --firmware <mp.uf2>lays MicroPython onto the chip over SWD (OpenOCD bit-banging Pi GPIO24=SWDIO / GPIO25=SWCLK / GPIO23=RUN). A.uf2is auto-converted to the.binOpenOCD needs;.elf/.binalso work. This is one-time, and the brick-recovery path.run/install/monitortalk over the Pi's UART at/dev/serial0(RP2040 GP0/GP1 ↔ Pi GPIO15/14), not USB. The CLI shipsboard_pins.py+boot.pywith each deploy;boot.pyputs the REPL on UART0 sompremotecan reach the board over/dev/serial0.
One-time Pi setup (handled by axiometa provision, or do it yourself):
sudo apt install openocd # SWD flashing
sudo raspi-config -> Serial Port: login shell over serial = NO, serial hardware = YES # frees /dev/serial0
sudo -E axiometa flash --firmware mp.uf2 # SWD needs GPIO/root; -E keeps your env
Notes: the flashed firmware must expose the UART REPL (freeze boot.py into the build, or use a
UART-REPL MicroPython) for first contact. bcm2835gpio (the default OpenOCD driver) is Pi 0-4 only;
on a Pi 5 set AXIOMETA_OPENOCD_DRIVER=linuxgpiod. Override the whole OpenOCD interface with
AXIOMETA_OPENOCD_CFG=/path/to.cfg if your wiring differs.
Where things live
A project is a folder with an axiometa.json manifest (board + substrate + modules), the device
program (sketch.ino / main.py), any browser/*.html surfaces, and board_pins.py. cd into a
folder and run axiometa — it is project-rooted, like git.
Headless vs. desktop
The CLI detects where a visual surface can render and tells the backend (the capability_profile):
on a Pi with a display it serves the surface to a local browser; headless-over-SSH it prints an
ssh -L line to open it from your own machine; a bare terminal degrades a surface to a serial view.
Status
The agentic loop is board-agnostic and built: detect → chat (SSE codegen) → flash/deploy → monitor,
plus a cross-platform provision. The Pi HAT's SWD flash (OpenOCD) and UART (/dev/serial0)
deploy/monitor path is wired and unit-tested (uf2→bin, config generation, dispatch) but not yet
validated on real hardware — exercise it on a connected Pi + RP2040. The one external dependency is
a MicroPython firmware that exposes the UART REPL.
The native host-linux runtime (the "whole Pi" brain: code using the host's own camera/files/GPIO)
is not wired here — it is approval-gated and waits on the trust model in
backend/knowledge/runtimes/host-linux/contract.md.
Project details
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 axiometa_cli-1.0.1.tar.gz.
File metadata
- Download URL: axiometa_cli-1.0.1.tar.gz
- Upload date:
- Size: 50.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75115c7872b031bdc4c71498f2852492d397c31f35bcf0553b00c0e0e8edf5b6
|
|
| MD5 |
7270aaf96f720537aa6446029aaf00ad
|
|
| BLAKE2b-256 |
3ab731c2aa2c3fba936fa45aa659007f5352d858982c6b6d2ddb860de8113cea
|
File details
Details for the file axiometa_cli-1.0.1-py3-none-any.whl.
File metadata
- Download URL: axiometa_cli-1.0.1-py3-none-any.whl
- Upload date:
- Size: 55.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e39256b0fb86dec7f8035b8c51ede1db88ab5ea15edf205a646b6edaea95abb7
|
|
| MD5 |
563c473dbed09defcffc5944ca337bcb
|
|
| BLAKE2b-256 |
51e0801dc7849d513f144d10380023afbdb34296661b37a044f183a8c55c2666
|