GithubHelp home page GithubHelp logo

vercel / hyper Goto Github PK

View Code? Open in Web Editor NEW
43.6K 479.0 3.5K 23.96 MB

A terminal built on web technologies

Home Page: https://hyper.is

License: MIT License

JavaScript 0.20% HTML 0.27% Shell 0.97% Batchfile 0.04% TypeScript 98.12% NSIS 0.40%
terminal javascript html css react terminal-emulators hyper macos linux

hyper's Introduction

Node CI Changelog #213

For more details, head to: https://hyper.is

Project goals

The goal of the project is to create a beautiful and extensible experience for command-line interface users, built on open web standards. In the beginning, our focus will be primarily around speed, stability and the development of the correct API for extension authors.

In the future, we anticipate the community will come up with innovative additions to enhance what could be the simplest, most powerful and well-tested interface for productivity.

Usage

Download the latest release!

Linux

Arch and derivatives

Hyper is available in the AUR. Use an AUR package manager e.g. paru

paru -S hyper

NixOS

Hyper is available as Nix package, to install the app run this command:

nix-env -i hyper

macOS

Use Homebrew Cask to download the app by running these commands:

brew update
brew install --cask hyper

Windows

Use chocolatey to install the app by running the following command (package information can be found here):

choco install hyper

Note: The version available on Homebrew Cask, Chocolatey, Snapcraft or the AUR may not be the latest. Please consider downloading it from here if that's the case.

Contribute

Regardless of the platform you are working on, you will need to have Yarn installed. If you have never installed Yarn before, you can find out how at: https://yarnpkg.com/en/docs/install.

  1. Install necessary packages:
  • Windows
    • Be sure to run yarn global add windows-build-tools from an elevated prompt (as an administrator) to install windows-build-tools.
  • macOS
    • Once you have installed Yarn, you can skip this section!
  • Linux (You can see here what your Linux is based on.)
    • RPM-based
      • GraphicsMagick
      • libicns-utils
      • xz (Installed by default on some distributions.)
    • Debian-based
      • graphicsmagick
      • icnsutils
      • xz-utils
  1. Fork this repository to your own GitHub account and then clone it to your local device
  2. Install the dependencies: yarn
  3. Build the code and watch for changes: yarn run dev
  4. To run hyper
  • yarn run app from another terminal tab/window/pane
  • If you are using Visual Studio Code, select Launch Hyper in debugger configuration to launch a new Hyper instance with debugger attached.
  • If you interrupt yarn run dev, you'll need to relaunch it each time you want to test something. Webpack will watch changes and will rebuild renderer code when needed (and only what have changed). You'll just have to relaunch electron by using yarn run app or VSCode launch task.

To make sure that your code works in the finished application, you can generate the binaries like this:

yarn run dist

After that, you will see the binary in the ./dist folder!

Known issues that can happen during development

Error building node-pty

If after building during development you get an alert dialog related to node-pty issues, make sure its build process is working correctly by running yarn run rebuild-node-pty.

If you are on macOS, this typically is related to Xcode issues (like not having agreed to the Terms of Service by running sudo xcodebuild after a fresh Xcode installation).

Error with C++ on macOS when running yarn

If you are getting compiler errors when running yarn add the environment variable export CXX=clang++

Error with codesign on macOS when running yarn run dist

If you have issues in the codesign step when running yarn run dist on macOS, you can temporarily disable code signing locally by setting export CSC_IDENTITY_AUTO_DISCOVERY=false for the current terminal session.

Related Repositories

hyper's People

Contributors

dependabot[bot] avatar dependabot-preview[bot] avatar labhanshagrawal avatar rauchg avatar chabou avatar leo avatar stanzilla avatar matheuss avatar juancampa avatar greenkeeperio-bot avatar ppot avatar albinekb avatar ekmartin avatar freebroccolo avatar mrrio avatar marcbachmann avatar dotcypress avatar c0b41 avatar flybayer avatar dfrankland avatar hharnisc avatar timneutkens avatar timothyis avatar danielbayerlein avatar davegomez avatar ivanwonder avatar lgeiger avatar iamstarkov avatar anaisbetts avatar bet4it avatar

Stargazers

