Hacker News new | past | comments | ask | show | jobs | submit login
Github1s – One second to read GitHub code with VS Code (github.com/conwnet)
1692 points by tardismechanic 21 days ago | hide | past | favorite | 214 comments



There are software projects that get posted once in a while on HN that are on a completely different level of quality, whether it's product, UX, or tech. This is one of those posts.


This one is amazing. I've cloned so many repos locally with the only reason to explore them with the comfort of VS Code.


I really wish it had Cmd+P support for searching for project files.

I find the project a really cool concept, but am genuinely curious what real value this is adding in it's current incarnation? Navigating the folder structure is kinda nice, but I don't see much else.

Am I missing something obvious?


> what real value this is adding in it's current incarnation?

Ctrl+Shift+F works. I've forgotten how many repos I clone off github just to be able to search all through the code.


> Ctrl+Shift+F works

It's not working for me (it's also the first thing I wanted). It only seems to search through files that are already open in an editor tab. E.g. in the vscode repo linked from the README search for "nodeModulesPath" and no results, but open bootstrap-node.js and it's there on line 22.


Github allows you to search through repositories as long as they're not forks.


GitHub search is notoriously poor, though—it can only match whole words (e.g. the query "FooBar" does not match the text "FooBarBaz"), and it doesn't support regexes.


And way worse it doesn't even keep word order and similar.

So searching for `fn foobar` will return any file containing the words `fn` and `foobar` not caring about you looking for `fn foobar`.

Then if you find what you want opening the preview doesn't jump to the right line in the file so I have to search again using "find in page".


If anyone is looking for actually useful cross-repo search: https://grep.app/


This is great, thank you.


In addition to the flaws mentioned by the other commenters (whole word only, no regexes), Github will only search the master branch of a repo, which makes it useless for my two most common tasks "where did this code used to be used" and "does this unmerged PR manage to remove all of the references to this code in its refactor (incl. in comments/etc)"

EDIT: Unfortunately, it seems like search doesn't work at all on this site, which is a shame. (at least, when I tried to do it on https://github1s.com/rails/rails it failed)


It does have search, but I'd be willing to wager that the normal workflow when using that is "try searching for something, look at the results page, swear, clone, ..."


How does that work? I've never been able to find this option. Also, this tool's search is broken. It searches only the currently open file.


And as long as you’re not trying to do a case-sensitive search.


> I really wish it had Cmd+P support for searching for project files.

Works for me. CTRL+P on Linux though.


> Am I missing something obvious?

Better search, find definition, ...


Search is completely broken for me... for example on https://github1s.com/matryer/bitbar, searching for just the letter "a" returns no results. Am I doing something wrong?


Search appears to only work once the files are cached, if you open a file then close it, search will find it.


Then you need to cache all files, which you were already doing years ago by cloning and browsing locally.

I too see no special value in the end.


Ah, makes sense! Thanks!


It appears to only work for files which have already been opened.


Nothing obvious. I've found Cmd+Shift+P, then delete the > character, works extremely well in place of Cmd+P.


Confirmed CMD+P just worked for me on mac.

Shift+CMD+P does not but without Shift it works


Yeah, I do the same. I feel the thing that's missing is navigate to definitions/declarations (cmd+])


Yup. T'is pretty good indeed. I have told world+dog.


This, so much this!


