8000 GitHub - NyuB/ocli at 0.3.0
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

NyuB/ocli

Repository files navigation

OCaml CLI Mini-framework

Apps

Demos

  • demo_tty, a sample of all implemented ansi features and a quick way to visually check the behaviour of the framework on a given terminal. tty demo gif

  • demo_boiling, ongoing sandbox on ascii animation boiling demo gif

Newbase

  • rebase_edit, an interactive git rebase editor, and it's associated newbase script, intended as a drop-in replacement for git rebase -i rebase demo gif

To get rebase_edit and newbase, you can install them from source or get them from the github release:

$ wget https://github.com/NyuB/ocli/releases/latest/download/newbase
$ wget https://github.com/NyuB/ocli/releases/latest/download/rebase_edit
$ chmod +x newbase rebase_edit
$ # Supposing ~/bin is in your PATH, replace with the desired installation root
$ mv newbase ~/bin/ 
$ mv rebase_edit ~/bin/

Core libraries

  • tea, Elm-inspired application structure
  • tty
    • Wrappers around OCaml Stdlib termios functions
    • Wrappers around ANSI terminal control sequences

Development

Requirements

  • Linux
  • opam
  • terminal with termios support

Build

opam switch create .
dune build

Run the tty demo

make demo

NB: the demo includes indications to check if it is behaving correctly on your terminal

Test suites

Run the tests:

make test

Update acceptance tests with the current outputs:

make test-promote

Install newbase from source

rebase provides two binaries:

  • rebase_edit is the interactive rebase editor, meant to be called by git with the rebase file.
  • newbase is a bash wrapper around git rebase. Its main purpose is to point git to rebase_edit as rebase editor along few other convenience features.
make install-newbase

Installation root can be chosen with the INSTALL_ROOT variable (defaults to $HOME/bin). rebase_edit and newbase will be placed at ${INSTALL_ROOT}/rebase_edit and ${INSTALL_ROOT}/newbase

make install-newbase INSTALL_ROOT=/somewhere/in/your/path

About

Mini elm-inspired utilities for Ocaml CLI applications

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

0