9 ms·
Upterm – A terminal emulator and interactive shell based on Electron
- shockone 9y agoHi, author of Upterm here. Ask me anything.
- coppolaemilio 9y agoWindows version soon? :)
- teekert 9y agoOne that easily uses Bash on Ubuntu on Windows??
- Diti 9y agoThe actual term is Windows Subsystem for Linux (WSL).
- teekert 9y agoI'm hearing many terms for it (https://www.google.nl/search?q=bash+on+ubuntu+on+windows&client=firefox-b&dcr=0&source=lnms&tbm=isch&sa=X&ved=0ahUKEwiI0LyasrbWAhWFaVAKHURrD7wQ_AUICygC&biw=1680&bih=980#imgrc=iMINvYbTR09F4M: https://www.google.nl/search?q=bash+on+ubuntu+on+windows&cli...)
- shockone 9y agoI'm afraid it's not going to happen any time soon, if at all. But even if it does happen, it won't be cmd.exe or PowerShell support, but rather some kind of POSIX shell for Windows.
- deleted 9y ago[deleted]
- rwmj 9y agoAlmost all my terminals are ssh'd into some remote machine. Do you still get the features like enhanced command line completion in this scenario? What about integrated screen/some other kind of reconnection?
- shockone 9y agoIt's theoretically possible to have all the Upterm niceties over SSH, but not possible at the moment. As of screen and tmux, we have no plans to integrate with them.
- joantune 9y agoAutocompletion for env variables is great: i.e. `cd $THAT_ENV_DIRECTORY` however I always get `The directory "$THAT_ENV_DIRECTORY" doesn't exist. ` although clearly it does as it is autocompletion suggested
- shockone 9y agoIt's a known bug, please vote to fix it faster. Variables interpolation doesn't work in built-in commands at the moment. https://github.com/railsware/upterm/issues/597 https://github.com/railsware/upterm/issues/597
- grizzles 9y agoI made a superficially similar thing but I've never released it. My differences: (1) The shell is in pure js. It's a thin wrapper around shelljs but I had plans to move to a builder type syntax, eg. fs.cp().f("/tmp/foo").t("/tmp/bar").x(); (2) I made an api so people could quickly code up graphical output for commands. Just wondering if you'd be interested in integrating a feature like this. Do you have a chat channel?
- shockone 9y agoYes there is a gitter channel: https://gitter.im/upterm/Lobby https://gitter.im/upterm/Lobby
- hnlmorg 9y agoI've given this a play and I hope you don't mind some constructive criticism I've experienced: First of, I really like the idea of this project despite normally being a vocal critic against Electron. However I think you bit off too much trying to write your own $SHELL as well as terminal emulator. The result is rather uncomfortable to use because there are shell bugs and incompatibilities compounding the usual expected bugs with any new terminal emulator. For example it took me 5 minutes to just cd into a directory because env vars weren't being recalled, the ~ variable wasn't being recalled, and auto-complete wasn't keyboard optimised (I'd arrow down and hit enter but it would crop the line rather than select the auto-complete entry). So the next thing I did was to start my preferred shell and I then ran into a whole other series of bugs due to the terminal emulator being tailored for it's own specific shell. In fact the bugs there were so severe that it renders the term virtually unusable on any of the standard shells nor the more esoteric ones I contribute to. One thing I was pleasantly surprised about though was how well it supported ANSI escape sequences - even ones that aren't part of the formal standard (such as the iTerms true colour sequences). But the bugs surrounding the terms handling of readline (and similiar) really feels like many of the basics are missing despite having some cool advanced features already. Overall, as much as I'm ideologically against Electron, I can see the advantages of using it in this domain because it allows the ability to include rich content in the command line. It might be nice to get to the point where the command line can offer as much rich content as a web page (something I'm working towards with my own project in fact) - in which case Electron (or similar tech) seems the obvious choice for building a terminal emulator. However upterm's dependance on using your own implementation of Bash (I think it's a bit disingenuous calling your shell "Bash" but that's your prerogative) makes this highly frustrating compared to other rich terminal emulators already out there. And the inability to run your own shell within upterm makes this inflexible for anyone wanting to do something a little more indepth than just cat'ing a JSON file (even running a DB command line tool like mysql or redis-cli would be impractical in upterm in it's current state. And while I didn't try SSHing into remote boxes I can see the same issues happening there too). I don't know the age of this project but I think it does have real potential. However if I was to ask for anything - and I appreciate this is your baby so I have no entitlement what-so-ever - it would be if you could offer a $SHELL'less version for power users. edit: Also, I've noticed commands that fail don't appear in the upterm's history. Was this an intentional decision? I appreciate there are arguments for and against only including successful commands but sometimes you'd typo something and the inability to up-array and edit my failed commend added to my frustration. If this was an intentional design decision then is it worth including the last command regardless of success and then excluding it from all subsequent placements in the history?
- sametmax 9y agoWe really need a modern take on terminals, so keep up the good work. I know there is a lot of clash around electron apps these days, and I'm the first one to dislike the waste of resources. But maybe in 5 years electron and hardware will improve so much it won't matter anymore. So if it allows you to experiment with new stuff, keep going. And good luck.
- celeritascelery 9y agoHow does upterm generate auto completion meta data for command line options and commands (Describing what they do)?
- featherverse 9y agoWhy did you choose to use Electron? It appears to be universal reviled by developers.
- Kuraj 9y agoWhat's your opinion?
- featherverse 9y agoThere's like 1,000 programming languages and we don't need most of them. If a new language is truly amazing, by all means use it, but if it's hated by everyone I don't know why you'd choose it over something like C or Python or Perl which most developers seem to agree are the "good" languages. I don't know any of the above mentioned languages myself, so beyond that outsider perspective I can't form an opinion on it, I am just curious why this choice was made.
- featherverse 9y agoWell it's been a few days and no answer. That's a strange result for an "ask me anything".
- shockone 9y agoSorry about that. I believe Electron is the best cross-platform UI framework. And TypeScript is an amazing language.
- thomastjeffery 9y agoWhy use Electron, and not something like GTK or SDL?
- kstenerud 9y agoLooks really cool! The only caveat is that I'm not sure I want to have another electron app chewing through 15% of my CPU...
- shockone 9y agoSurprisingly it has pretty moderate resource usage. I have both iTerm and Upterm running on my laptop, here are the stats. Of course, your mileage may vary. https://imgur.com/a/bwD06 https://imgur.com/a/bwD06
- andreash 9y agowhat is the benefits over hyper https://github.com/zeit/hyper https://github.com/zeit/hyper?
- joantune 9y agodoes hyper have autocompletion ?
- amdavidson 9y agoHyper + fish does. Hyper + zsh can.
- shockone 9y agoHyper is a pure terminal emulator; it only displays what your shell tells it to display. We aim to deeply integrate with a shell or even replace it for better experience. One of the most notable benefits is as-you-type intellisense completion with fuzzy search and stuff. There are some animations on the releases page: https://github.com/railsware/upterm/releases https://github.com/railsware/upterm/releases
- kccqzy 9y agoHow's the performance? GNU yes can produce output at more than 10GB/s. Does it cope well with that? How about lots of output that contains lots of escape sequences?
- rwmj 9y agoLatency is more important than performance. https://danluu.com/term-latency/ https://danluu.com/term-latency/ (Previous discussion: https://news.ycombinator.com/item?id=14798211 https://news.ycombinator.com/item?id=14798211)
- shockone 9y agoPerformance is definitely worse than in iTerm or gnome-terminal, but it's improved a lot in recent Upterm versions, and we plan to improve it further. I'd say it's good enough, but you can try yourself. Recently there was this terminal performance test https://danluu.com/term-latency/ https://danluu.com/term-latency/ The author says that the most important things are typing delay and how quickly you can Ctrl+C a command, not how much text it prints per second. Upterm is good at both.
- creshal 9y ago> Performance is definitely worse than in iTerm or gnome-terminal I dropped those because they're magnitudes slower than urxvt. You managed to make a terminal emulator that's even worse?
- phren0logy 9y agoHey, I bet nobody will force you to use it or help develop it. Not every tool fits everyone’s needs. Some tools might only be useful to a few people. No need to be rude about it.
- Diti 9y agoI don’t mean to spark a controversy, but that’s what happens when you use Electron.
- Philipp__ 9y agoElectron... no thanks! I will wait for Alacritty, in the meantime iTerm2 and Terminal.app are there...
- joantune 9y agoI really think the auto completion benefits can easily outweigh the performance penalty of running a term on top of Chromium
- roylez 9y agoYou can have similar completion using zsh-autosuggestions, it is easy to configure. However, improving performance is difficult.
- joantune 9y agoClearly I ought to dig into the zsh world
- Philipp__ 9y agoIt's just the matter of personal preference I guess... I have good enough completion for terminal with my current ZSH configuration. (I am not fan of auto completion even in IDEs and editors) One thing I need from few tools that I use everyday (terminal and text editor) is as low latency as possible, I get really irritated by all those few ms of lag that are visible after keypress, I don't know why. So any Electron app is no go for me from the start, so I decided to stick with Vim and Emacs. Only GUI editor that blew me away by it's performance is Sublime.
- alrs 9y agoSo long as you're down for 20 minutes of battery life.
- deleted 9y ago[deleted]
- hexrcs 9y agoA bit off-topic but I wonder if it is possible that Electron team distribute something like the VS C++ Runtimes on Windows? And release patches for different versions/updates? Haven't used a Windows machine for a while but I remember there were bunches of different VS Runtime version installed on my PC before. Some app installers came with a runtime installer, but if the required runtime version was installed it would just use that one. I think this might somewhat reduce the installed app size for Electron apps as at least some stuff got reused.
- joantune 9y agothat autocompletion is great! it would be awesome if you had some way to support more commands - especially if done in a more automatized way.. parsing the manuals (?)
- shockone 9y agoWe kind of experimented with parsing man files, but it'll never be as good as manually crafted suggestions: you can do stuff like suggest changed files for "git add", tokens from diff for "git commit" message, show process names for "kill", and much more. The vision is to have manual suggestions for at least the most popular tools.
- hnlmorg 9y agoI do man parsing for one of my projects and it is as painful as HTML parsing. OK the syntax is less complex but you still end up with the problem that the body of text is designed for human consumption so the formatting doesn't always follow the same rules from one man page to the next (tokens aside). This means that while it is easy enough to pull flags from the man pages, offering usage suggestions is something too tricky to handle in an automated on-demand fashion. I did toy with the idea of starting a new project porting man pages to a new document format designed specifically for utilities parsing (eg a JSON format with standardised fields). However even that would be a massive job to maintain without the support from other developers upstream. But I'm open to other suggestions if anyone has any?
- eptcyka 9y agoI'm not going to spend hundreds of megabytes to display text on the screen. Not to mention the input latency this will have between keystrokes. The style of autocompletion shown can already be achieved with zsh - autocompletion should not be a function of your terminal emulator, but rather your shell. However, this is all just my opinion and maybe there will be a load of users, me and people who share my opinions will slowly descend into obsolescence.
- shockone 9y agoI wish the same autocompletion could be achieved in ZSH. Then I wouldn't start this project at all. The problem with ZSH is that you have to * Make a decision you want completion. * Press tab for it to appear. * Guess when your token is precise enough to be unambiguous or else cycle through results. Not to mention fuzzy search. It may sound as not that much of an overhead, but it's so much slower than what I have in, say, Intellij IDEA.
- teamhappy 9y agohttps://github.com/zsh-users/zsh-autosuggestions https://github.com/zsh-users/zsh-autosuggestions Shouldn't be too hard to modify it to display completion data instead of entries from your history.
- shockone 9y agoThanks, I'll take a look at it. Although, it seems to only show a single best match, unlike IntelliSense.
- teamhappy 9y agoIf you want to show all possible completions that's even easier: https://github.com/hchbaw/auto-fu.zsh https://github.com/hchbaw/auto-fu.zsh I prefer the other plugin though because it's less obtrusive.
- shomyo 9y agoThose millennials with their js shenanigans outside browser.
- PleaseHelpMe 9y ago> based on Electron. No thanks
- shockone 9y agoIt's your choice, of course, but in my opinion Electron is the only decent cross-platform UI framework. Without Electron there would be no Linux version.
- roblabla 9y agoWhat about qt ? tcl/tk ? OpenGL ? I'm not against electron app, in fact I think it's a really good idea. But saying it's the only good ui framework is disingenuous.
- eivarv 9y ago[...] Electron is the only decent cross-platform UI framework That's just not true. What about Qt, wxWidgets, Tcl/Tk, or even Kivy?
- shockone 9y agoIn my opinion, Qt and wxWidgets apps look ugly. At least I never saw one that looks beautiful.
- kuschku 9y agoAny Qt app can be themed with CSS (Qt calls it QSS) as if it was an HTML page, just like Electron apps can be. You can completely change the design, if you wish to. So, in terms of design, there’s basically no major difference there.
- jcelerier 9y agoTelegram ? https://raw.githubusercontent.com/telegramdesktop/tdesktop/dev/docs/assets/preview.png https://raw.githubusercontent.com/telegramdesktop/tdesktop/d... Battle.Net ? https://i.imgur.com/VCNEhgm.jpg https://i.imgur.com/VCNEhgm.jpg both are made with Qt
- steinuil 9y agoIt seems "for the 21st century" has become buzzwords for "running on Electron".
- JosephRedfern 9y agoI've not been able to find an adequate terminal emulator for Windows. I found Conemu clunky (maybe I needed to spend more time configuring it, but out of the box it was fairly ugly, and borked out under some curses applications and when using tmux), PuTTY/KiTTY to be lacking some important features (like tabs) -- ditto cmd.exe. IMO there's a real gap in the Windows market, be that a new terminal emulator entirely, or improvements to Conemu making it more intuitive and user friendly.
- hacking_again 9y agoI use mintty with Cygwin. If you want tabs maybe you can try the fork called fatty.
- sime2009 9y agoIf you are looking for a terminal to use with cygwin then you should check out http://extraterm.org http://extraterm.org . It is in development but is stable enough for me to use full time on Linux and cygwin. Plus it has a bunch of other useful features.
- rootlocus 9y agoI'm using http://cmder.net/ http://cmder.net/
- glasz 9y agoi think we need to care about shit eating battery as much as we do care about ads eating bandwidth.
- pawy 9y agoTried to start it; blank page and no response... as said terminal emulator should do one thing lightly. Tough the nice interface still made me download it. Try building the same stuff with smtg else than electron ?
- noway421 9y agoTried it several months and left unimpressed. While by what the product aspires to be, it could be the IDE for command line, it's far from that. The only difference is essentially autocomplete, which is not intelligent (and probably can't be, nothing along the lines of parsing --help or man pages) and felt clunky when trying to edit part of a command and then try to get another "suggestion". With zsh's built-in Ctrl+R it's at least possible to reduce list of suggestion and then travel up the history in those suggestions. While the more powerful fzf will give you the list of commands you've run in a selectable dropdown. Upterm I think could be eliminating entire classes of tools which sometimes are unnecesary complex. Server automation could be part of pre-saved playbooks which are saved to your terminal history and can be easily brought up and run according to rules. Curl arguments could be arranged in a way where they are actually managable. Parsing --help and man pages (which is possible, there is a workable implementation in fish AFAIK). Upterm is in position to take on that functionality, but right now it's not much more than already mentioned hyper, but with custom handled prompt line.
- shockone 9y agoThanks for the feedback! It's true that we're far from where we want to be, but we're steadily - event if slowly - moving into that direction. Also, we recently integrated monaco-editor by Microsoft, so editing is much less clunky than it was before.
- chank 9y agoOutside of VSCode, usually when I see an Electron based app it's an extreme turn off.
- Sir_Cmpwn 9y agoGosh, please stop making these. I'm not even going to pretend to have anything but disdain for this project. There's a serious lack of engineering accumen among the users of Electron.
- trapperkeeper74 9y agoIf Atom is any benchmark, plugins will be created, abandoned, forked, abandoned and then the API will churn breaking everything every so often because "change is cool." It's the same segment of programmers with 0-6 months of experience whom can't be bothered to delve deeper into computer science, professsional software engineering or static compilation. Instead, just waste everyone's RAM and processor cycles with inefficient interpreted scripts and also bounce from shiny tech to new shiny tech.
- naiyt 9y ago> There's a serious lack of engineering accumen among the users of Electron I'm not a fan of Electron, but I don't see this correlation at all.
- KyeRussell 9y agoI don't know how you could expect the project's developer(s) to read your comment and gain anything positive from it. It's a thinly veiled rant / grab at votes. There are a lot of ways you could be more constructive, and you decided to not go with any of them. :)
- sevensor 9y agoLike pretty much everybody, I can't stand electron. But there's an interesting angle here, which is integrating the thing running in the terminal emulator (the shell) with the terminal itself. What I'd be most interested to see though would be a terminal pushing curses support forward, since I use a lot of curses-based applications.
- jeromenerf 9y agoTaliing about integration, I like terminals with good mouse support, where one can plumb the selected text with a click. For some reason, there aren't so many, except - 9term from plan9, - tilix or tylix, which has customisable actions for regex patterns - URL, mostly http, in vte based terminal I wrote a simple patch for st that process some escape sequence from the shell to have the terminal aware of its shell current working dir (ocs7). Using this simple hack, one can just cd & ls & select "foo.pdf" & right click to have it handled by one ´s plumber (open, xdg-open, plumb ...) or even right click "path/to/file:line:column" from a log to the editor. This feature is so simple, so addictive in plan9/acme, that I don't really get why it isn't offered by most terminals.
- creshal 9y ago> But there's an interesting angle here, which is integrating the thing running in the terminal emulator (the shell) with the terminal itself It sure results in exciting and interesting bugs, if you look at upterm's issue tracker.
- sjellis 9y ago"Like pretty much everybody, I can't stand electron." Except, you know, all of the folks that say that they like Atom or Visual Studio Code: https://insights.stackoverflow.com/survey/2017#technology-most-popular-developer-environments-by-occupation https://insights.stackoverflow.com/survey/2017#technology-mo... (Atom and VS Code were specified by 20% of voters in each category).
- sevensor 9y agoWell, naturally I'm discounting the opinions of people who disagree with me :)
- rambl3r 9y agoHacker News macro: Author: I wrote something for people who care more about features than performance. People who care more about performance than features: I am personally offended that you created this.
- jd3 9y agotyping latency (evident in all electron programs) is a deal breaker tbh - this becomes especially true for something like a term emulator
- CptBland 9y agoI don't notice any typing latency on Slack and I'm usually pretty sensitive to it. That said, Atom with a bunch of plugins can chug a little.
- AndrewCHM 9y agoI don't notice any notable latency in discord, vscode, etc But I do notice latency in hyper.js, and it just makes it feel very "dull", and that's what I think a lot of people know of electron terminals plus the competition from native apps is a bit absurd in terms of performance, with most of the serious ones either rendering asap or on the next frame (when vsync'd)
- sime2009 9y agoand why would your experience of one terminal app based on Electron apply to all other terminal apps based on Electron? You even say that you don't notice latency in VSCode. A text editor and a terminal have similar problems to solve.
- AndrewCHM 9y agoNever said it applied to all electron terminals I would of tested this one, but no windows build, and I'm not using a linux install atm editors don't roundtrip to a separate application through multiple buffers (bash, zsh, fish, or whatever) to decide if they need to show a color or letter or nothing
- desireco42 9y agoFish seems to work wonders for me. I've been using it for more than a year and it works well. I welcome new developments for sure. Autocomplete that was a little bit laggy on zsh simple works super fast on fish. Other features are also very nice. I think people who might be interested in this, might find fish interesting.
- andreyazimov 9y agoGreat job!!!
- bfrog 9y agoYay another mediocre electron app to waste computer resources on a trivial computing task!
- yazanator 9y agoWhile I'm a sucker for beautiful terminal emulators, functionally, I can't use it yet. Vim with scrolling using the fn keys doesn't work, seems to get frozen. Tmux doesn't work on it either. In theory, I'd be a user in the future if I can customize it to my liking the way I can with iTerm2, but for now, I won't be adopting it. Starred the repo, so I'll be on the lookout for future updates :)
- haskman 9y agoThat's strange. Vim and tmux work fine for me on MacOS.
- tbrock 9y agoI don’t get the hate for things built on electron. The technology is awesome. Have some patience. It will eventually improve to the point where it is very low overhead and provides much richer experiences than we have in the terminal today. Nobody is forcing you to use it today. Just be supportive because we want it’s future.
- soulbadguy 9y ago> Have some patience. It will eventually improve to the point where it is very low overhead and provides much richer experiences than we have in the terminal today. This is a very optimistic of framework/technology performance. > Nobody is forcing you to use it today. Just be supportive because we want it’s future. Using web stack for desktop application wasn't a technological choice. It's a much more a reflection of the inability of our industry to cohesively innovate
- juancn 9y agoI don't think I'm ready to use a terminal written in Javascript. I don't have enough ram in my computer for that.