7 ms·
Show HN: Seashells – Pipe output from CLI apps to the web in real time
- anishathalye 9y agoHi 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/
- toomuchtodo 9y agoFantastic job!
- finnn 9y agoAny plans to open source the server?
- akerl_ 9y ago+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.
- swah 9y agoSuper useful to keep checking the compile status when going out dancing :)
- almostarockstar 9y agoThis 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).
- metilda 9y agoMaybe 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.
- ec109685 9y agoA slack style webhook token would be secure and clean looking.
- anishathalye 9y agoAn 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 9y agoThe 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.
- ConfucianNardin 9y agoYou 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).
- MrYellowP 9y agoi 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?
- mcjiggerlog 9y agoI'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.
- tyingq 9y agoLooks 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 9y agoOh, 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).
- m45t3r 9y agoYou 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 9y agoYeah, 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).
- skratlo 9y agoThis is great! Keep it up!
- bberenberg 9y agoSlightly 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 9y agoIn 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.
- diggan 9y agoSweet! 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
- _Marak_ 9y agoLooks 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 9y agoThis 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!
- chubot 9y agoI 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.
- pollyannas 9y agoI love any service that you can use without registering.
- dvfjsdhgfv 9y agoSuch a service is unlikely to last long. Each registered user means money.
- kakarot 9y agoYou must be fun at parties.
- dvfjsdhgfv 9y agoNo, 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 9y agoThanks 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 9y agoMy 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.
- pota 9y agoAny plans to release a self-hosted version?
- nyades 9y agoi really love it! stuff like this and ngrok are great ideas.
- AdamJacobMuller 9y agoI love the idea of ngrok, but, it's unfortunately too slow these days.
- laumars 9y ago> 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
- jedberg 9y agoI 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 9y agoI think gotty is similar: https://github.com/yudai/gotty https://github.com/yudai/gotty I'm not really sure what the differences are.
- LoSboccacc 9y agoA web ssh client + screen would do, there are around that you can self host
- anishathalye 9y agoYeah, 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!
- flukus 9y agoIsn'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?
- DaveWM 9y agoNice. 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/
- gvalkov 9y agoThis 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/
- evand 9y agoI've put together a snap of this. If you're on Ubuntu you can `sudo snap install seashells` then `echo hello | seashells`.
- mmanfrin 9y agoWhat a perfect name.
- altharaz 9y agoThat's a really cool idea! I'd love to see this feature on Slack or Mattermost, to create instant and easy Snippets.
- anishathalye 9y agoHow 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?
- HurrdurrHodor 9y agoFor 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.
- Walkman 9y agoI 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 9y agoWas wondering if someone was going to try to do chat with this... Or how about just a persistent blog from one updating file?
- alrpal 9y agoUsually Id run a process in screen and then ssh to check up on it. Does this have any advantages?
- andrew3726 9y agoWell, you don't have to be at a place with a SSH client for once. Its outputs to a webpage.
- mbonzo 9y agoHi 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
- mbonzo 9y agoHi, 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 ;)
- aliceyhg 9y agoThanks for making it!
- wingerlang 9y agoWhat clipboard tool is that?
- forkfork 9y agoI'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/
- srhyne 9y agoNice 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.
- petters 9y agoI love the fact that there are no dependencies. Just piping to netcat is really clever. Good job.
- benas 9y agoNice 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.
- vdm 9y agoReminds me of http://rtail.org/ http://rtail.org/
- kawsper 9y agoI 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.
- AdamJacobMuller 9y agoWatch 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!)
- helb 9y agoThis 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-shells/seashells https://github.com/helb/gentoo-overlay/tree/master/app-shell...
- simpx 9y agocool idea! The best part is it works even without a cli! can't wait to see a self hosted version :)
- ellen76 9y agoBermain 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
- deleted 9y ago[deleted]