We are so used to JavaScript SPAs taking a long time to load. People will Webpack it then use a tool to inline CSS and sort scripts. I find it easier and faster to use no loader at all, and manually sort scripts. The build process is less likely to break, because there is none, and it builds instantly, because there is none, it loads directly from the filesystem. Most modern browsers (even with IE11 included) support enough ES6 features that you can write your code directly in the common supported subset.[0] I had a multiplayer game with hundreds of hours of gameplay get on the front page with "loads in less than one second" in the HN headline. (http://vnav.io)

[0]: https://wwwperiodictable.surge.sh


This. This just nails it. I honestly was in awe when I saw this repo, you don’t see these very often on here. So much Tier 1 talent in all aspects - product, UX, and tech.

Flawless execution on all fronts. I’ve always wanted an easy way to preview a repo in VS Code and this is it.


Agreed. This also demonstrates: Does one-thing and does it well.


It surely opens a repo in VSCode, but it doesn't seem to have any language server support built in. For example, if I open a Go repository, I can't navigate code (Go to references, Find references etc). GitHub Workspaces (although takes waaay longer to provision) is better at this. I wish GitHub did a faster loading read-only version like this.


I'm only speculating, but the reason is likely because language servers are not written in JS. I assume electron apps can spin up arbitrary processes, allowing for a language servers to be written in anything. It'd be neat to see these language servers compiled to WASM and run as a web worker, although I suspect vscode isn't setup for that.

I think Codespaces is able to pull it off because the language servers, and vscode itself, is really running on Github's backends. They've set up the frontend to connect to a remote host.


I handle this by firing up a Fargate instance with a Docker container pre-configured for VSCode Remote SSH. Then once you connect to it, you can install whatever language server you want assuming it's not baked into the Docker image. An EFS mount persists my sources across runs too, and I can scale it up to whatever size Fargate instance my development of the day needs.

Would be cool to tie it into this.


Thats the trade off. If you have everything supported upfront then the loading performance would be abysmal and it would take 2 minutes to load the entire app on a desktop machine. This is perfect for browsing through code.


So surely, it will never make money. :(


why is that a sad face? do things have to earn money to have any worth?


It would be nice reward the author for making something that is useful, not just by patting him/her on the back. I think that is what heyoo is talking about


Creating a useful tool that becomes well known (or a de facto standard) in the community, a successful project you proudly add to your resume, can pay for itself and much more indirectly.


Not as lucrative as profiting directly from it.

I respect non open source software very much. They put hard work into it, and I have absolutely zero, zilch right to ask for its source. I am willing and happy to pay for a service if it benefits me. OSS and non-OSS can coexist. There is no need to bash on non-OSS software. It's folks like you and me, writing code, providing for the family.

Github1s, I could see myself paying $50 for a yearly fee. I would use this thing all the time.


I get the opposite vibe from the parent comment: that usefulness and worthiness is often detached from monetary reward.

How nice it would be for great work to be compensated more fairly.


If it doesn't make money but need to run infrastructure it's not likely to live for very long?


def do_things_have_to_earn_money_to_have_any_worth(dev: Developer) -> bool:

    if dev.strong_financial_background():

      return False

    return True


It can make a shit ton of money through programming job ads.


Good point. I think most people aren't aware that it costs €500 - €1000 to post a single job ad on an important platform.

Of course, the rate will be a lot lower for small companies, but with something like this you'd have perfect targeting. And you don't even need any invasive privacy tracking for targeting: Just let people buy ads on specific repos.

Also, at least in my personal experience, people really don't mind job ads. Job ads are the only ads I regularly click on, because I'm curious what companies are looking for (even though I'm not looking for a job)


If you like the text editor that powers VS Code (Monaco) and would like to use it for writing Markdown on github, check out my foss chrome/Firefox browser extension [1]! It replaces all text areas with a Monaco editor.

[1] https://github.com/hediet/browser-ext-github-monaco


If you’re more of a vim person, check out firenvim:

https://github.com/glacambre/firenvim


Or if you prefer to stay in the terminal: https://github.com/drzel/vim-repo-edit


Seems like a cool extension, will give it a try.

Reminds me of the GhostText[1] extension I used to use for Sublime to sync an input field with my editor.

[1]https://github.com/GhostText/GhostText


That is a cool project, thanks for sharing!


That looks awesome, thanks! Doesn't look like it supports GitHub Enterprise instances though?


Just extending the url match expression should fix that! Currently, it only matches for `github.com`. I don't have access to any Enterprise instance, but I welcome PRs!


Looks great, I'll give it a try. Thanks for sharing!


This would be incredible on Trello!


I never used Trello, what would make this great there? Shouldn't be too hard to implement!


Trello uses a basic textarea for ticket description editing, which makes it a pain for anything more complicated than it is intended to be used for, which severely limits it's use cases.


Feature request: make CMD+P support searching files in the repository. Currently, it shows "No matching results".

To implement this quickly client-side, one easy way would be to use jsdelivr's data api. For example, to get the directory tree for Ruby on Rails:

https://data.jsdelivr.com/v1/package/gh/rails/rails@06e8d5c2...


Maybe the shortcut is different in the browser on macOS, but on Windows CTRL + P just works for searching the project, like it does in VSCode proper on desktop.

I quickly did ctrl + shift + f to search as well and it worked well


It looks like it works for previously opened files. Perhaps the author didn't want to load the whole tree into the browser, or maybe its a limitation on webhosted vscode?


I suspect that the author didn't want to eager-load all files because the API they're using is rate-limited -- 60 requests/hr when unauthenticated, or 5000/hr if you generate a unique OAuth token. Even that 5k could get burned through pretty quickly for a larger repo, assuming you have to make at least one request per file.


This is brilliant.

CodeSandbox also has this. For example, you can import this project in CodeSandbox using link https://githubbox.com/conwnet/github1s (adding box between github and .com)

https://codesandbox.io/docs/importing


godda*n this could've saved me so much time... thanks though!


This is really cool, and has inspired the latest function to be added to my zshrc:

  vscodetmp () {
    local repo=$1
    [[ ! $repo =~ "https://*" ]] && repo="https://github.com/${repo}"
    local temp="$(mktemp -d)"
    git clone "${repo}" "${temp}"
    code --wait -n "${temp}"
    rm -rf "${temp}"
  }


Why not "--single-branch" when cloning? Couldn't it speed up cloning if there are many branches?


--depth=1 (shallow clone, and implies --single-branch)


Now you need a function to move it to a permanent location if you like the project and want to keep it or contribute.


Gitpod.io


I love this, thanks.


It’s very impressive how fast this loads. Every time I’ve integrated Monaco (web-based Visual Studio Code), it takes multiple seconds to render. GitHub Codespaces, the official way to open GitHub repos in a web-based Visual Studio Code instance, loads probably 20x slower than this.


Just briefly browsing the source this is a much more minimal version of VS code--many of the extensions microsoft packages and ships aren't in it. I don't doubt that helps reduce the JS bundle significantly and as a result gives you much speedier loading times. For example there's no terminal or any of its extensions in this version of VS code.


Right. That can be done because this is specifically only for reading code with a VSCode interface.


Codespaces gives you a VM in which you can debug your application, but this service does not appear to do that.


Monaco is just the extensible text editor, right? Nothing else, I thought.


This is neat, but search seems to be broken. I loaded one of my repositories and ran global searches for strings I know exist and they came up with no results. After I opened the file in the web editor, the results would appear in subsequent searches.


The #1 reason I end up cloning a repo and opening it in VS Code is to perform search, so it's a bummer search doesn't work. I'd even give up on the "1s" bit if I could open a full-text searchable version of the repo.


What do you guys think of vim with fzf? You can also use the `tree` command. And it consumes less RAM, probably. Why is it that VS Code seems to be so popular?


It's not that you _can't_ do these things in vim/emacs it's that the experience is different. I'd argue that VS Code is closer to an IDE than just an editor.

For example, I can Cmd+Click on a function usage and it takes me to its definition. If I hover my mouse over it it displays information about the variables/function/data structure/etc. If I'm running docker containers I can attach a shell, view its logs, start/stop/restart it with the click of a button. There are thousands of extensions that allow me to augment the user experience – a Terraform extension that allows me to open resource documentation with the click of a button, running diffs on code, running code formatters, etc.

Yes, all of this is possible with vim/emacs plugins but its not out of the box and the UX is not the same (and you're lying to yourself if you claim this isn't true). Installing and managing all of these plugins (in vim at least) is a lot more painful.

As for the RAM consumption, it's honestly minimal. Running Chrome is more of a resource hog than VS Code.


> Yes, all of this is possible with vim/emacs plugins but its not out of the box and the UX is not the same (and you're lying to yourself if you claim this isn't true). Installing and managing all of these plugins (in vim at least) is a lot more painful.

Nitpicking a bit, but neovim has LSP built-in so you don't really need a plugin to achieve such basic tasks.


It has built in LSP, but I still need a few plugins to get additional functionality like auto complete, auto import (thanks nvim-compe!), definition preview (lsp-saga) etc.

I love nvim too and the direction its going, but the parent comment is correct. Its a lot more painful to set up compared to VSCode.


> ...it's honestly minimal.

then you compare it to something, which is even more "careless" with memory. what does this question has to do with honesty? it's objectively very wasteful. period.

compared to what, though? well, for one, compared to the amount of data it's working with.


Is it high? Yes. Is it completely wasteful? Debatable.

Looking at the memory utilization of my VS Code installation with all of the extension I have is currently using just shy of 200MB. Most entry level laptops today come with 8GB of memory. 200MB out of the 8GB is ~2.5% of the total memory available. If you have 16GB that drops it down to ~1.25%. Yes, vim will use much less memory but let's not pretend you're going to be using all of that memory doing something else (and if you are, you're the edge case). Most of the time it will stay idle, you might as well use it if it's a program you're more comfortable and productive with.

I'm not saying that I'm OK with the amount of resources Chrome and Electron apps utilize but the argument that we don't have enough memory for a few of them, specifically the ones that you use on your day-to-day work is honestly not a strong one.


I agree that with the number you gave (200MB for a primary work tool) it's not that big of an issue, but in general, I strongly disagree with this argument:

> but let's not pretend you're going to be using all of that memory doing something else (and if you are, you're the edge case)

Of course I'm going to be using all that memory. For work, besides the IDE, I also have to run a mail client, an IM client and a browser, and likely a host of other developer tools. Every now and then, I may need to run a build, at which point the resource usage of the computer spikes. If, together, this exceeds available resources, something will have to give. Most likely, everything will slow down, and the SSD wear will increase.

For non-programmer specialists, the same applies, just with different software.

For regular users, the same applies, just with different software and much less resources.

It's the peak usage that matters, not the average. Wasteful software limits the amount of things that can be done on a computer simultaneously. So it's not "we shouldn't care about our software's resource use because users don't do multiple things at a time". It's "users don't do multiple things at a time because they can't, because we don't care about resource utilization".


> It's the peak usage that matters, not the average. Wasteful software limits the amount of things that can be done on a computer simultaneously. So it's not "we shouldn't care about our software's resource use because users don't do multiple things at a time". It's "users don't do multiple things at a time because they can't, because we don't care about resource utilization".

Sure, but how many applications are you running? Let's say you have 20 applications running at 200MB each that's 4GB (50%) of your available memory with an extra 4GB for spiky workloads (if you have 16GB it drops to 25% available memory usage).

We're comparing vim (and other editors) with tools created 25 years later. The available resources back then and now are drastically different. The joke of emacs meaning "Eight Mb And Constantly Swapping" is because most computers back then only had 8MB of memory. In terms of memory consumption emacs utilized 100% back in the day compared to the 2.5% of VSCode today but people don't shit on emacs.

I don't want to come off as someone dismissing vim (and other editors). I personally use vim/tmux on a daily basis but I'm also fond of using IDEs like VSCode/IntelliJ/etc. There is a huge portion of the internet that thinks that these new editors are shitty because of their memory consumption when it is not really a good argument in 2021.


> Sure, but how many applications are you running? Let's say you have 20 applications running at 200MB each that's 4GB (50%) of your available memory with an extra 4GB for spiky workloads (if you have 16GB it drops to 25% available memory usage).

A bunch. Most of them in the background. A lot of them in browser tabs. Good chunk of them use way more than 200MB.

Some applications a typical person may be running that will each use more than 200MB of RAM: garbage audio "control panel" that came with the driver, garbage video card "control panel" that came with the driver, Skype, Steam/Origin/GOG/Ubisoft Connect/EA whatsthename, possibly all of them at once. Facebook (in browser). Messenger (in browser). GMail (in browser). Couple of news articles (in browser). That's all before starting to look at whatever the user currently needs to run to accomplish their goals.

A different example: two years ago, I had a desktop with 8GB of RAM, on which I worked on a software project (remote job). I had it running Linux and trimmed of most of RAM-consuming things, and still I could only run three things - Emacs, our backend, and a web browser with our frontend, Slack and some HN threads. Anything above that would exhaust available RAM. Slack Desktop was out of the question. That's how I discovered Ripcord - turns out you can write a perfectly functional and ergonomic Slack client with close to zero memory footprint, if you give a shit.

Of course I upgraded my machine as soon as I saved up some spare cash, and I sport 32 GB of RAM. And guess what, I've managed to exhaust that too! Thanks to software having memory leaks. The difference between 32GB and 8GB is that I can run some software for 8 hours vs. just one, before having to restart it.

I could go on, but I'll also end with this point: 4GB of RAM is still frequently seen in cheap laptops sold today, and of course common in laptops sold few years ago. This is the kind of hardware a typical non-tech person is going to have. Software bloat directly limits their ability to multitask on their machines.

FWIW, I'm not dismissing VSCode because it uses 200MB more of RAM than it should. It's a pretty lean piece of software for the features it sports. But most modern software is not like that.


VSCode has high quality support for programming languages out of the box, and suggestions for which packages you should install, with one-click install. But you can achieve similar results in vim/emacs with more research, fiddling with config and manually installing deps.


> But you can achieve similar results in vim/emacs with more research, fiddling with config and manually installing deps.

And some people find this fun and enjoyable, and that’s okay. Others find it tedious and obnoxious and that’s okay too. Thankfully there is something for everybody.


It looks like search only works for files that are currently open.


It likely does not pull all the code into localstorage, but only those opened are retrieved as raw?

An actual checkout would exceed 1s ;-)


Yeah, but you'd think you could pull down the directory without pulling down the files? I mean, I love the project either way, and it's already impressive as-is.


If you want more, use gitpod.io


Cudos! You have motivated more than a few today. This is big push to really do one thing very well.

This by far ticks the box for the best project I've seen this year.

Perfect UI/UX clone. Search functionality is very close to desktop VS Code.

Even mind-blowing is the loading speed. At this age and time where some blogs take 2mins to load.


Because this is literally the vscode editor (monaco?) pointed to the github repo, with a github fs backing?


This is amazing for accessibility. Github's own interface is kinda meh with screen readers. This is much better.


I enjoyed replicating just now an analogously fast workflow that shallow-clones a git repo and then opens it in my GUI IDE from the terminal without any other clicking around being necessary.

So I can `pbpaste | git_clone_and_open_in_ide` and be done.


If folks are interested in browsing (and editing) GitHub repos in VS Code without cloning, the GistPad extension might be worth checking out: https://marketplace.visualstudio.com/items?itemName=vsls-con....

It’s not necessarily as convenient as a web client, but it lets you work from your existing/customized editor setup (e.g. theme, keybindings), and it supports editing, branches, commenting, etc.


I love it! You can also author commits with it! I'm missing some really easy way to open a github repository though, ideally a button on github next to clone, like "Open with GistPad".


Github has Codespaces in early release (https://github.com/codespaces/), but much faster


I've been using Codespaces recently, and most recently with PyTorch.

Accessing https://github1s.com/pytorch/pytorch is _much_ faster than accessing PyTorch through Codespaces (because former is a read-only IDE), so this site is useful beyond Codespaces.


That gives a 404.



You need to be invited to try


Brilliant!! Github should make it first class. Most times, I don't need full power of codespace, something leaner(free) just to browse code will be awesome.


That’s it. Black magic. That’s what all of us wanted, that’s what we thought would happen with advances in technology, it just happened!


This is fabulous. I remember something similar 2 or 3 years ago where you could "log in with github" and create commits using VS Code in the browser. Does anyone remember the name? Is it still alive? Iirc it was a very simple name like "code.org" (but not that).


You're thinking of coder.com.

I think it has changed a bit and it's not as easy to get started with their service, but you can still host the server yourself:

https://github.com/cdr/code-server


Thank you, according to https://coder.com/pricing

> No. Coder Enterprise is not SaaS. It is software that you must deploy and run it on your own infrastructure, either a public or private cloud.

That's unfortunate. Very excited to see a SaaS solution by someone soon.

Edit: This seems to be what I'm looking for https://visualstudio.microsoft.com/services/github-codespace...


Or, the GitHub feature page itself (same feature as the one you linked via microsoft.com):

https://github.com/features/codespaces


Gitpod.io using Theia.

And coder.com using code-server


Recently, we can switch the editor of the Gitpod to the VS Code.

Root, Docker and VS Code - https://www.gitpod.io/blog/root-docker-and-vscode/#vs-code


This made me think that VS Code should really just have a "View Github Repository" option where you paste the URL and it opens something like this, except in the normal desktop app. If you want to be elaborate you could even have support for making changes.


If you have the Visual Studio Codespaces extension installed (https://marketplace.visualstudio.com/items?itemName=ms-vsonl...), then GitHub Codespaces (https://github.com/features/codespaces currently in beta) gets you a workflow pretty close to this.


I wish it was available for orgs private repos.


Check out Dingo extension for VS Code, does exactly that for GitHub URLs + for npm packages by name too: https://marketplace.visualstudio.com/items?itemName=WallabyJ...


How does this magic work? Does VS Code run completely in the browser?


90% of VS Code is typescript that already works fine in the browser. There's just a small layer of nodejs to interface with the local filesystem and run processes. Quite a few projects have existed that pull the core of VS code out into the browser and reimplement the small platform layer on their own:

- Eclipse Theia: https://github.com/eclipse-theia/theia

- Coder: https://github.com/cdr/code-server

I'm sure there are countless versions for mobile that are hasty Cordova-based versions of the VS Code core too.


Actually no. On mobile I use termux with coder's code-server and chrome/vivaldi as there is no electron for Android. Not aware of any Cordova based one's.


VS Code is essentially a browser app based on Typescript(Javascript) and html. You can even open the chrome dev tools in VS Code (Help -> Toggle Dev Tools) and inspect the html and javascript of VS code. You can also go so far as to change the CSS and html of vs code in the dev tools. Try using the element picker (top left icon in the dev tools) to select an element in vs code, and you'll see that each line of code is a div and each token is a span that is syntax highlighted by CSS classes.


The desktop app runs on electron, which is Chrome under the covers, so I imagine it doesn't take a tremendous amount of work to just run it straight in the browser.



The world is starting to scare me. I think I'll go live under a rock and wait it out until the pendulum swings back and people stop thinking of the browser as their OS.


(Electron = Chromium minus tab bar and window borders)


Plus a Node.js API to interact with the host and create windows, and an IPC system to communicate between the renderer and node processes


I mean, it already basically does


This is absolutely amazing! I frequently reference Github repositories while developing so this helps me a lot. Thanks to whoever made this!

(side note: I wonder if someone could/has made a similar tool for vim; that way I can stay in the terminal)



Oh VS is just JavaScript, but how exactly does this work? I couldn't tell by reading the code except that it does have src/vs that has what looks like a subset of the Microsoft code files in it.


Could not get it to work with private repos even after using an API token, is it supported?


I was able to test github1s for private repos after generating a personal access token, and pasting it into the Set OAuth Token screen (via little github1s icon in the sidebar).

After this was correctly configured, the "Status" indicator on the welcome page turned green and now says "Authorized" (instead of the yellow "Unauthorized" that I initially saw)


Same here, that would be a really useful thing for my organization.


Would it be possible to view personal private respository code with this?

I'm not sure what it would take to make that happen.


I'm not sure that would make sense for this tool.

This tool is to quickly investigate a codebase you've never seen through the façade of a familiar tool.

A "personal private repository" isn't code that you've never seen or are unfamiliar with.


My organization has hundreds of private repos. It would be great to use this tool to explore those.


+1. This would be an incredibly useful tool when I have to search private company repos I'm unfamiliar with. Currently I use GitHub's 'search current repo' functionality but it's not great.



Interesting product, thanks!


Note the "personal" qualifier in the comment.


I often browse private code in github when I intend to store or share links to certain lines in our codebase. e.g. to use in tickets or PRs, or during Slack discussions.


Very useful, thanks. This will also be handy as a browser plugin - like click on an icon to switch to vscode view.


Don't think it needs a plugin, could just be a one-liner bookmarklet e.g.

javascript:window.location.host = "github1s.com";


I think a plugin would actually be great if it doesn’t take you out of your history state. The two views could live in the same page with parallel DOMs. Navigating GH is already iffy for back/forward nav without introducing another host into the mix


Holy smokes—worked fast and smooth on my phone too! Well done!


Gamechanger my man! This is so good it warrants a browser extension to add a button to all repos to View in VSCode.

Kivubg ut


Github already has that feature, every repo has an "Edit in Codespaces" button to press: https://github.com/features/codespaces


It’s still in early access, so most of us don’t have it yet.


This is cool and I hope they don’t run into copyright issues with the domain, which they probably will. Trademark lawyers basically have to go after violations otherwise they risk losing control of the mark. Maybe GitHub could be nice and license it to the project for free.


This was my first thought as well, I would not be happy if people started to use my business name in similar-looking domains. Also, you have to defend your trademark.


This is similar to the idea of Codespaces from Github https://github.com/features/codespaces


it'd be interesting to have language servers also working (i wonder if it's possible to run language servers as local service workers on the browser), so that you can also navigate via symbols.


I'm confused how to use this. Do I need VS Code installed and/or do I need to open the URL through VS Code? The readme doesn't seem to offer much guidance, and any time I visit any 1s repo (even the example https://github1s.com/microsoft/vscode link in the readme), I just see a blank, white page.

People are talking about loading pages on mobile, so it doesn't seem like VSC is needed...


You are either encountering a bug then, or your internet might be too slow? I also see a blank white page for a split second until the editor/viewer loads up.


I don't have VSCode installed at all, and I don't get the blank page.

Did you check the debug console of your browser for errors? Also check you have Javascript enabled.


Ah, I do indeed have console errors.

https://i.imgur.com/19gU4tl.png

On Chrome 80 / Ubuntu, FWIW. Was under the impression optional chaining was valid JS without transpiling, but who knows. Either way, loaded it up just fine on my Windows box to check out -- looks super useful!


I was a little bit confused reading what this project was..

It's early and was thinking it was some VSCode extension thinking : "Okay, kinda quirky but big deal?"

Then it hit me.. This is outstanding!


I'm trying to reverse engineer how it works..

It is a static webpage, hosted on Github Pages https://conwnet.github.io/github1s

And, here is the static webpage source-code: https://github.com/conwnet/github1s/blob/gh-pages/404.html


See under extensions/ https://github.com/bridgedxyz/github.surf

It's basically all custom scripts to replace extra code to origin vscode repo.


github1s.com doesn't seem a very fortunate domain name as it's obviously based on github.com - it's well plausible that it will be taken down sooner or later.


Afaik raw.githubusercontent.com was third party as well and lived for a very long time.


That's official, you're thinking of https://rawgit.com/


How did it end up being absorved by GitHub? The "raw" button in the file views use that domain now.


This link showed up on /r/programming yesterday. Everyone is freaking out that the domain is registered from China.

https://www.reddit.com/r/programming/comments/lfpngg/explore...

hackernews doesn't seems to care, which is ironic in many levels.


Can you explain the irony? Just trying to get a feeling for the whole China thing.. For example I have noticed that some people have a lowly view of TikTok because it's Chinese. I understand the privacy aspect of it, I don't trust Chinas data policies myself (and slightly more trust ours or rather our ability to implement them securely), but is there also a factor of "the Chinese are getting really good at inventing things", too?


With the leverage we're all getting out of the Monaco editor component, can somebody give that team at Microsoft a Touring award or something?


This is brilliant. Should be a core part of GitHub


No it shouldn't. IDEs come and go.


This is awesome, would be great if there was a chrome extension or addon for Octotree, so you could click a button to open the repo.


While this is a move in the right direction, Gitlab has had a similar feature for years, and it's not read-only.


How does this feature work on Gitlab? Can you link a doc? Is it VS code as well?


See: https://docs.gitlab.com/ee/user/project/web_ide/ It's a lightly re-skinned version of the monaco code editor that VS code also uses. It looks and feels like VS code.


Can private repos be supported in any way?


It appears they could be supported at the moment. In the sidebar there is a GitHub1s Settings menu (the bottom) and in that you can supply your own OAuth/App token to increase your request rate limit, but by delegating access to that token to your private repos you should be able to read your own or chosen/owned private repositories (the caveat being you're giving this app that token outside of a normal OAuth login flow, so I'm not sure how comfortable someone would be with doing that - it seems a normal GitHub OAuth sign in flow could be investigated).


What a nice feature. Octotree[1] is a Chrome extension which does that fantastically. It also supports Enterprise Github in Pro version.

[1] https://www.octotree.io/


Really nice! Is there any way to enable light mode? I find dark mode hard to read.


How does this compare to Octotree browser extension in terms of main uses?


Really cool concept, however language service and file search don't quite work (even for TypeScript projects) due to lazy loading of files and directories.

Still, its almost there! Can't wait!


this is great/neat but took me awhile to understand what it was from the name. One second implies time of reading or...I dunno it's just confusing/unclear.


how about https://github.surf/. ? This supports also CLI "surf ." and browser extension by default.

https://github.com/bridgedxyz/github.surf


This is incredibly cool!!! I don't know to what extent this is affiliated to GitHub, but if it is not it should be definitely bought/incorporated


would be cool if you could fork the repo and make pr


It'd be nice if it could lazily clone the repo in the background so the search functionality would work as more files are indexed.


I found github.surf

github.surf this works same as github1s, but i like it more for no reason lol.

e.g. github.surf/matchabot/matcha-bot


Thanks, I love it.

Also goes to show how GitHub's simple but well thought out url structure continues to pay dividends in unexpected ways.


Except for branches with slashes in them... https://github.com/conwnet/github1s/issues/22#issuecomment-7...


Amazing. It even works great on my phone. This is one of the best things I've seen on hacker news.


Pretty cool, but I would assume this depends on internet speed for left nav items? no?


Thanks for this one! I really needed something like this to explore github repos.


That domain name is probably going to run them in trouble though =/


I'd love to see this hosted internally and used for code reviews.

Very cool project !


Is it safe to just give this an OAuth token for private repo access?


This would break some github's geo-blocking repos.


Yes I need this in my life, for Bitbucket.


Search broken. So what is the benefit?


That was more than one second. Fail.


Why not make GitHub fast? Why do I have to use an editor embedding a web browser instead of using a web browser?


Yes I need this for bitbucket.


This is insane!!!!!!!!!!!


Really nice product


not sure the benefit, but it does work well


Fantastic <3


Brilliant!


[flagged]


> Wtf happened to HN?

> This is a fucking wrapper around an open source text editor

People like you are no longer receive attention for shouting and throwing a tantrum. You and your negative comments are drowned out.

So, what happened to HN? It has improved. Hop aboard and take a swig of positivity buddy.


He's commenting on the fact that no one here seems to understand the author did ZERO UI/UX WORK. He wrapped an existing tool.

Made something incredibly useful, but wrapped an existing tool. The praise is completely misguided.

I prefer a world where people get praise for something praiseworthy. Not an army of people who say things like "take a swig of positivity buddy".


In that case, I regret that I'm unable to offer you praise for your comment.


I think that the loading speed is really a technical achievement. I don’t even know how it’s possible when just executing a git clone of a repository can take upwards of 10 times longer than what this website is capable of. Let alone the rest of the work of getting those files into the vscode editor. Even if he just pointed it at GitHub- GitHub itself loads slower than this!

On the other hand, I agree that a lot of people seem to think that OP has recreated vscode from scratch, which seems to have led to a lot of over the top praise. “Obviously” this is just an embed of the Monaco editor, which is still very cool mind you, but not a towering UX achievement or anything.


If you open your browser's network panel, you can see the secret sauce here: GitHub's API. Each time you open a file, the UI makes a request to GitHub's API for the content. That's why it's dramatically faster than cloning a repo; instead of pulling the entire history of the repo upfront, it dynamically requests only the files viewed.


So I guess this explains why search doesn't work as expected.


UX is not just UI.


wtf are you talking about? I don't see any comments praising the author for writing the UI.


See this top level comment: https://news.ycombinator.com/item?id=26087077


One comment that's not even on the first page of comments.


I'm sorry you're having a bad day.


I wouldn't get too attached to this tool, folks. Github lawyers are not going to be happy with this domain directly infringing on their copyright and are almost certainly at this very minute sending cease and desists. Even if they like the tool and want to see it succeed, the domain is a bit of a fishing and spam risk for them. Best case Github tells them to knock it off and suggests a different domain they use.

Gitpod has been around for a few years and offers the exact same service but on a more distinct gitpod.io domain: https://www.gitpod.io/docs/getting-started/#prefixed-url


Ok one second is an exaggeration and I can't scroll to read in my iPhone, maybe Github10sdesktop would be more realistic. But cool anyway


Scrolling works fine on my iPhone (11). However no keyboard pops up when going to an editor pane. I can move the cursor about though.


Editing is not a feature yet, even on desktop. That's why your virtual keyboard doesn't appear.


Basically the same experience as any Monaco editor on my phone. I’ve recently tried to do quick code experiments on my phone while taking a break on a variety of platforms... basically none are usable. Maybe you were expecting something to be comparable to an existing experience? If so please share.


Code Mirror 6 is supposed to be focusing on mobile-first usability: https://codemirror.net/6/ The creator just had a talk at Fosdem a couple days ago too: https://fosdem.org/2021/schedule/event/codemirror/

I am super excited about a usable mobile code editing experience, and am really surprised how much monaco has languished and failed to deliver here.




Applications are open for YC Summer 2021

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: