shellx_core

build: status pub package style: analysis License: MIT

A Core tool for Command-line Shell with listening stdin

Extend from kafka-shell

import 'dart:async';

import 'package:melos/melos.dart';
import 'package:shellx_core/shellx_core.dart';
import 'package:universal_io/io.dart';

Future<void> main(List<String> args) async {
  final config = await MelosWorkspaceConfig.fromDirectory(Directory.current);
  Shell()
    ..fromMelos(config.scripts.keys)
    ..run();
}

// Map.fromIterables(scripts, scripts.map((e) => MelosCommand(e)));

extension MeolsShell on Shell {
  void fromMelos(Iterable<String> scripts) => scripts.forEach(addMelos);
  void addMelos(String element) => addCommand(element, MelosCommand(element));
}

Libraries

shell_prompt/shell_prompt
Fully featured shell prompt implementation.
shellx_core