This package has been deprecated

Author message:

this package has been deprecated

@replit/clui
TypeScript icon, indicating that this package has built-in type declarations

0.0.7 • Public • Published

CLUI

Run on Repl.it

CLUI is a JavaScript library for building command-line interfaces with context-aware autocomplete.

Overview

inputState

The core functionality is an inputState object that reruns the and updater function and calls an onUpdate function with some data. It's a framework agnostic primitive that can be wrapped by more specific framework or application code (like a react hook).

more info

useInputState

A basic React hook to manage the lifecycle on an inputState. It's more of an example for refrnence. Depending on the use-case you might use your own hook. For example, if you have a loading indicatore and are loading commands asynchronously, you might want to debounce the loading state to reduce UI flicker.

For managing dropdown selection UX I highly recommend downshift.

more info

<Session />

Session is a React component that manages a list of child components. When buiding a command-line UX with autocomplete, inputState can be used to manage possible states as the user is typing and Session can be used to manage a list of React components as the user submits inputs (appending output, clearing previous outpu, showing next prompt, etc.).

more info

Readme

Keywords

none

Package Sidebar

Install

npm i @replit/clui

Weekly Downloads

1

Version

0.0.7

License

MIT

Unpacked Size

89.5 kB

Total Files

41

Last publish

Collaborators

  • sareini
  • krishatreplit
  • mikewesthad
  • motzyball
  • juan.replit
  • ahulbert-replit
  • james-addison-replit
  • replitdstewart
  • ryanweingast
  • harryatreplit
  • theflowingsky
  • jonesit-replit
  • szymon_k
  • cdmistman
  • jackyzha0
  • jamesaustinreplit
  • lopezhoracio
  • bradymaddenreplit
  • ryantm
  • alexisreplit
  • ink404
  • brianpool
  • tobyho
  • brenoafb
  • masad-frost
  • lincolnreplit
  • stkenned
  • replitmatt
  • cbrewster
  • ltazmin_replit
  • moudy
  • schestakov
  • lhchavez
  • slmjkdbtl
  • lunaroyster