Skip to content

Latest commit

 

History

History
94 lines (68 loc) · 3.09 KB

File metadata and controls

94 lines (68 loc) · 3.09 KB

Command-line tool

Heylogs CLI runs on any desktop operating system and requires Java 8 or later.
It follows the Unix philosophy of "Do one thing and do it well" by performing a single function and being composable.

Composition example

  1. download a changelog (curl)
  2. summarize its content as json (heylogs)
  3. colorize the output (bat)
curl -s https://raw.githubusercontent.com/olivierlacan/keep-a-changelog/main/CHANGELOG.md \    # 1️⃣
  | heylogs scan - -f json \                                                                   # 2️⃣
  | bat -l json                                                                                # 3️⃣

Installation

The easiest way of installing the CLI is to use a package manager.
Each operating system has its own manager. See the list below for specific instructions.

Scoop (Windows)

scoop bucket add nbbrd https://github.com/nbbrd/scoop-nbbrd.git
scoop install heylogs

Homebrew (macOS and Linux)

brew install nbbrd/tap/heylogs

JBang (almost anywhere)

The CLI can be run by JBang almost anywhere using one of these options:

  • Specific version (Maven coordinates): com.github.nbbrd.heylogs:heylogs-cli:_VERSION_:bin
  • Latest version (JBang catalog): heylogs@nbbrd

On Windows, macOS, Linux:

jbang com.github.nbbrd.heylogs:heylogs-cli:_VERSION_:bin <command> [<args>]

On Docker:

docker run -v `pwd`:/ws --workdir=/ws jbangdev/jbang-action com.github.nbbrd.heylogs:heylogs-cli:_VERSION_:bin <command> [<args>]

On GitHub Actions:

- uses: jbangdev/jbang-action@v0.110.1
  with:
    script: com.github.nbbrd.heylogs:heylogs-cli:_VERSION_:bin
    scriptargs: "<command> [<args>]"

Note that the trust parameter is required if the catalog is used instead of the Maven coordinates:
trust: https://github.com/nbbrd/jbang-catalog

Maven command-line (almost anywhere)

mvn dependency:copy -Dartifact=com.github.nbbrd.heylogs:heylogs-cli:_VERSION_:jar:bin -DoutputDirectory=. -Dmdep.stripVersion -q
java -jar heylogs-cli-bin.jar <command> [<args>]

Zero installation

The CLI is a single executable jar, so it doesn't need to be installed to be used.
To use the CLI without installing it:

  1. Download the latest jar binary (heylogs-_VERSION_-bin.jar) at:
    https://github.com/nbbrd/heylogs/releases/latest
  2. Run this jar by calling:
    java -jar heylogs-cli-_VERSION_-bin.jar <command> [<args>]

Java system properties

The CLI is running on the Java runtime. It is possible to configure the runtime by setting Java system properties with the following syntax: heylogs <command> -D<property>=<value> [options]


← Back to README