danReynolds/fleury

★ 3Forks 1DartGitHub ↗Compare

Project website ↗

README

Fleury

Fleury

A retained-mode UI framework for the terminal — and the browser.
One widget tree, two surfaces.

Documentation · Get started · Widgets · Showcases


Fleury brings a Flutter-shaped authoring model to cell-based interfaces: compose widgets, keep state with StatefulWidget, rebuild with setState, and let the framework update layout, paint cells, and present the changed output.

The same reusable widget tree can run in a native terminal or mount into a web page. Alongside the visual tree, Fleury builds a semantic graph that tests and AI agents can inspect and operate by meaning instead of terminal coordinates.

Why Fleury

  • A familiar retained UI model. Widgets, state, context, keys, constraints, focus, navigation, animation, and inherited dependencies compose the way application developers expect.
  • State at three levels. setState for local fields, Scope for data shared through the tree, and Notifier for models used by widgets and services. Read shared state through builder widgets or directly from BuildContext.
  • Terminal-native rendering. Fleury paints grapheme-aware cells and sends diffed ANSI output instead of treating the terminal like a pixel canvas.
  • Full-screen apps and inline commands. Build a complete terminal app or put a compact form below the shell prompt. Try the inline setup showcase.
  • Terminal and browser targets. Share application UI while choosing a native terminal host, a client-side web mount, or a served browser session.
  • A real widget library. Forms, tables, trees, charts, document views, and agent-oriented surfaces are bundled in fleury.
  • Semantics from the start. The same semantic model supports testing, browser accessibility, inspection, and agent actions.

A Fleury app

After installing the CLI:

fleury create my_app --dependency-source=git
cd my_app

The generated project includes a runnable counter, a widget test, and the minimal VS Code configuration needed for F5 to launch into an interactive terminal. The Git-source flag is only needed during the pre-release window; under the scaffold, the application remains ordinary Dart:

import 'package:fleury/fleury.dart';

void main() => runApp(
  const FleuryApp(
    title: 'My app',
    home: Center(child: Text('Hello, cells!')),
  ),
);

The getting-started guide covers installation, state, higher-level widgets, and running the same tree in a browser.

Terminal support

The launch target is a modern UTF-8, xterm-compatible terminal on POSIX. Fleury negotiates optional protocols such as Kitty keyboard and synchronized output, and retains legacy keyboard, ordinary ANSI-frame, glyph-image, and plain-link fallbacks when they are unavailable.

The Windows driver is available as a preview, but real-Windows acceptance is still pending and Windows is not part of the launch support claim. Native Sixel rendering is also experimental until cell-pixel geometry is negotiated; Kitty and iTerm2 images remain progressive enhancements, with cell art as the portable image path.

Go deeper

Working on Fleury

From a checkout, bootstrap the workspace and run the normal validation gate:

dart tool/fleury_dev.dart bootstrap
dart tool/fleury_dev.dart check --quick

Contributor notes and architecture records live under docs/; the public documentation is built from website/.

Contributors

danReynolds

Issues