27 ms·
Show HN: My personal website is a shell
- c43verge 6y agoI have two suggestions: 1) Add support for tab key so users don't have to type the entire file names 2) On initiation display the available commands or a brief intro text automatically, then let users dive deep into whatever they are interested in (help command works fine but it's a personal website so you would like to give people as much info as possible as fast as you can in the most original way.) It's a quite original idea.
- aavshr 6y agohi thanks for the suggestions. Yeah, I also thought whether I should display the available commands at the start or not, but it makes more sense to do so.
- lostgame 6y agoAbsolutely do this. The initial blank prompt felt intimidating without any suggestions; and would help with the esoteric aspect of it for certain user sets. :)
- aavshr 6y agoThe website is not mobile-friendly (as of yet)
- suprfsat 6y agoest@sif ~ % elp mmand not found : 'elp'. Type elp' for available commands. est@sif ~ %
- tombert 6y agoThis if fun, few suggestions. The first command I ran was `ls`, which worked as expected, but then I tried running `./cowsay blah`, which didn't work. I wasn't sure how to run it until eventually I guessed `sh cowsay blah`, and it worked. Maybe make the `./` shortcut for executing stuff? While I'm not sure how much work it would be, it might also be kind of cool to implement the `cd` command as well.
- j4yav 6y agoI did the exact same thing and assumed I was seeing some strange behaviour on mobile, until I came here.
- kroltan 6y agoYes, especially since cowsay was marked in a different color! Expected behaviour from *nix would be that you'd either sh somescript.sh Or ./someexecutable Of course the extension is not technically required, but it would help in the UX for the user to try running it on the sh command.
- joshspankit 6y agoI personally think this is the best solution besides implementing ‘./‘: take the colouring off and simply return “permission denied” when someone tries to ‘chmod’
- froh42 6y agoAs "cat cowsay" tells me that cowsay is an executable, I wouldn't expect "sh cowsay" to work in any event.
- amelius 6y agoIf you type "help", it says: sh: run an executable file
- tombert 6y agoYeah, I saw that after, but since it looks like a Unix shell, my first reaction is to just use typical Unix commands.
- aavshr 6y agohi thanks for the suggestion. Yes, I plan to implement './' which is the expected behavior for running executables. I also plan to implement 'cd' and organize the content into nix style directories.
- 6y ago
- rkalla 6y agoAdd tab support, how can you make me type out full commands?! :)
- cschmid 6y agoIf you want some inspiration, have a look at https://replit.com/site/careers https://replit.com/site/careers. I believe they're running a docker container, which gives you the full bash experience!
- deleted 6y ago[deleted]
- colecut 6y agoI've enjoyed working on similar projects, they are fun. A small usability suggestion, since your whole page is a shell and the input field isn't well visually defined, I would make clicking nearly anywhere give focus to the input field.
- aavshr 6y agoHi, thanks for the suggestion. Yeah, this definitely is very annoying when the input isn't focused when you click elsewhere.
- rounakdatta 6y agoAwesome, did you get a chance to check out the out-of-the-box-thinkers at https://replit.com/site/careers https://replit.com/site/careers? The original application of the idea aS A full-fledged hiring shell. Browser is the new cool!
- ericls 6y agoMany keyboard shortcuts I rely on in a shell is hijacked by browser. So sad
- Black101 6y agoCommand not found : './do-not-run-me'. Type 'help' for available commands. auto-complete doesn't work also (<tab>)
- vletal 6y agoSuch a great idea! I'd personally consider using busybox in WASM instead of reimplementing a shell. Quick Google search found [1]. Have you considered that? [1] https://tbfleming.github.io/em-shell/ https://tbfleming.github.io/em-shell/
- aavshr 6y agohello, thank you for the pointer. Will definitely look at it.
- sosuke 6y agoguest@sif ~ % vi about.txt Command not found : 'vi'. Type 'help' for available commands. Very cool site. Looks great! It felt so much like a console that I tried to tab for auto-complete! (^_^)b
- aavshr 6y agoThank you. Yes, I just implemented this over the last two weekends and is very early. I plan to implement all the other fun *nix shell features.
- masswerk 6y agoJS/UIX [1] originated from the same idea. Compare command "info". Supports vi and (space) invaders. But no globbing. :-) [1] JS/UIX (2003) https://www.masswerk.at/jsuix/ https://www.masswerk.at/jsuix/
- juangacovas 6y agoThis reminds me the HTML5 terminal component, which didn't get much attention. I've used it for some API works and is indeed useful / cool
- rainboiboi 6y agopretty cool, makes me want to register one for myself
- aavshr 6y agothanks, you could do it. The code is open sourced (https://github.com/aavshr/aava.sh https://github.com/aavshr/aava.sh).
- astatine 6y agoA neat side-effect (unintended?) is when I hit ^d to exit the shell (almost by reflex), the bookmark add got triggered on Chrome
- aavshr 6y agoYeah, the website is very early and I just implemented basic commands. I plan to implement keyboard shortcuts, history, and all other fun shell stuff.
- joshspankit 6y agoI’d say keep that one. It’s a fun little bit of meta
- kroltan 6y agoNeat! Though I would recommend making clicking anywhere on the screen focus the text input.
- yakubin 6y agoAnd... I got rickrolled. Well played.
- poisonborz 6y agoNeat (if not that original) idea and side project, but I hope you know that not too many people will take the plunge to extract info out of something like this. About sites should be about easy showcases. This approach would be better for an online utility/tool.
- pachico 6y agoNice and fun. I would use it as website to give to recruiters. I would have saved a lot of time this way.
- fouc 6y agocowsay and do-not-run-me are up against each together in the ls when I check in safari, i.e. it's not obvious that they're separate commands.
- aavshr 6y agoah thanks for the info, I need to fix it for safari and mobile!
- PeterWhittaker 6y agoInteresting bit of Javascript. Fun. In the code that handles the long form of ls, I'd suggest ensuring spaces between "file perms" and "file names": Safari gloms them together. Not sure why "sh" is needed to "run" things, since items are encoded as objects: Why not for...in and if not found "command not found"?
- aavshr 6y agothanks for the suggestions. Yeah, I used 'sh' just for now as a basic command, I plan to implement all the expected nix shell features.
- xgbi 6y agoReminds me of https://bellard.org/jslinux/vm.html?cpu=riscv64&url=buildroot-riscv64.cfg&mem=256 https://bellard.org/jslinux/vm.html?cpu=riscv64&url=buildroo... I'd wager you could actually put a real linux shell in your website with that!
- Tyriar 6y agoThat code ended up turning into term.js which forked into xterm.js (which I maintain). It's quite a mature project at this point https://github.com/xtermjs/xterm.js https://github.com/xtermjs/xterm.js, you can combine it with https://www.npmjs.com/package/xterm-local-echo https://www.npmjs.com/package/xterm-local-echo to make implementing something like this website much easier.
- carlsverre 6y agoNice job! If you want to see a (very hacky) example of autocomplete, history, and inline-image support check out a shell I wrote recently: https://zenith.tech https://zenith.tech Code: https://github.com/zenithdb/zenith.tech https://github.com/zenithdb/zenith.tech
- aavshr 6y agothanks!
- avionicsguy 6y agoYou are evil!!! I've just rick-rolled myself :D
- avionicsguy 6y agoI've been surreptitiously rick-rolled by myself ... funny but kind of evil at the same time ;-)
- rbtprograms 6y agoNeat! If I can make one suggestion: I know this is usually not at all what people should with websites, but consider hijacking basic browser hotkeys to augment the shell. Tab for auto complete instead of select next element would be a good start, and I think in this type of situation its acceptable to hijack.
- ivan888 6y agoAlso consider auto focusing the field when the page loads
- aavshr 6y agothanks for the input, yes definitely planning to do this
- eyelidlessness 6y agoIf you do, please check the various meta keys. Hijacking tab is expected here, but not cmd-/alt-tab etc.
- rbtprograms 6y agonice! this is a fun project so I ma glad you are wanting to go further with it.
- XCSme 6y agoI agree, hijacking is good when it leads to the expected user behaviour. I kept pressing tab to auto-complete the command, but the cursor jumped to the address bar.
- SketchySeaBeast 6y agoI kept pressing up to retrieve my last command.
- spurgu 6y agoThere we go, I opened this thread with two things in mind that immediately struck me - tab completion and pressing up for previous command and those two are the top comments!
- codethief 6y ago`sh do-not-run-me` reminds me of this excellent talk: https://www.destroyallsoftware.com/talks/a-whole-new-world https://www.destroyallsoftware.com/talks/a-whole-new-world
- choletentent 6y agoThis is the single most awful web experience I had in my life. I'd look at the comment above as complement, now you know what not to do (:
- imwillofficial 6y agoThis wasn't helpful, how might OP improve the effort?
- sigmonsays 6y agowhy not emulate a real shell (ie, a virtual machine) and implement the tty in a web browser? isolate the system calls with some sort of sandboxed technology so you can provide a real unix experience.
- aavshr 6y agohi thanks for the suggestion. I thought about this but decided against it as: 1. It's slower, I want to emulate the speed of running a shell in your local machine 2. I don't need all the nix shell features since it's a personal website. I can add features that only seem necessary for what I want to tell others about myself.
- diimdeep 6y agoNot really a shell, click baited. Sad.
- therufa 6y agoI love the idea, but there are a few UX issues which area rather annoying. One such issue is that the <input /> loses focus rather easily, like with as hitting the TAB key. The other thing which I find suboptimal is that the input does not get focus when I click on the "terminal". If I use the shell, I expect to be able to type whenever the pane receives focus. Another non-technical thing is that as a non-tech user I would be lost, since there's no indication of what to do on the page, a little hint in form of a MOTD would be a nice touch to round it up.
- aavshr 6y agothanks for the suggestions! Yes, the input not focusing is very annoying and other people have also pointed it out in this thread. Will definitely fix that. Also agree about the second point, will probably display help first on load.
- therufa 6y agoand also: good job! :) (just to round up the critique :D)
- executive 6y agoYour personal website is a blank page with JS disabled.
- lucb1e 6y agoI was also rather disappointed that when curling this "shell", nothing happens. Or rather, you just get the minified javascript just like it would give to your browser and using a shell to access this would-be-shell does absolutely nothing. And no tab complete, up arrow, and I see elsewhere in the thread that even ./ didn't use to work. It seems the author has very limited experience with shells and made an -- I would say 'elaborate' but it wasn't -- rick rolling page.
- jraph 6y agoCome on, you cannot infer that the author has "very limited experience with shells" from an incomplete (early!) implementation. Read the rest of the thread anyway, you'll understand that you are mistaken very fast. I agree that a fallback website when JS is disabled (with complete relevant content) would be good (progressive enhancement), with a hint that one may want to try enabling Javascript for fun.
- lostgame 6y agoIt's as if you're looking for reasons to shit on OP. Come on. For most websites; there's no reason for JS. For something like this? That's just being a prick about JS for being a prick about JS's sake.
- piinbinary 6y agoThis reminds me of that XKCD from a few years ago: https://uni.xkcd.com/ https://uni.xkcd.com/
- yosito 6y agoThis is cool. My personal website (https://iamlocaljo.com/ https://iamlocaljo.com/) is visually a terminal, though it doesn't support ls, cat, etc and only has commands for page names. Maybe I should add support for ls, cat and other typical shell commands. Good idea.
- eyelidlessness 6y agoYou two should add an Easter egg where you can “ssh” into each other’s sites ;)
- jethro_tell 6y agowebsite shell ring! [NEXT] [PREVIOUS] [RANDOM]
- eyelidlessness 6y agoI even almost called it shellring haha
- jethro_tell 6y agoheh, would be too fun. the gofer gang is still around if you're all in for text.
- eyelidlessness 6y agoMy personal site is definitely not a shell, but it occurred to me I could add shell-like functionality as a console easter egg and get in on the fun.
- aavshr 6y agothis look super nice! Great colors and much more informative than my website!
- busymom0 6y ago
- aavshr 6y agoas suggested by many hn users in this thread, I've implemented './' to execute files and it's live now.
- raghavkhanna 6y agoreally like the shell ergonomics, how about adding tab completion?
- maxrev17 6y agoRm not implemented loool
- jll29 6y agoYou should support emacs.
- nichochar 6y agoNever seen a thread with so little hate and so many suggestions. Made me smile! Good work OP I enjoyed playing around with your website
- pxi 6y agoThat's what I was thinking! So here's my suggestion: add some text adventure games. Use emscriptem to convert frotz or something similar to javascript.
- whatshisface 6y agoHackers only hate on things that they don't think they could have written themselves.
- ChrisArchitect 6y agosame, but oh there's hate (further down) Stupid nerds that felt mislead and needed to express disdain that 'personal website' and 'shell' isn't useable as a full shell to hax0r on. smh
- smusamashah 6y agoThis can probably go in this list of these websites which look like win 98 mostly https://simone.computer/#/webdesktops https://simone.computer/#/webdesktops
- 6510 6y agojust one file inthere?? :/
- great_reversal 6y agoI tried `curl` and `wget` before finding the `help` command. Kinda bummed out that tab completion doesn't work. And neither does `ls -la`. Also make it so I can click anywhere to get my cursor back on the right line for typing.
- rangewookie 6y agothis is fun, i agree with the suggestions to make it function more like a real terminal. tab completion is a must
- ajarmst 6y agoNo command history, no tab completion. One assumes that "shell" is aspirational rather than descriptive. It's an interesting idea, but if you present what appears to be a shell interface to users expecting a shell interface, they're going to wander away pretty quickly after discovering it's merely facade. I wish you luck, but this isn't really ready for visitors yet.
- vxNsr 6y agoThis is a personal website more for showing off than for being useful.
- ajarmst 6y agoThat the quality of someone's work doesn't matter because they don't care about it or expect it to be useful isn't a particularly compelling argument.
- vxNsr 6y agoI think you’re being overly critical of someone’s hobby project. This isn’t an enterprise app. It’s a fun little thing they made and wanted to share with us. If this is how the community reacts to what is really barely a hobby project it doesn’t surprise me at all that devs are burnt out from supporting OSS projects that probably have 1000s of ppl like you that complain and expect the world for free.
- aavshr 6y agohi thanks for the input, yes it is very early and I just posted this mainly for validation; I wanted to know if only I thought this was cool or if others also saw it as something fun. I did not anticipate so many people using this. I plan to implement most of the expected shell features soon.
- ajarmst 6y agoCool. It's probably not an original idea, but it's good one. I might even steal it from you at some point. Good luck with the project.
- gorgoiler 6y agoIt’s hard to make a shell that works like a real shell. Make it a shell from a parallel universe instead, or something more like a text adventure game, or a REPL in a context specific to your home page. A weird aavshr command prompt for probing your inner mind. ADB: aavshr debug bridge. The visitor has just interrupted execution in a novel lisp that runs in your head and can inspect current state and run a handful of functions. Something less familiar than a shell will give you more freedom to be really weird. REPLs are all the rage and a lot more flexible. Good luck!
- aavshr 6y agothanks for the input, it is indeed hard to make a shell that works a like a real one. I'll keep your words in mind.
- marvindanig 6y agoNice name, cool project. Keep it up Aavash!
- css 6y agoI tried to go for a shell aesthetic, but it is nowhere near as interesting as yours: https://chrissardegna.com/ https://chrissardegna.com/
- aavshr 6y agolooks neat! Do you have the code open sourced?
- css 6y agoI'm sure JS devs will hate it, but yes: https://github.com/ReagentX/ReagentX.github.io/blob/master/js/index.js https://github.com/ReagentX/ReagentX.github.io/blob/master/j... tl;dr: it appends text from a file to a div, pausing on a specific delimiter. I only use Github pages for a development testbed, my "deploy" is an FTP copy to my personal web server.
- ant6n 6y agoThat one is really nice because it’s an actual website with information that you get without having to put much effort in.
- css 6y agoThanks! Sometimes I worry that the text animation is too slow, but I think its a good balance currently.
- Exuma 6y agoneeds a funny response to rm -rf /
- fsiefken 6y agothat's a nice surprise. long ago i implemented my website as a text adventure with parchment.js - it's a bit more usable for non terminal users
- wtf77 6y agoUseless on mobile
- dllthomas 6y ago... now can you make it work the same over telnet? :D
- mraza007 6y agoHey love your site man, I was actually surprised when I found out about your work. Your company is building amazing product and I remember being interviewed as a user by your company. Loved the product that you are working on
- aavshr 6y agothank you, yeah we are really excited about our product at work, Deta also gifted me this domain which led me to create this website.
- tomiplaz 6y agoI've done a similar thing few years ago. You can check it out at the bottom of the website at http://138.68.65.145/ http://138.68.65.145/ (website is old and needs updating, same with the domain). I decided to print the output to the alert popup. I have `clear` and `exit` implemented, and going up/down the command history.
- antibland 6y agoGreat work! I would add that you should turn off auto-capitalization for tablet/mobile devices, to preserve the shell aesthetic. <input type="text" autocapitalize="off />
- zekrioca 6y agoVery cool! Add some “directory” as sections to your website, so people would “cd” into them to see the various sections (with probably index.html as a default MOTD?). There is also a mini bug when one lists the directory with “-l”: the filenames come right next to permissions. Just add a space in between. Great job!
- dhosek 6y agoOn Safari, I'm getting all the files mashed together.
- ChrisArchitect 6y agofun! and seeing all the other random shell-inspired personal sites popping up in here made me smile
- ape4 6y ago./cowsay `cat about.txt` didnt really work
- atum47 6y agoThat's pretty cool. I'm working on a text adventure and I end up creating a "shell" as well. One thing I did that I liked very much is auto complete and history. I think it would aggregate a lot to your website as well. Great job!
- jswny 6y agoVery cool! Mine is a very similar thing written in TypeScript: https://j1.io/ https://j1.io/
- sefsdfse 6y agoDon Hopkins did something quite like this a long time ago: http://www.art.net/~hopkins/Don/unix-haters/login.html http://www.art.net/~hopkins/Don/unix-haters/login.html
- jhallenworld 6y agoI've been waiting for Linux terminal emulators to have inline images, video and particularly GUI for certain programs. I've been thinking of writing this for years now.
- divbzero 6y agoguest@sif~% sudo rm -rf / Command not found : 'sudo'. Type 'help' for available commands. Oh well, it was worth a try :)
- birdyrooster 6y agoplease hijack tab
- xyzelement 6y agoCool idea, though I kept experiencing something akin to the uncanny valley, where it was "close enough" to a shell that it really bothered me that it didn't work as expected :) Eg I immediately tried to use tab-completion (as have many others) only to land in the URL field. Then I tried to use "less" to read the file, only to have that not work. Finally had to look up the help. I guess the UX lesson here is if you're going to emulate a really familiar interface, you have to do it fully or otherwise people's muscle memory is going to lead them astray. Don't get me wrong, cool technical idea.
- vmladenov 6y agoOn iOS, if you press return without any input, the shell loses the cursor and there is no way to get the keyboard back without reloading the page.
- senectus1 6y agoman, i can see this being really useful. you need to expand on this... I'd buy a series of .sh domains just to use this.
- mpva 6y agoGreat! However, one issue. If you click anyway, you can no longer type.
- scoopertrooper 6y agoI was just about ready to move my entire workflow over to this, but I couldn't get the cd command to work. Thanks for wasting an hour of my life.
- system2 6y agoGetting rickrolled in a terminal. Future is today.
- debrice 6y agoPretty cool. Maybe on suggestion, disable autocorrect and autocapitalize
- in9 6y agoAwesome site man! Would love to know the color scheme you are using. Would definetly use it in my terminal :D
- atlgator 6y agoWhy isn't there sound on the Rick Astley song? "I just wanna tell you how I'm feeling. Gotta make you understand."
- z3ncyberpunk 6y agothe little close button was perfect! awesome!
- jaredsohn 6y agoOnly command that didn't work for me and wasn't listed here is cmd-k to clear the screen. Maybe most people don't use that, though.
- interstice 6y agoI love these, put one together for my own site with some hidden features like a theme switcher. One suggestion I'd make on yours is focusing when clicking anywhere on the screen.
- stall84 6y agolove it
- stall84 6y agolove it!
- selcuka 6y agoI tried combining the available commands to come up with something cool but it didn't work. It might be interesting to support pipes: cat about.txt | cowsay
- remoquete 6y agoLove this idea. I’ve used a shell-like Hugo theme for my personal website, which at least preserves readability when JS is disabled. At this point, I wonder if you shouldn’t just plug a real shell to the website instead of faking one.
- voceboy521 6y agothis sucks. poorly executed and dumb
- brisky 6y agoThis is a library that can help you to implement similar experience on your own website:https://github.com/tautvilas/termpage https://github.com/tautvilas/termpage
- dackdel 6y agoso how did you build this
- n3storm 6y agoI don't understand why this has reached HN frontpage, sorry. There are thousand of weird, demoscene, experimental sites and this one in particular is dull. Dull, dull, dull, dull, dull (as a monty python's reference)
- itdude 6y agoNot including whoami and whoareyou are missed opportunities.
- lelag 6y agoIdea: implement history to log and show what the other users tried to do with the shell. It would also probably be a great way to get new feature ideas.
- aliezsid 5y agoAdding to the feedback, click on the whole thing should just focus the current input, I mean, that's general behaviour. Amazing website though, liked the idea
- jcubic 5y agoIt's really hard to use I would say. No completion, no history. You need to click directly over the input. It's nice exercise to create Terminal from scratch, but I don't understand why people don't use jQuery Terminal. Maybe they are afraid that it have jQuery in the name. Here is advanced example that use real like commands with Pipe operator (from Bash). With figlet, lolcat and cowsay commands that can be mixed: https://codepen.io/jcubic/pen/vYLvvXx https://codepen.io/jcubic/pen/vYLvvXx You can glue pretty advanced website just collecting examples from https://terminal.jcubic.pl/examples.php https://terminal.jcubic.pl/examples.php With jQuery terminal you only need to care about the commands. Note that the library is more like a framework.