Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Seashells – Pipe output from CLI apps to the web in real time (seashells.io)
356 points by anishathalye on July 10, 2017 | hide | past | favorite | 70 comments



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/


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).


Maybe use Flask and do cert based auth? A username and password is pretty clunky, and a bit of a pain IMO for sub-10 user projects.


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.


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.


You should never provide passwords on the command line, since command lines can be shown/stored in any number of places (examples: shell history, process listings).


A slack style webhook token would be secure and clean looking.


Super useful to keep checking the compile status when going out dancing :)


Any plans to open source the server?


+1 to this. I'm not sure I'd want to use this externally, but it would be rad to use this for some internal services on my home network.


i don't see how this does anything i can't just do using initD, which routes the pipes to sockets automatically.

What's the actual benefit of using this, compared to just using init and taking care of that little html myself?


I've been linux for about 10 years and I would have no idea to do what you just said. The benefit is obviously that it is extremely straightforward to use.


Fantastic job!


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. Includes both client and server.


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!


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!


I think gotty is similar: https://github.com/yudai/gotty

I'm not really sure what the differences are.


Yeah, I totally understand you. I'm currently only using this for non-sensitive stuff (e.g. neural network training logs).

I'm going to implement client-side encryption in the next version!


Isn't that the value proposition here? If you have your own server you can pipe directly to a file and serve that can't you?


A web ssh client + screen would do, there are around that you can self host


> 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


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


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?


Ahhh yes. That would be a 'slight' problem. Thank you for the correction.


A widely preinstalled cli TLS netcat workalike also exists: openssl s_client


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


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

https://youtu.be/EAKrLprUcK4

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


What clipboard tool is that?


Thanks for making it!


I love any service that you can use without registering.


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


You must be fun at parties.


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.


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.


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.


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/


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!


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


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

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

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.


You could do something similar with 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.


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).


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

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

Both written in golang and open source.


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


Nice job, Amish! I made a similar project.

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.


What a perfect name.


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...


Any plans to release a self-hosted version?


That's a really cool idea!

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


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

alias paste='curl -s -F '\''sprunge=<-'\'' 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.


How exactly would you imagine this being integrated with Slack? Would you want to share stuff from your terminal into Slack? Or you want to share content from Slack?


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/


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


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.


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


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?


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).


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


"This video has been removed by the user."


At https://youtu.be/EAKrLprUcK4 according to later comment above.


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


Watch my raid rebuild: https://seashells.io/v/e5KtSGPW

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

(Neat service though!)


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.


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


Reminds me of http://rtail.org/


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


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


This is great! Keep it up!


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


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


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

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




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: