Modern calculator app for Sero — a standard Pi extension with an optional web UI.
Install in Sero → Admin → Plugins with:
git:https://github.com/monobyte/sero-calculator-plugin.git
Sero clones the source repo, installs its dependencies locally, builds the UI, and then hot-loads the plugin into the sidebar.
Install as a Pi package:
pi install git:https://github.com/monobyte/sero-calculator-plugin.gitThe agent gains a calc tool (evaluate, history, clear) and a /calc
command.
When loaded in Sero, the web UI mounts in the main app area and watches the same state file. Changes from the agent or the UI are reflected instantly in both directions.
| Action | Description |
|---|---|
evaluate |
Evaluate a math expression (e.g. 2+2*3) |
history |
Show recent calculation history |
clear |
Reset the calculator state |
Supports standard arithmetic (+, -, *, /), parentheses, modulo (%),
and exponentiation (^).
| Command | Description |
|---|---|
/calc |
Show recent calculation history |
/calc <expr> |
Evaluate expression via the agent |
This is a global-scoped app — state is stored per-user, not per-workspace:
- Sero:
~/.sero-ui/apps/calc/state.json - Pi CLI:
<workspace>/.sero/apps/calc/state.json
{
"display": "42",
"expression": "6*7",
"history": [
{
"id": 1,
"expression": "6*7",
"result": "42",
"createdAt": "2025-01-01T00:00:00.000Z"
}
],
"nextId": 2
}npm install
npm run build # Build extension + UI
npm run typecheck # Type-check the UI
npm run dev # Vite dev server (HMR)