[HN Gopher] Show HN: My personal website is a shell
___________________________________________________________________
Show HN: My personal website is a shell
Author : aavshr
Score : 276 points
Date : 2021-04-05 16:08 UTC (6 hours ago)
(HTM) web link (aava.sh)
(TXT) w3m dump (aava.sh)
| tombert wrote:
| This 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.
| kroltan wrote:
| Yes, 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 wrote:
| I personally think _this_ is the best solution besides
| implementing '. /': take the colouring off and simply return
| "permission denied" when someone tries to 'chmod'
| froh42 wrote:
| As "cat cowsay" tells me that cowsay is an executable, I
| wouldn't expect "sh cowsay" to work in any event.
| aavshr wrote:
| I implemented './' and it should be live now.
| tdy721 wrote:
| This "just worked" for me. Nice work
| Scarblac wrote:
| Also I was wondering what 'do-not-run-me' would be so my first
| try was 'file do-not-run-me', but alas, that command didn't
| exist.
| amelius wrote:
| If you type "help", it says: sh: run an
| executable file
| tombert wrote:
| Yeah, I saw that after, but since it looks like a Unix shell,
| my first reaction is to just use typical Unix commands.
| ed wrote:
| I kept trying `./cowsaydo-not-run-me` because `ls` outputs with
| no separators (`ls -l` fixed me up)
| definitelyhuman wrote:
| Same here, ls output needs formatting help on mobile. I was
| hoping glob might work too - could be a useful update
| comprev wrote:
| Same here on mobile (iPhone 7)
| aavshr wrote:
| hi 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.
| j4yav wrote:
| I did the exact same thing and assumed I was seeing some
| strange behaviour on mobile, until I came here.
| xgbi wrote:
| Reminds me of
| 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!
| gorgoiler wrote:
| It'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 wrote:
| thanks 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.
| rkalla wrote:
| Add tab support, how can you make me type out full commands?! :)
| aavshr wrote:
| will do, I plan to implement all the expected unix shell
| features, thanks for the suggestion!
| m4lvin wrote:
| Please also add "arrow up" to repeat the last command :)
| aavshr wrote:
| hello, thanks for the input. Yeah, implementing history is
| next in line :D
| dylan604 wrote:
| the site is so 'shell' like, this actually confused me
| that it didn't work. that's a compliment on how i had
| already bought into this being a shell.
| ChrisArchitect wrote:
| fun! and seeing all the other random shell-inspired personal
| sites popping up in here made me smile
| maxrev17 wrote:
| Rm not implemented loool
| aavshr wrote:
| as suggested by many hn users in this thread, I've implemented
| './' to execute files and it's live now.
| carlsverre wrote:
| Nice 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
|
| Code: https://github.com/zenithdb/zenith.tech
| aavshr wrote:
| thanks!
| 6510 wrote:
| just one file inthere?? :/
| mraza007 wrote:
| Hey 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 wrote:
| thank you, yeah we are really excited about our product at
| work, Deta also gifted me this domain which led me to create
| this website.
| kroltan wrote:
| Neat! Though I would recommend making clicking anywhere on the
| screen focus the text input.
| marvindanig wrote:
| Nice name, cool project. Keep it up Aavash!
| cschmid wrote:
| If you want some inspiration, have a look at
| https://replit.com/site/careers. I believe they're running a
| docker container, which gives you the full bash experience!
| [deleted]
| yakubin wrote:
| And... I got rickrolled. Well played.
| css wrote:
| I tried to go for a shell aesthetic, but it is nowhere near as
| interesting as yours: https://chrissardegna.com/
| ant6n wrote:
| That one is really nice because it's an actual website with
| information that you get without having to put much effort in.
| css wrote:
| Thanks! Sometimes I worry that the text animation is too
| slow, but I think its a good balance currently.
| aavshr wrote:
| looks neat! Do you have the code open sourced?
| css wrote:
| I'm sure JS devs will hate it, but yes: https://github.com/Re
| agentX/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.
| jhallenworld wrote:
| I've been waiting for Linux terminals to have inline images,
| video and particularly GUI for certain programs. I've been
| thinking of writing this for years now.
| poisonborz wrote:
| Neat (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.
| rangewookie wrote:
| this is fun, i agree with the suggestions to make it function
| more like a real terminal. tab completion is a must
| pachico wrote:
| Nice and fun. I would use it as website to give to recruiters. I
| would have saved a lot of time this way.
| colecut wrote:
| I'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 wrote:
| Hi, thanks for the suggestion. Yeah, this definitely is very
| annoying when the input isn't focused when you click elsewhere.
| avionicsguy wrote:
| You are evil!!! I've just rick-rolled myself :D
| avionicsguy wrote:
| I've been surreptitiously rick-rolled by myself ... funny but
| kind of evil at the same time ;-)
| rbtprograms wrote:
| Neat! 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.
| XCSme wrote:
| I 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 wrote:
| I kept pressing up to retrieve my last command.
| aavshr wrote:
| thanks for the input, yes definitely planning to do this
| eyelidlessness wrote:
| If you do, _please_ check the various meta keys. Hijacking
| tab is expected here, but not cmd- /alt-tab etc.
| rbtprograms wrote:
| nice! this is a fun project so I ma glad you are wanting to
| go further with it.
| ivan888 wrote:
| Also consider auto focusing the field when the page loads
| great_reversal wrote:
| I 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.
| codethief wrote:
| `sh do-not-run-me` reminds me of this excellent talk:
| https://www.destroyallsoftware.com/talks/a-whole-new-world
| rounakdatta wrote:
| Awesome, did you get a chance to check out the out-of-the-box-
| thinkers at https://replit.com/site/careers? The original
| application of the idea aS A full-fledged hiring shell.
|
| Browser is the new cool!
| ape4 wrote:
| ./cowsay `cat about.txt` didnt really work
| ericls wrote:
| Many keyboard shortcuts I rely on in a shell is hijacked by
| browser. So sad
| choletentent wrote:
| This 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 wrote:
| This wasn't helpful, how might OP improve the effort?
| fouc wrote:
| cowsay 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 wrote:
| ah thanks for the info, I need to fix it for safari and mobile!
| piinbinary wrote:
| This reminds me of that XKCD from a few years ago:
| https://uni.xkcd.com/
| sefsdfse wrote:
| Don Hopkins did something quite like this a long time ago:
| http://www.art.net/~hopkins/Don/unix-haters/login.html
| sigmonsays wrote:
| why 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 wrote:
| hi 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 wrote:
| Not really a shell, click baited. Sad.
| atum47 wrote:
| That'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!
| Black101 wrote:
| Command not found : './do-not-run-me'. Type 'help' for available
| commands.
|
| auto-complete doesn't work also (<tab>)
| aavshr wrote:
| hello yes sorry, './' and auto-completion don't work as of yet.
| The website is still early, I plan to implement most of the
| expected unix shell features soon.
| Black101 wrote:
| Your site looks nice, but these 2 would drastically increase
| usability for me
| executive wrote:
| Your personal website is a blank page with JS disabled.
| lucb1e wrote:
| I 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 wrote:
| Come 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 wrote:
| It'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.
| wtf77 wrote:
| Useless on mobile
| jswny wrote:
| Very cool! Mine is a very similar thing written in TypeScript:
| https://j1.io/
| vletal wrote:
| Such 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/
| aavshr wrote:
| hello, thank you for the pointer. Will definitely look at it.
| sosuke wrote:
| guest@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
| masswerk wrote:
| JS/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/
| aavshr wrote:
| Thank 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.
| antibland wrote:
| Great 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
| />
| jll29 wrote:
| You should support emacs.
| nichochar wrote:
| Never seen a thread with so little hate and so many suggestions.
| Made me smile! Good work OP I enjoyed playing around with your
| website
| PeterWhittaker wrote:
| Interesting 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 wrote:
| thanks for the suggestions. Yeah, I used 'sh' just for now as a
| basic command, I plan to implement all the expected nix shell
| features.
| fsiefken wrote:
| that'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
| yosito wrote:
| This is cool. My personal website (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.
| aavshr wrote:
| this look super nice! Great colors and much more informative
| than my website!
| eyelidlessness wrote:
| You two should add an Easter egg where you can "ssh" into each
| other's sites ;)
| jethro_tell wrote:
| website shell ring!
|
| [NEXT] [PREVIOUS] [RANDOM]
| eyelidlessness wrote:
| I even almost called it shellring haha
| jethro_tell wrote:
| heh, would be too fun. the gofer gang is still around if
| you're all in for text.
| eyelidlessness wrote:
| My 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.
| juangacovas wrote:
| This 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
| raghavkhanna wrote:
| really like the shell ergonomics, how about adding tab
| completion?
| ajarmst wrote:
| No 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 wrote:
| This is a personal website more for showing off than for being
| useful.
| ajarmst wrote:
| That 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 wrote:
| I 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.
| majikandy wrote:
| It is totally ready for visitors. I visited, I enjoyed it.
| Doesn't seem particularly wise to advise people something isn't
| ready for people to visit, when those visitors are the only
| ones who can actually give useful feedback.
| ajarmst wrote:
| One hopes that the author didn't need me, a stranger, to tell
| them that this site is missing most of the fundamental
| features of a shell. Feedback is valuable, but strangers
| aren't going to visit something that clearly doesn't work a
| second time to see if they're making progress. There is a
| reason that early testing and feedback on prototypes is
| limited to in-house or pre-existing customer review. The
| author is entitled, and even encouraged, to ignore me--but my
| feedback is that they should have waited until they were
| closer to their goal and general feedback would be more
| valuable than hundreds of copies of "it doesn't work".
| gitgud wrote:
| > _but my feedback is that they should have waited until
| they were closer to their goal and general feedback would
| be more valuable than hundreds of copies of "it doesn't
| work"._
|
| This is the exact opposite of useful feedback. I hope you
| realise project that is literally intended for fun...
| aavshr wrote:
| hi 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 wrote:
| Cool. 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.
| scudd wrote:
| I thought it was pretty cool, and glad they shared it.
| racingmars wrote:
| What definition of "shell" are you basing this on? Some
| (current) Unix systems I use have default shells that have
| neither command history nor tab completion.
|
| Easy access to command history and tab completion are certainly
| niceties that came along at some point, but are in no way part
| of the definition of a shell.
| ajarmst wrote:
| ok, I'll bite. What current Unix systems ship with a default
| shell that supports neither command-completion nor command-
| history?
| racingmars wrote:
| The one I have to use frequently is the restricted ksh
| environment in IBM's IVM/VIOS server, which is AIX.
|
| I believe it does log a short set of command history to a
| file, but it'd not available with, say, the up arrow.
|
| In general, though, I don't think any form of history is
| required by the POSIX shell standard, and tab-completion
| definitely isn't.
| ajarmst wrote:
| ksh93 supports both completion and history. I lost
| interest in looking before uncovering information about
| versions of ksh more than thirty years old, but neither
| feature is mentioned in descriptions of differences
| between ksh93 and predecessors, so I suspect the feature
| has been there for longer. Posix compliance is neither
| necessary nor sufficient for a reasonable colloquial
| definition of "shell."
| rainboiboi wrote:
| pretty cool, makes me want to register one for myself
| aavshr wrote:
| thanks, you could do it. The code is open sourced
| (https://github.com/aavshr/aava.sh).
| therufa wrote:
| I 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 wrote:
| thanks 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 wrote:
| and also: good job! :) (just to round up the critique :D)
| smusamashah wrote:
| This can probably go in this list of these websites which look
| like win 98 mostly https://simone.computer/#/webdesktops
| astatine wrote:
| A neat side-effect (unintended?) is when I hit ^d to exit the
| shell (almost by reflex), the bookmark add got triggered on
| Chrome
| aavshr wrote:
| Yeah, 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 wrote:
| I'd say keep that one. It's a fun little bit of meta
| ubrpwnzr wrote:
| There isn't one to keep, its just keyboard shortcut in
| chrome(??)
| Scarblac wrote:
| He means, don't override it to give it its normal shell
| meaning, as the current meaning (add bookmark) is pretty
| desirable for him as owner of the site.
| dllthomas wrote:
| ... now can you make it work the same over telnet? :D
| tomiplaz wrote:
| I'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/ (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.
| zekrioca wrote:
| Very 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 wrote:
| On Safari, I'm getting all the files mashed together.
| aavshr wrote:
| The website is not mobile-friendly (as of yet)
| suprfsat wrote:
| est@sif ~ % elp mmand not found :
| 'elp'. Type elp' for available commands. est@sif
| ~ %
| Exuma wrote:
| needs a funny response to rm -rf /
| c43verge wrote:
| I 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 wrote:
| hi 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 wrote:
| Absolutely do this. The initial blank prompt felt
| intimidating without any suggestions; and would help with the
| esoteric aspect of it for certain user sets. :)
___________________________________________________________________
(page generated 2021-04-05 23:00 UTC)