#cli #terminal #color #spinner #input

bin+lib conciliator

[WIP] Library for interactive CLI programs

10 releases

0.3.7 Jul 29, 2023
0.3.6 Apr 18, 2023
0.3.5 Oct 26, 2022
0.3.4 Aug 15, 2022
0.1.0 Jun 14, 2022

#308 in Command-line interface

43 downloads per month
Used in cnsprcy



WIP library for writing interactive CLI programs.

Currently very unstable with a somewhat unusual API. Subject to major changes as I use it and implement missing functionality. Intended to implement the things that the Python click library provides which are missing from clap. Using that basis, provide useful abstractions for interacting with the CLI.


Out of scope:

  • Non-UNIX platforms
  • Config file handling
  • Argument parsing (intended to be used alongside clap)
  • Progress bars (for now)
  • curses-style text user interface (TUI) painting to the terminal as a canvas

Initially, this library was written as an extension of termcolor, but now the functionality that was required has been absorbed / copied / rewritten. As such, some of the ideas and design are taken from there and credit is due.

Capture output during cargo test

As explained in core::Stream, there is an issue with cargo test only capturing output that uses the print!, println!, eprint!, and eprintln! macros (see rust#12309 and rust#90785).
As a workaround, this crate provides the test_capture feature flag which makes all output go through those macros. This is worse (see core::Stream on how), but it also makes cargo test properly capture the output.

Luckily, there is a way to have this feature only enabled when it is needed: simply add this crate as a development dependency as well, with the test_capture feature enabled only on that entry and not on the regular dependency, like so:

conciliator = ""

version = ""
features = ["test_capture"]

This way, the test_capture feature will only be enabled for compiling "tests, examples, and benchmarks" (see cargo reference) and not for building binaries.


~120K SLoC