API
Find a symbol
- Generated Noir reference on pub.dev
— every published class, member, and signature. Match it to the version in
your
pubspec.lock; this repository can be ahead of the latest published version. noir_signalshooks contract — hook order, replacement keys, effect timing, and cleanup rules.noir_signalsSignals contract — ownership, observation, and disposal for signals and computed values.- Widget catalog — start here when you know the job but not the type name.
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.dartApplications and ordinary widgets. Includes
TuiApp, the widget framework, layout, focus, input, painting values, and standard controls. Supported high-level surfacepackage:noir_signals/noir_signals.dartSignalWidget, 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.dartAdvanced 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.dartGuarded 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
| Command | Purpose | What it does not prove |
|---|---|---|
dart run noir:run <entrypoint> [arguments] | Run an app with source watching and hot reload | Real-terminal behavior still depends on the current terminal |
dart run noir:health_check | Verify native-asset resolution and a headless render lifecycle | It 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()orinitState(). It callsreassembleon 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.