Skip to content

hosh-shell/hosh

Repository files navigation

Hosh

License CI Quality Gate Status CoverageCII Best Practices

Human Oriented SHell, written in Java.

Website: https://hosh-shell.github.io

Try it with Docker

$ docker run -it --rm ghcr.io/hosh-shell/hosh:0.1.4

Development

Requirements

JDK 17+ (tested with JDK 17 and JDK 21).

Build

Full build with all fitness and acceptance tests: $ ./mvnw clean verify

Quick build (2x faster on my machine): $ ./mvnw -Pskip-slow-tests clean verify

Run

$ java -jar main/target/hosh.jar

Debug

$ java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=1044 -jar main/target/hosh.jar

Logging

Hosh uses java.util.logging (to not require additional dependencies). HOSH_LOG_LEVEL controls logging behaviour according to Level. By default, logging is disabled, to enable it:

$ HOSH_LOG_LEVEL=FINE java -jar main/target/hosh.jar

Logging events will be persisted in $HOME/.hosh.log.

Docker support

Build a release with docker:

  • $ cat ~/.github/secret_token | docker login https://ghcr.io -u $USERNAME --password-stdin
  • $ ./mvnw clean verify # uberjar ready at main/target/
  • $ docker build -t ghcr.io/hosh-shell/hosh:$VERSION .
  • $ docker push ghcr.io/hosh-shell/hosh:$VERSION

Sonar

./mvnw clean verify sonar:sonar -Psonar -Dsonar.token=MYTOKEN

Mutation testing

./mvnw test-compile org.pitest:pitest-maven:mutationCoverage

Sponsors

JetBrains YourKit SonarCloud