Liking cljdoc? Tell your friends :D

Styling cli-tools

Beauty is in the eye of the beholder; cli-tools makes a default set of choices for what kind of colors and fonts to use for its output, but this can be overridden.

Styles are defined by two vars in namespace net.lewisship.cli-tools.styles; each is a map from a usage name (such as :tool-name-label) to a font definition.

  • default-styles are the defaults for all usages
  • *style-overrides* contains overrides for default-styles (and is dynamic)

By overriding or rebinding this var, the fonts can be overridden.

The most common usages to override are:

  • :tool-name (default :bold.green) used when writing the name of the tool itself
  • :command-path (default :bold.green) used when writing the command path

Example:

    (binding [style/*style-overrides* {:tool-name :inverse.bold}]
      (cli-tools/dispatch { ... }))

Can you improve this documentation?Edit on GitHub

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close