Skip to content

Caribou leverages Notty to generate simple terminal user interfaces.

Notifications You must be signed in to change notification settings

charlesetc/caribou

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Caribou

Caribou is an OCaml library for generating terminal user interfaces using Notty.

screenshot

Caribou takes a module that satisfies the following signature

module type Caribou_app = sig
  type item [@@deriving show]

  val image_of_item : item -> selected:bool -> Notty.image

  val list : unit -> item list

  val bindings : (Key.t * Key.mods * Action.t) list
end

and generates a way for users to navigate and view these items.

Performance

The user-defined implementations for image_of_item and especially list should both be very performant. If there is caching that needs to be done, that is left up to the application. list, for example, is called on every key press on the index page.

Future work

At the moment, you can only list the items and view them. It would be nice if Caribou apps could also specify ways to interact with the individual items and providing accompanying keybindings. For instance, in the file example there is no way to delete, rename, or edit a given file.

About

Caribou leverages Notty to generate simple terminal user interfaces.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published