About this project

schemaui is a Rust library and CLI that transforms JSON Schema documents (draft-07 compatible) into fully interactive editors. It offers two rendering surfaces: a Web UI (embedded SPA with three-pane layout — schema navigation, form editor, live JSON preview) and a keyboard-first TUI powered by ratatui and crossterm. Both share the same schema → form → validate pipeline, providing immediate validation feedback after every edit. Key capabilities: - Parses rich schemas including $ref, definitions, patternProperties, enums, numeric ranges, nested objects/arrays, oneOf/anyOf variants - Sections and overlays: top-level properties become tabs, nested objects flatten into sections, complex nodes open dedicated overlay editors - Pluggable I/O: ingests JSON/YAML/TOML, emits to stdout and/or multiple files in any enabled format - Config schema auto-detection via embedded $schema, TOML #:schema, YAML language-server modelines - Remote schema loading (CLI only, feature-gated) - AI agent integration via companion skill a2ui-ask: agents spawn the Web UI bound to 0.0.0.0, users fill browser forms with live validation, answers written to .schemaui/answers/ as JSON audit trail - Library API for embedding: schemaui::web::session for Web, SchemaUI::run for TUI, custom frontend injection via TuiFrontend - CLI (schemaui-cli) with web and tui subcommands, multi-destination output, stdin/inline specs Architecture: io::input parses/merges config, schema loader/resolver builds form schema, tui::state manages FormState/sections/reducers, app::runtime handles input routing/overlays/status, tui::view renders via ratatui. Validation uses jsonschema::Validator compiled once at startup; each edit rebuilds document, runs validator, feeds errors to field/global status. Feature flags split by audience: schemaui-cli defaults to TUI + Web + remote schema; library crate defaults to tui + json only. Requires at least one of json, yaml, toml features enabled.