
Show HN: Seashells – Pipe output from CLI apps to the web in real time - anishathalye
https://seashells.io/
======
anishathalye
Hi HN!

I made a service to enable me to easily monitor long-running experiments (e.g.
training neural nets). I thought it would be generally useful, so I'm opening
it up to the public. I'm curious to hear what you all think!

Read a little bit more about the motivation here, if you're interested:
[http://www.anishathalye.com/2017/07/10/seashells/](http://www.anishathalye.com/2017/07/10/seashells/)

~~~
almostarockstar
This is a great idea. My two cents:

1\. An accounts system would be great so that I could just run ``python
experiment.py | seashells u=almostarockstar p=hunter2`` or similar with keys,
and then have a bookmark on my phone to view seashells.io/u/almostarockstar.

2\. A self hosted / open source option would be awesome.

3\. A way to view other peoples public seashells urls would make this
interesting.

4\. Possible options to allow html output which could be paired with a css
file attached to your account.

Can't wait to set this up with my own experiments (evolutionary computation).

~~~
anishathalye
An accounts system is coming in the next version. The public seashells URLs /
HTML/CSS output ideas sounds neat, I'll add them to the potential features
list!

I'm not sure if the code is going to be open-sourced, but I'm adding TLS and
also client-side encryption in the next version.

~~~
philo23
The HTML idea is neat, but something to bear in mind unless you host this
content on a separate domain/subdomain (think githubusercontent.com vs
github.com) any Javascript embedded in that HTML will be able to read/write
cookies, make XMLHttpRequests, etc against the seashells.io domain. Which
could in turn cause some fairly serious security issues with any accounts
system you plan on adding.

But seeing as view urls are quite shortlived by the sound of it, you shouldn't
have too much of a problem moving their location from seashells.io/v/{url} to
something like v.seashells.io/{url} if you do end up introducing some kind of
HTML mode.

------
_Marak_
Looks similar to the "bpipe" project I was experimenting with three years ago,
except it appears seashells is only a one-way pipe ( can't pipe data back from
browser into Unix pipe ).

The project I made has two two-way bindings from Unix pipes directly to DOM
elements and supports DOM events.

Like:

    
    
      bpipe -s "#myInput" -e "keyup" | less
    
      echo "hello there" | bpipe -s "#myDiv"
    

If anyone is looking for inspiration on this sort of thing check out:
[https://github.com/Marak/bpipe](https://github.com/Marak/bpipe). Includes
both client and server.

------
flaviuspopan
This is one of those perfect "I had a problem, made a solution, and others
think it's neat" posts that make HN impossible to miss. Well done!

------
jedberg
I love the idea but I'm very wary of piping shell output directly to a third
party. Command line tools are notorious for outputting sensitive data to
stdout.

Any chance we can get a self hosted version? It would be awesome if I could
host it internally!

~~~
rmetzler
I think gotty is similar:
[https://github.com/yudai/gotty](https://github.com/yudai/gotty)

I'm not really sure what the differences are.

------
laumars
> _While you can use netcat for convenience (because it comes preinstalled on
> most systems)..._

I love netcat but for those without you can do this from within Bash:

    
    
        echo "example" > /dev/tcp/seashells.io/1337

~~~
rmetzler
While this is neat, it doesn't work for this usecase, because it doesn't print
the reply with the seashell.io url.

~~~
t3f
I cant test right now, but couldn't you do it with a prefab fd?

    
    
      exec 3<>/dev/tcp/seashells.io/1337
      cat <&3
      echo "example" >3
    
    

Or something like that?

------
mbonzo
Hi, I made a quick video if you want to see how seashells work:

[https://youtu.be/EAKrLprUcK4](https://youtu.be/EAKrLprUcK4)

I think that a cooler name for this is SEEshells ;)

~~~
wingerlang
What clipboard tool is that?

------
pollyannas
I love any service that you can use without registering.

~~~
dvfjsdhgfv
Such a service is unlikely to last long. Each registered user means money.

~~~
kakarot
You must be fun at parties.

~~~
dvfjsdhgfv
No, I'm realistic. Very often my meetings with VCs start with "How many users
can you get?". They don't care about the product per se, they care about
registered users, because the more users, the easier it is to sell the product
at a good price. Yes, I prefer services without registration, too. No, these
usually don't last long. That's reality.

~~~
kakarot
Thanks for the VC 101 lecture, but OP might not be looking for VC money and
it's hardly an expensive service to run with the current limit of 5 users per
IP.

If you actually look through the site, OP mentions plans to add an accounts
system soon for power users.

We don't know what kind of plans OP has for seashells. With a healthy base of
power users, and no board of VC investors trying to milk it for all it's
worth, a concurrent service that doesn't need registration is entirely
plausible. That's reality.

~~~
dvfjsdhgfv
My comment didn't refer to seashells in particular, but no-registration
services the parent mentioned. Once the service becomes really popular, it
usually either breaks or the owner realizes they need to do something to at
least cover the costs of running. true, this could never happen to seashells
as the service is quite specialized.

------
gvalkov
This is pretty neat. I wrote something similar at one point: see wtee [1] and
tailon [2]. They're both small, self-hosted tornado + sockjs + vanilla
typescript webapps.

    
    
      [1]: https://wtee.readthedocs.io/en/latest/
      [2]: https://tailon.readthedocs.io/en/latest/

------
Walkman
I tried it with SSH chat:

    
    
        ssh chat.shazow.net | nc seashells.io 1337
        serving at https://seashells.io/v/FYh2Dt7t
    

It is really real time! much wow!

~~~
relaxitup
Was wondering if someone was going to try to do chat with this... Or how about
just a persistent blog from one updating file?

------
diggan
Sweet! Very cool tool and can directly think of a few nice use cases for it.

Something to demo the "real-time" aspects is to use it together with IPFS's
P2P pubsub functionality.

    
    
       ipfs daemon --enable-pubsub-experiment
       # Daemon now running with pubsub
       ipfs pubsub sub mytopic | nc seashells.io 1337
       # And now, everything you publish to "mytopic" appears on the seashell website
       ipfs pubsub pub mytopic "Hello World"
       # See content on website

------
chubot
I wrote something like this a few years ago, except you could write shell
scripts to transform the output to HTML. For example, if you have a CSV file,
you could write a plugin to turn it into an HTML table.

[http://www.oilshell.org/webpipe/doc/webpipe.html](http://www.oilshell.org/webpipe/doc/webpipe.html)

(If you click through the image there is a screencast)

[https://github.com/andychu/webpipe](https://github.com/andychu/webpipe)

This was mildly successful, although I didn't feel the UI was that great. It
can be a little awkward to have the GUI in a separate window than the CLI.

Really I wanted some kind of tiling window manager, but I tried a few and they
were surprisingly uncomfortable for a heavy CLI user like myself.

I still think there is some way to unify the CLI and GUI that hasn't been
invented.

------
m45t3r
You could do something similar with
[https://papertrailapp.com/](https://papertrailapp.com/) or something else
that support plain text forwarding. The advantage is that it would also
support encryption, that this one does not seem to support.

The advantage that I can see of this service is that it does not require any
setup.

Disclaimer: I don't work for Papertrail or anything, we just use it on work to
store our logs.

~~~
anishathalye
Yeah, there are other similar services (many of which do a lot _more_ than
Seashells).

The idea with Seashells was to have a zero-overhead service that was available
to the public without signup (kind of in the spirit of a URL shortener: anyone
can make a short URL with no hassle).

Password-based client-side encryption is coming in the next version (so you
won't need to trust the server operator anymore).

------
benas
Nice job! We all like free services without registration :-)

This is similar to
[https://github.com/benas/gossed](https://github.com/benas/gossed) (uni-
directional) and [http://websocketd.com/](http://websocketd.com/) (bi-
directional) tools.

Both written in golang and open source.

------
DaveWM
Nice. I wrote something similar to this a while ago, except aimed primarily at
mobile users. [https://davewm.github.io/phonsole-
client/](https://davewm.github.io/phonsole-client/)

------
srhyne
Nice job, Amish! I made a similar project.

[https://tailtub.com](https://tailtub.com)

What I really want is do is to allow users to leverage PubNub's Blocks system
to create serverless awk'like aggregators in JS.

------
mmanfrin
What a perfect name.

------
helb
This is great, thank you! It even supports colors (and other escape codes i
guess) and makes clickable links from URLs.

Gentoo ebuilds if anyone is interested: [https://github.com/helb/gentoo-
overlay/tree/master/app-shell...](https://github.com/helb/gentoo-
overlay/tree/master/app-shells/seashells)

------
pota
Any plans to release a self-hosted version?

------
altharaz
That's a really cool idea!

I'd love to see this feature on Slack or Mattermost, to create instant and
easy Snippets.

~~~
HurrdurrHodor
For sharing code snippets you can just do something like this:

alias paste='curl -s -F '\''sprunge=<-'\''
[http://sprunge.us](http://sprunge.us) | tee >(xclip -selection clipboard)'

Which on my system will create a paste of whatever you pipe to it and put the
link to it in your clipboard.

------
forkfork
I'm a huge fan of these simple projects that are not attempting to create a
company, but instead sharing a useful tool.

A similar one I put together last year for my own uses:
[http://textdash.xyz/](http://textdash.xyz/)

------
bberenberg
Slightly different from
[https://github.com/mthenw/frontail](https://github.com/mthenw/frontail) but
similar type of thinking. Will be interesting to see how you can evolve
security and management.

~~~
anishathalye
In a sense, it's a no-signup-required hosted version of frontail where the
client and server are separated and you don't need a server with a public IP
to use it.

------
petters
I love the fact that there are no dependencies. Just piping to netcat is
really clever. Good job.

------
tyingq
Looks interesting, but there seems to be a built in conflict where you say
it's meant for "long running", but then also reap these after 24 hours.

Can you clarify how they are reaped? Is it a straight timer, or only after X
hours of no reads + no writes?

~~~
anishathalye
Oh, I should update the text to clarify: sessions are garbage collected _24
hours after the program has terminated_ (so after there's no possibility of
the program producing more output).

There will probably be more options for persistence once there's an accounts
system (to prevent abuse).

------
mbonzo
Hi guys, I made a video about the cool ways of implementing Seashells. If
you're interested:
[https://www.youtube.com/watch?v=QokyXiltoCk](https://www.youtube.com/watch?v=QokyXiltoCk)

~~~
topher200
"This video has been removed by the user."

~~~
emmelaich
At [https://youtu.be/EAKrLprUcK4](https://youtu.be/EAKrLprUcK4) according to
later comment above.

------
ellen76
Bermain semakin seru di game Laga SM558 Penasaran ? silhkan Daftar
[http://www.daftarsm558indo.com](http://www.daftarsm558indo.com) laga Sabung
Ayam dan Adu Banteng Terpopuler Saat ini

------
AdamJacobMuller
Watch my raid rebuild:
[https://seashells.io/v/e5KtSGPW](https://seashells.io/v/e5KtSGPW)

It's like watching paint dry, only more boring.

(Neat service though!)

------
kawsper
I know that Buildkite does something like to view the progress of our builds,
but I have always been curious how one might implement it nicely.

I like this approach with a simple pipe.

------
evand
I've put together a snap of this. If you're on Ubuntu you can `sudo snap
install seashells` then `echo hello | seashells`.

------
vdm
Reminds me of [http://rtail.org/](http://rtail.org/)

------
alrpal
Usually Id run a process in screen and then ssh to check up on it. Does this
have any advantages?

~~~
andrew3726
Well, you don't have to be at a place with a SSH client for once. Its outputs
to a webpage.

------
skratlo
This is great! Keep it up!

------
nyades
i really love it! stuff like this and ngrok are great ideas.

~~~
AdamJacobMuller
I love the idea of ngrok, but, it's unfortunately too slow these days.

------
simpx
cool idea! The best part is it works even without a cli!

can't wait to see a self hosted version :)

