nocterm
0.9.0, released 3 months ago by norbert515.com
Framework for building terminal user interfaces with Flutter‑like components and hot reload.
What it does
Nocterm lets you create rich TUI applications using familiar Flutter patterns such as StatefulComponent, setState, and layout widgets like Column and Row. It includes testing utilities that mimic Flutter widget tests for terminal output.
AI-written summary of version 0.9.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a terminal UI with a Flutter‑style API
- You want hot‑reload and component‑based development for CLI tools
Skip it when
- You are targeting graphical mobile/web/desktop UI
- You need a pure Dart solution without native ffi dependencies
Strengths
- Flutter‑like API reduces learning curve
- Built‑in hot reload for rapid iteration
- Testing support similar to Flutter widgets
Weaknesses
- Works only in terminal environments
- Relies on ffi, requiring native setup
- Small ecosystem compared to mainstream UI frameworks
Setup
- Kind
- FFI (native library)
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 14
Requires Dart VM with --enable-vm-service for hot reload; ffi may need platform‑specific libraries installed.
import 'package:nocterm/nocterm.dart';
void main() {
runApp(const Counter());
}
class Counter extends StatefulComponent {
const Counter({super.key});
@override
State<Counter> createState() => _CounterState();
}
class _CounterState extends State<Counter> {
int _count = 0;
@override
Component build(BuildContext context) {
return Focusable(
focused: true,
onKeyEvent: (event) {
if (event.logicalKey == LogicalKey.space) {
setState(() => _count++);
return true;
}
return false;
},
child: Center(child: Text('Count: $_count')),
);
}
}Alternatives
Packages that do the same job and could replace nocterm.
- over_react
A library for building statically-typed React UI components using Dart.
79Compare - dart_tui
Elm-style terminal UI framework for Dart with Model–Update–View architecture.
75Compare - naked_ui
Behavior-first headless UI components for Flutter that separate state from presentation.
77Compare - new_loading_indicator
Provides a collection of loading animations and indicators for Flutter applications.
74Compare
Works with
Packages commonly used together with nocterm: ones it builds on, ones built on it, and its own family.
- cryptonocterm depends on itProvides SHA, MD5, and HMAC hashing functions for Dart.
- ffinocterm depends on itUtilities for working with Foreign Function Interface (FFI) code in Dart.
- matchernocterm depends on itSupport for specifying test expectations via an extensible Matcher class.
- convertnocterm depends on itEncoders and decoders for converting between different data representations.
- charactersnocterm depends on itUnicode and grapheme cluster aware string manipulation operations for Dart.
- imagenocterm depends on itPure Dart library to load, manipulate, encode, and decode various image formats.
- equatablenocterm depends on itProvides value‑based equality for Dart objects without manual == and hashCode.
- quivernocterm depends on itA set of utility libraries for Dart containing collections, async tools, and testing helpers.