Skip to Content
API

API

Find a symbol

The companion’s generated symbol reference is on pub.dev . Its two Markdown documents above remain the canonical contract.

Choose a package surface

Most applications need only package:noir/noir.dart. Import a lower-level library only when your code accepts the matching framework or native responsibility.

package:noir/noir.dart

Applications and ordinary widgets. Includes TuiApp, the widget framework, layout, focus, input, painting values, and standard controls. Supported high-level surface

package:noir_signals/noir_signals.dart

SignalWidget, reusable lifecycle hooks, and Signals reactive state.

A separate optional package for local state, controllers, cleanup, and reactive values. Noir never depends on it. Published companion prerelease

package:noir/noir_low_level.dart

Advanced hosting and custom RenderObjects. Exposes supported renderer, buffer, binding, and render-object protocols for code that accepts their ownership responsibilities. Supported advanced surface

package:noir/noir_ffi.dart

Guarded raw bindings. Tracks the OpenTUI C ABI and can change when that ABI changes. Application code should prefer a higher layer. ABI-unstable surface

For the ownership boundaries behind these surfaces, read Architecture.

Commands shipped with Noir

CommandPurposeWhat it does not prove
dart run noir:run <entrypoint> [arguments]Run an app with source watching and hot reloadReal-terminal behavior still depends on the current terminal
dart run noir:health_checkVerify native-asset resolution and a headless render lifecycleIt does not enter raw mode or validate terminal protocols

The development runner

dart run noir:run <entrypoint> starts the app and watches Dart files under lib/ and beside the entry point. On a change it asks the Dart VM to swap the sources, then tells Noir to rebuild, lay out, and paint the retained tree.

  • Arguments after the entry-point path go to the application unchanged. See Parse command-line arguments.
  • A source that does not compile leaves the last good app running.
  • Edits are compiled incrementally. An edit whose file timestamp is not newer than the last successful reload, for example a file restored with its original timestamp, is recompiled in full and takes longer. The runner log names the path taken.
  • The watcher compares file timestamps and sizes. An edit preserving both is invisible to it; save the file with an updated timestamp to trigger reload.
  • Reload does not rerun main() or initState(). It calls reassemble on retained state.
  • Adding, removing, or reordering hooks needs a full restart, and so do live stack signature changes, enum-to-class changes, and native library changes.
  • Runner diagnostics go to .dart_tool/noir/run.log, outside the alternate-screen UI.

Noir Driver is repository-only and is not a public widget-test harness. See Test an app.

Evaluate repository source

Dependency setup now lives on one page: Installation. It covers the published package, the checkout path for noir_signals, and the checkout path for an unreleased Noir API on its own.

Last updated on