Installation
Install AXIS via the AXIS CLI, Vite+Solid dev, static dist PWA, desktop shell, or Cloudflare® Worker backends.
This page
Installation
AXIS ships as the axis package (Solid + Vite), version 2.5.0. Primary path is the product UI under src/. Legacy static shell (main.js, root style.css) is not the product UI—prefer bun run dev or built dist/.
Abstract
Operator modes:
| Mode | Command surface | When |
|---|---|---|
| AXIS CLI (recommended ops) | bun run axis · make axis-* | Install / doctor / setup / deploy / health |
| Dev AXIS | bun run dev · axis dev | Day-to-day UI work |
| Desktop shell | bun run desktop:dev | Tauri 2 native window |
| Static PWA | dist/ + axis_pwa_server.py :8081 | Offline demo / VPS |
| AXIS at the edge | axis deploy worker (+ optional Pages) | Production data plane |
Backend is optional when Engine = Client-Side (Pyodide) and sources/streams are mock or CSV.
Prerequisites
- Bun ≥ 1.2 for package install, Vite, and the AXIS CLI
- Python 3.10+ if you use Flask Pro API (
make run) oraxis_pwa_server.py - Modern Chromium / Firefox / Safari (PWA install works best on Chromium)
- Optional: Cloudflare® auth (
CLOUDFLARE_API_TOKENorwrangler login) for Worker deploy - Optional desktop: Rust + platform webview libs — Desktop (Tauri)
CLI-first bootstrap (recommended)
# From the AXIS monorepo root
bun install
cd packages/cli && bun install && cd ../..
axis install # app + worker/ + CLI deps
axis doctor # toolchain + optional CF auth; wrangler.toml warns until `axis setup`
axis setup # ensure wrangler.toml + local D1 schema
# repo aliases (no global install): bun run axis:install / axis:doctor / axis:setup
# or: make axis-install && make axis-doctor && make axis-setup
| Command | Repo alias (no global install) |
|---|---|
axis | bun run axis |
axis install | bun run axis:install |
axis doctor | bun run axis:doctor |
axis setup | bun run axis:setup |
axis deploy worker | bun run axis:deploy |
axis health | bun run axis:health |
axis … | make axis ARGS="…" pass-through |
axis … | make axis-install · axis-doctor · axis-setup · axis-deploy · axis-health |
Full command surface: AXIS CLI.
Dev AXIS
# Terminal 1 — Pro API (server engine) from sister pyne repo
# Clone https://github.com/hoox-sh/pyne as ../pyne (local dir is sometimes still named pynescript)
make -C ../pyne run # Flask :5002
# Terminal 2 — AXIS
bun run dev # Vite :3000
# or: bun run axis dev
Open http://localhost:3000. Default symbol BTCUSDT, engine often server with endpoint http://localhost:5002 (or demo host https://axis.hoox.sh).
Desktop shell (optional)
bun run desktop:dev # Tauri window + Vite HMR
bun run desktop:build # native installers
See Desktop (Tauri).
Edge Worker (local)
bun run axis dev worker # wrangler :8787
# or: cd worker && bun run dev
In AXIS: open Workers Manager (topbar activity icon) or Settings → set Backend URL to http://127.0.0.1:8787. Production Worker is worker-axis at https://worker.axis.hoox.sh — see topologies.
Deploy checklist (prod)
axis setup --github-client-id Ov23li… --remote-d1
axis secret put ADMIN_TOKEN
axis secret put EXTERNAL_BACKEND
axis deploy
axis health --oauth
Production build (static)
axis install
bun run build # → dist/
python3 axis_pwa_server.py # serves dist/ on :8081
Confirm:
- App shell loads; chart requests history
- DevTools → Application → Manifest + Service Worker
- Icons 192/512 from
public/assets/
Pyodide assets and vendor wheels under public/pyodide/ and public/vendor/ must be present in dist/ for offline engine—bun run build copies them via Vite public/.
Offline-first lab (no Flask)
- Source → Mock Walk
- Stream → Mock Poll (or None)
- Engine → Client-Side (Pyodide)
- Storage → Local
Disable network in DevTools; Run still executes. First Pyodide boot downloads/loads self-hosted runtime from the origin—allow that once while online, then go offline.
CORS when using server engine
Browser origin → Pro API must allow your AXIS origin. Flask uses ALLOWED_ORIGINS. Localhost regex is typically included; for a VPS demo host, set an explicit origin list. Symptom of failure: POST /run blocked in Network tab (no Access-Control-Allow-Origin). Worker CORS: CORS and origins.
PWA install
- Manifest: void theme
#0a0b10, name AXIS - Service Worker: cache-first shell; network-first
/api/*; offline API returns structured failure so Pyodide path remains usable - Chrome/Edge: install icon in the omnibox; AXIS also shows a modest Install app chip in the topbar when the browser fires
beforeinstallprompt(right-click hides it for the session)
Verification checklist
| Check | Expect |
|---|---|
| Load | Bars on chart for default symbol |
| Topbar | Source / Stream / Engine pickers populated |
| Run (server) | Flask or Worker responds; plots overlay |
| Run (pyodide) | Offline OK after warm-up |
| Manager | Catalog lists built-ins |
| Workers Manager | Health cards for local/prod backends |
| Theme | Dark/light toggle persists |
axis doctor | Required toolchain green. Missing worker/wrangler.toml is a warning on a fresh clone until axis setup (copies wrangler.toml.example). |
Failure modes
| Symptom | Likely cause | Fix |
|---|---|---|
| Empty chart | Source network / CORS / wrong symbol | Load again; try mock-walk |
| Engine errors immediately | Endpoint down or wrong URL | Settings / Workers Manager → Probe |
| Pyodide “BadZipFile” / HTML | SPA fallback instead of wheels | Ensure public/vendor and pyodide in dist/ |
| SW stale UI | Aggressive cache | Unregister SW or hard reload |
API_KEYS_REQUIRED on scripts | D1 without KV | Bind API_KEYS or local ALLOW_OPEN_KEYS=1 — Auth |
Internals (repo paths)
| Path | Role |
|---|---|
src/index.tsx, src/app.tsx | Solid entry |
vite.config.ts | Build |
axis_pwa_server.py | Static host |
public/manifest.webmanifest, SW | PWA |
worker/ | Cloudflare® Worker data plane |
packages/cli/ | AXIS CLI (@hoox-sh/axis-cli) |
src-tauri/ | Desktop shell |