Skip to content

erik/hermit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hermit

Piping command line output to the web.

No client needed! Pipe directly to netcat.

$ echo hello, world | nc hermit.server.tld 1337
Your pipe is available at http://hermit.server.tld/v/RNWG8Eua

For ncurses apps, we can use tee with process substitution. Add a sleep command to get a chance to see the view URL.

$ (sleep 5; emacs -nw README.md) | tee >(nc hermit.server.tld 1337)
Your pipe is available at http://hermit.server.tld/v/XASdwked

Can also use the seashells.io client.

$ htop | seashells -i hermit.server.tld -p 1337 -d 5

Docker setup

$ docker build -t hermit .
$ docker run -t -p 1337:1337 -p 8090:8090 hermit

To set config values, specify environment variables with -e:

$ docker run -t -e HERMIT_HOST=example.com    \
                -e HERMIT_SHOW_LISTING=true   \
                hermit

To mount the log directory outside of the docker (for inspection, log rotation, backup, ...)

$ docker run -t -v /path/to/local/dir:/hermit/logs hermit

Native setup

First, install elixir and erlang.

# if you've never used mix / elixir before:
$ mix do local.hex, local.rebar

# by default, hermit will place log files here
$ mkdir /tmp/hermit

$ mix deps.get
$ MIX_ENV=prod mix compile
$ MIX_ENV=prod mix run --no-halt

Configuration

Hermit is configured through environment variables, which are described in lib/hermit/Config.ex.

Set them appropriately and rerun MIX_ENV=prod mix run --no-halt.

Why

hermit is a from scratch implementation of seashells.io, designed to be self hosted, because the idea of seashells.io is super cool, but the server isn't open source.

Also I wanted to play with elixir.

About

Pipe output from your shell to the web.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published