Low Front avatar Starlight avatar Florian Bütler avatar HPWLMTSM avatar  avatar itsLittX avatar Bilal Alam avatar  avatar Faruzan avatar Danila Molchanov avatar Meet avatar  avatar Hans Zaunere avatar Andre Reves avatar  avatar Alejandro González Momblán avatar Joseph Luo avatar 서채운 avatar gunk1n avatar Placid Akat avatar 桜海 - S4qula avatar Michael Anthony Leal Costa avatar Meghdip Karmakar avatar asdas12312weq avatar  avatar Skale.io Developer Account avatar  avatar vb avatar Peharge avatar  avatar Joshua Daniel avatar Rock_Kong_20th avatar  avatar Bjorn avatar  avatar Christian Lockley avatar Philip Kondratenko avatar  avatar Markus Rauhalahti avatar  avatar  avatar Samuel avatar Navid Talebian avatar Dominik Gedon avatar grmshaw avatar  avatar Frank avatar Marcel Stiebing avatar Kamil Mielczarek avatar katto avatar  avatar GQ avatar  avatar Nmf avatar 壳壳中的宇宙 avatar modertok avatar Jay Gopalan avatar Dylan Liao avatar Thenagi avatar  avatar Coder Roger avatar Jen C. avatar kepler avatar Berezhnoi Ruslan avatar Brian Caldera avatar  avatar 除夕 avatar Kishan Delvadiya avatar Electrical Business Solutions avatar  avatar 7eith avatar Prankster 199 avatar Len P. van der Hof avatar Muhammad Wildan Aldiansyah avatar Hmboyd avatar Stump-Mt-Firewood avatar tomato avatar leonLin avatar Stepan Samutichev avatar  avatar John Young avatar  avatar Tuğrul Hakan Gençtürk avatar Gauthier Seyzeriat--Meyer avatar tigerHee avatar  avatar  avatar Renato Trevisan avatar Shiv Kumar Ojha avatar  avatar  avatar Muhammad Abu-bakar avatar  avatar  avatar  avatar NiaML avatar  avatar Shichao Song avatar Marvin Zhang avatar  avatar

Watchers

Kozo Nishida avatar Decors avatar Ladd Hebert avatar Abhik Khanra avatar Bilgehan Zeki ÖZAYTAÇ avatar  avatar Michael Borejdo avatar Chun-Ping (Jeremy) Chang avatar Noam  V avatar Pat Moore avatar Sebastian Markbåge avatar Jonas Enlund avatar Neustradamus avatar Rodrigo Ferreira de Souza avatar  avatar evandrix avatar Rakhmad Azhari avatar Hu Kaiou avatar Andrew Bekesh avatar  avatar yury avatar Camilo E. Hidalgo Estevez avatar Jandy avatar  avatar  avatar Roengrit Duangkamchan avatar Di Wu avatar Cristopher Gonzalez avatar 김민석 avatar Gerad Munsch avatar 木家彤 avatar Joan Barros avatar Fred avatar Adam Luong avatar Pip And Peel avatar Jolly Blume avatar Alistair avatar Flávio Zantut avatar  avatar Ghamoti Anye Angwafo avatar Aras Can Akin avatar Satish Goda avatar GYPSYMAO avatar Wenhua (Will) Yang avatar Yaomin Xu avatar aliraza avatar Lucas F. Souza avatar Robin Matthews avatar HoNooD avatar Laurențiu Dobrotă avatar Basil avatar hz2004 avatar Carter Bailey avatar Manuel Andres Garcia Vazquez avatar Dima Voytenko avatar xiaoxian avatar Kaique Silva avatar Jeff Smith avatar Patrick Horlebein avatar Calliope avatar James Cloos avatar  avatar Jim Morrison avatar yuan avatar Mark avatar Peter Conradie avatar SANCHEZ Benjamin avatar Christopher Milton avatar Joseph Scaduto avatar Thiago Gonzalez avatar Edgar Ulysses Joya Carballo avatar Krister Kari avatar Yavor Punchev avatar Yuan-Hong Zeng avatar Tom Siwik avatar klou avatar Darth Beren avatar Cem Bakar avatar Terry She avatar Manish Jain avatar  avatar Tiago Manuel Ventura Loureiro avatar James Shen avatar Michele Venturi avatar Patrick Luzolo avatar Cindy Wu avatar Zlatko Anušić avatar ShFu avatar Graymic avatar zhangaz1 avatar Dmitry Pronin avatar  avatar jacky avatar Andrew Gadzik avatar Wilfrido Nuqui Jr. avatar  avatar Sayyid Shaban avatar Francisco Zavala avatar Kenn avatar Moisés Cruz avatar

hyper's Issues

Command + , (settings) should edit `~/.hyperterm.json`

We can accomplish this by opening a new tab and writing:

'$EDITOR ~/.hyperterm.json\n'

to it :D
Perhaps also we can write a test for the absence of $EDITOR in the same command to warn in red letters about not having configured an editor and to try manually.

Non-retina text rendering is bad

There's a rule, presumably down in Electron, that is setting -webkit-font-smoothing: antialiased for x-screen. Perhaps I'm extra sensitive to this, but this looks absolutely terrible on non-retina screens. When I toggle that rule in the inspector everything looks great. Personally I think that also looks better on a retina screen. It might be worth considering enforcing subpixel-antialiasing (IMO always, but could be on a media query for < 2 pixel density), or eventually some setting even.

