Skip to content
pubscout

cli_dialog

0.5.0, released 6 years ago by braguinski.de

Create Inquirer.js-style CLI prompts and tests in Dart.

Repository archived
$ flutter pub add cli_dialog
Source repository

What it does

Allows developers to build interactive command-line interface prompts with support for basic questions, boolean questions, lists, messages, custom ordering, and navigation mode. It also provides testing infrastructure using mock IO services.

AI-written summary of version 0.5.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You are building a command-line tool in Dart and need interactive user prompts.
  • You need features like list selections, boolean prompts, and navigation modes in a terminal interface.

Skip it when

  • You are building a Flutter GUI application.
  • You require advanced multi-platform UI widget kits.

Strengths

  • Supports multiple question types including text, boolean, and lists.
  • Includes testing infrastructure via mockable I/O services.
  • Features a navigation mode allowing users to jump between questions.

Weaknesses

  • Limited to CLI environments.
  • Windows platform has minor caveats regarding colors and indicators.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
1

Not documented

import 'package:cli_dialog/cli_dialog.dart';

void main() {
  final dialog = CLI_Dialog(questions: [
    ['What is your name?', 'name']
  ]);
  final name = dialog.ask()['name'];
}

Alternatives

Packages that do the same job and could replace cli_dialog.

  • flutter_flavorizr

    A utility to easily create and configure application flavors in Flutter.

  • fraction

    Create, parse, and perform arithmetic operations with fractions and mixed fractions.

  • args

    Library for parsing raw command-line arguments into options and values using GNU and POSIX styles.

  • desktop_updater

    Sparkle-style auto-updater for Flutter desktop apps

Works with

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