# hypercmd

> A terminal renderer that lets you build reactive CLI applications with HTML templates and Rust logic.

hypercmd is an open-source terminal renderer from the fusor-rs organization for building interactive command-line apps. You write the interface in HTML files and keep state and logic in Rust. It is labeled v0.1 and experimental, and its APIs are expected to change.

## What It Is

hypercmd is a terminal renderer for fusor. fusor compiles HTML and Rust, and hypercmd lays the result out in terminal cells, handles keyboard input and keeps the screen in sync. Views are HTML templates with Rust expressions for text, attributes, conditions, lists, routes and events. State lives in Rust structs using signals, so when a signal changes, the bindings that read it re-run and the next frame shows the result.

## Workflow

The CLI is installed via an install script or `cargo install hypercmd-cli`. `hypercmd new my-app` scaffolds a counter app and checks that it builds, and `hypercmd run` runs it. Apps are ordinary Cargo packages: an HTML entry template, a `main.rs` that includes it with `template!`, a `build.rs` that compiles templates, and an optional terminal stylesheet. Rust 1.85 or newer is required to build apps.

## Rendering and Interaction

- Styling uses a bounded CSS profile: flexbox, `ch` and percentage sizes, padding, gaps, colors, emphasis and scrollable overflow.
- Unsupported markup or CSS fails at build time rather than rendering differently.
- Keyboard support includes focus order, Tab and arrow navigation, multiline editing, bracketed paste and mouse scrolling.
- The terminal is restored on exit, on panic and around Ctrl+Z.
- The same component can be compiled for the terminal and for fusor's browser renderer.

## Current Status

The README describes hypercmd as experimental, with minor releases before 1.0 possibly changing the HTML profile and Rust APIs. macOS and Linux are supported; native Windows execution is unavailable. Margins, positioning, grids, merged table cells, media and SVG are not supported yet. Examples include a file browser, a job inspector and shared job controls used by both a terminal and a browser app.

## Features
- HTML templates with Rust expressions for UI
- Signal-based fine-grained updates
- Flexbox-based terminal CSS profile
- Keyboard-first focus and navigation
- Multiline grapheme-aware text editing and bracketed paste
- Routing and async views
- Owner-scoped tasks, timers and background workers
- Build-time errors for unsupported markup or CSS
- Shared components for terminal and browser renderers
- CLI for creating, running, building and upgrading apps

## Integrations
fusor, Ratatui, Cargo

## Platforms
WINDOWS, MACOS, LINUX, API, DEVELOPER_SDK, CLI

## Pricing
Open Source

## Version
v0.1.2

## Links
- Website: https://cmd.fusor.build
- Documentation: https://cmd.fusor.build/docs/
- Repository: https://github.com/fusor-rs/hypercmd
- EveryDev.ai: https://www.everydev.ai/tools/hypercmd