Implement font size <Term> property

From the perspective of it'd be more elegant if we simply alter in the render loop.

Then we can capture it in shouldComponentUpdate and manually perform the transformation on the local term reference and return false.

(from #34, ping @jhaynie)

Colors

Terminal colors are slightly different (not respected?)
see

Hyperterm:
screen shot 2016-07-05 at 02 25 00

Terminal:
screen shot 2016-07-05 at 02 25 12

build script is missing

package.json doesn't list build in its scripts but package.sh suggests it should be there :) do you have commands for that and for a watcher or is it just browserify/etc?
EDIT: found the webpack script in app :)

Feature request: CMD-K to clear scrollback (or perhaps ability to remap CTRL-L)?

On Mac OS terminals, the default command to clear scrollback is command-k, which my fingers are trained to use often. Looks like the closest similar behavior is clear or CTRL-L in hyperterm (although it doesn't clear, just puts the prompt at the top, which is a completely acceptable alternative for me). Might be nice to have this functionality for users switching from mac terminal

Allow custom stylesheet

Allowing a custom stylesheet offers a lot of possibilities to make hyperterm like home, for example changing the font and font-size.

It could be implemented with the simple convention of having a style.css (maybe style.less) in ~/.hyperterm/.

Better updates system

screen shot 2016-07-03 at 4 29 20 pm

Goals and improvements over the ugly hack we have:

  • Downloads and installs on the background, only prompts the user to restart
  • Single-click restart
  • Dismissable
  • Green instead of red

Assets:

  • Icon icon.svg.zip
  • Background color: #7ED321
  • Dismiss link color: #528D11

Thanks to @matiastucci for bringing this electron API to my attention.

What is the end goal of the project?

Hi,

I'm using this already and I really like the aesthetic and of course the fact that uses web tech. Kudos for having something usable day to day so early.

I was wondering though what your vision of what hyperterm will look like is. I've been toying with the idea of a web/electron shell for a while, but my thinking for building a web tech based terminal emulator is to be able to use complex UIs, not to provide a seamless xterm experience using web technologies.

Is the end goal of the project to be "the Atom of terminals"?
Do you plan or making it extensible so rich media can be embedded, for example as a result of a command execution (showing image thumbnails on ls is the example that comes to mind)? Or is the goal to have it always be 100% compatible with current terminal emulators?

Thanks!

Extensions API

Continuing from the "Allow custom stylesheet" thread (#10).

The way I want to do this is directly with the JS extensions API. You would basically register a plugin that registers CSS.

The sample extension we'll have is one that makes the theme light during the day and dark at night. This will show off adding CSS and also adding a bit of JS logic, so it's a good all-around example.

I'll probably use webpack in the example build step so that you can require('./something.css'). People that want to use sass can simply use a sass loader or add another step to get the .css from the .sass.

update interval

Default update interval runs every 5 seconds. this should run way less frequently.

Expose process API from webview

The webview should be able to execute processes and also know the ttyname.

That way, the index.js does less, we don't need to maintain subscriptions for title publishing, no blur / focus, etc. will execute the commands directly.

Uncaught Exception: Expected 48 got 47

Exception occurs after trying to run npm run launch and produces this error.

> hyperterm@0.1.0 launch /home/proxima/Desktop/hyperterm-0.1.0
> electron index

App threw an error during load
Error: Module version mismatch. Expected 48, got 47.
    at Error (native)
    at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:158:20)
    at Object.Module._extensions..node (module.js:568:18)
    at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:158:20)
    at Module.load (module.js:456:32)
    at tryModuleLoad (module.js:415:12)
    at Function.Module._load (module.js:407:3)
    at Module.require (module.js:466:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/proxima/Desktop/hyperterm-0.1.0/node_modules/child_pty/lib/child_pty.js:1:90)
A JavaScript error occurred in the main process
Uncaught Exception:
Error: Module version mismatch. Expected 48, got 47.
    at Error (native)
    at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:158:20)
    at Object.Module._extensions..node (module.js:568:18)
    at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:158:20)
    at Module.load (module.js:456:32)
    at tryModuleLoad (module.js:415:12)
    at Function.Module._load (module.js:407:3)
    at Module.require (module.js:466:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/proxima/Desktop/hyperterm-0.1.0/node_modules/child_pty/lib/child_pty.js:1:90)

Node & npm versions
node -v5.1.0
npm -v3.8.1

OS
Arch Linux 4.6.2

Default OS X keyboard shortcuts are not working

I use cmd+h to hide all windows belong to an app (can't remember if it's default OS X behaviour or not). It's working in other Electron apps, such as Slack and Atom, when focusing on text inputs. Not sure if this is true for other global OS X shortcuts people have set up.

