Skip to content

如何实现命令行交互?

命令行交互核心实现

核心目标:实现命令行交互,如 List

  • 键盘输入监听(readline)
  • 命令行窗口尺寸运算
  • 清屏
  • 光标移动
  • 输出流静默
  • 输入输出流(stream)
  • 事件库(events)
  • ansi escaped code

readline 库详解

  • readline 用法解析
  • readline 源码解析
  • 手写 readline

inquirer 库详解

Released under the MIT License.