Skip to content
pubscout

nocterm

0.9.0, released 3 months ago by norbert515.com

Framework for building terminal user interfaces with Flutter‑like components and hot reload.

$ flutter pub add nocterm
Source repository

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.

  • dart_tui

    Elm-style terminal UI framework for Dart with Model–Update–View architecture.

  • naked_ui

    Behavior-first headless UI components for Flutter that separate state from presentation.

  • new_loading_indicator

    Provides a collection of loading animations and indicators for Flutter applications.

Works with

Packages commonly used together with nocterm: ones it builds on, ones built on it, and its own family.