Edit: I tried with cmd+option+m for minimizing the current window, which isn't working in Hyperterm.

Version: 0.2.1.

Switching tabs with `CMD+Shift+[` `CMD+Shift+]`

This is funny, I had a conversation about switching tabs via arrows vs [] with many people, the split is right there in the middle.

I'd definitely love to see CMD+Shift+[ and CMD+Shift+] working in Hyperterm.

Extend README.md

A few things we need in there:

  • What is hyperterm? Why does it exist? Why is it special? (aka. "Description")
  • Screenshot or GIF showing usage
  • How to contribute

I also think that we should convert all "TODO" items into issues (makes them easier to manage and discuss about with the community).

Split panes

Hey! I'm loving using this so far, there's only one thing missing that helps me with my workflow.

I'd love to see multiple panes in tabs. For example, you could use CMD+D for a horizontally split pane or CMD+SHIFT+D for a vertically split pane from the currently selected. I don't have any particularly good ideas on how to navigate the panes with keyboard commands. Atom uses CMD+K then CMD+[directional arrow] to navigate between split panes.

Anyway, I'd absolutely love to see this feature in hyperterm, I hope it's possible!

Editor width doesn't match terminal width

  • Shell: zsh
  • Editing files with vim or nano

Steps to reproduce

  1. Open Hyperterm
  2. Make the app window a bit bigger with your mouse
  3. Open a file with vim or nano
  4. Long lines get wrapped before the end of the terminal window.

screen shot 2016-07-02 at 3 04 31 pm

No close button on an individual tab

It's only possible to close a tab by hitting cmd+w, which perhaps shouldn't be the only way of closing a tab.

Version: 0.2.1

(I'm filing a bunch of UI stuff now, to keep track of them. Can be triaged).

Alternative shortcut for exiting website

I presumed I could exit a website with ctrl + c - similar to other terminal processes and it took a little while to figure out it was command + w. Not a big deal, but thought I'd mention :)

Hyperterm 0.2.1 cursor issue

Hi!

In the last update the cursor has an issue, it's not aligned with the input line:
screen shot 2016-07-03 at 20 17 33
screen shot 2016-07-03 at 20 19 50

Also, there is a scrollbar by default

Heuristic for error activity

When a tab becomes active, at the moment we show it in blue:

image

We do this by simply capturing new data to write to the terminal. What we can do: if /error/i matches the data we pass along, we can make that label red instead.

A red tab is orders of magnitude more interesting in terms of prioritization of attention than a blue tab.
There are opportunities for false positives, but I can't think of many.

Do you think this is too obtrusive and error prone for us to ship with, and therefore should be an extension?

Keyboard shortcuts don't work when closing a tab with cmd+w

The problem is that we can't give programmatic focus to hterm (it seems) when keyboard events are used. It seems to require a click event, probably due to the fact that there's an <iframe> in the way.

We might need to register all the Mousetrap shortcuts as accelerators in Electron as well.

Babel/webpack modules missing from package.json

Trying to build locally (on Linux) I hit:

ERROR in Entry module not found: Error: Cannot resolve module 'babel-loader' in /home/daniel/dev/hyperterm/app

Installing that then asks for babel-core, installing that leads to an Unknown plugin "transform-react-jsx" error. An webpack watch entry in package.json scripts would be good in addition to more complete devDependencies.

Option-arrow does not act like terminal.app

When modifying commands in other terminal apps (and text editors), option-arrow acts like the b and w commands in vi, jumping to the next word boundary. In hyperterm, it instead prints ;3D and makes the ^G noise.

Note that option-delete acts as expected, deleting to the nearest word boundary.

cmd+k support

In most terminals it seems like the history goes away upon command+k. I personally find this annoying, since later I want to scroll back.

We should make it work like clear, and if people miss the "history cleaning" behavior, we can add it as a modifier (command+shift+k for example).

Special characters and foreign keyboard not displayed correctly

So I use Spanish ISO keyboard (like this one: http://g01.a.alicdn.com/kf/HTB1iOQ8HVXXXXaeXpXXq6xXFXXXd/Spanish-Euro-Keyboard-Cover-Protector-for-MacBook-Air-11-11-6-Inch-European-ISO-Keyboard-Spain.jpg_640x640.jpg), and it is impossible to type some characters.

For example, "special" characters like ¿¡· are displayed like this: <00c2><00bf><00c2><00a1><00c2><00b7>, same with the ñ.

And other keyboard combinations are just impossible to type, my biggest issue is ~, since I need to type Alt + ñ but it just doesn't appear. Same issue with any letter with an accent (á, ö, â, etc).

I'm using zsh, if it matters.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.