GitHub1s

repository·master·Indexed 12 days ago

https://github.com/conwnet/github1s

A web-based tool that allows users to browse GitHub, GitLab, and NPM repositories using a VS Code interface directly in the browser by modifying the URL. It implements a FileSystemProvider using the GitHub REST API and Sourcegraph API to provide a serverless code browsing experience, including support for private repositories via OAuth tokens and integration with Gitpod for full development capabilities.

Tokens
20.4K
Snippets
80
Records
110
Agent score
98%

What's inside GitHub1s

  1. Use the elm-ls-vscode extension for github1s

    master

    The elm-ls-vscode extension is a fork of elm-language-client-vscode specifically adapted for use within the github1s environment. It provides language support for Elm development in web-based VSCode instances.

    Supported Versions

    • Supports Elm 0.19 and newer.

    Features

    • Syntax Highlighting: Provides visual color coding for Elm source files.
  2. Use the OCaml Platform extension in github1s

    master

    The ocaml-platform extension is a specialized fork of vscode-ocaml-platform designed specifically for use within the github1s environment. It provides language support and tooling integration for OCaml development in a web-based VS Code interface.

    Note that this version is a stripped-down fork containing only the necessary code to support language features within the github1s ecosystem.

  3. Use V language support in github1s

    master
    This extension is a fork of vscode-vlang specifically adapted for use within the github1s environment. It provides syntax highlighting for the V language. Note that this version is a stripped-down fork containing only the necessary code to support language features, with other files removed.
  4. How GitHub1s works

    master
    GitHub1s is a browser-based version of VS Code that provides custom file I/O capabilities via a VS Code extension. Instead of a traditional backend, it implements a FileSystemProvider that uses the GitHub REST API to read directories and files. This allows users to browse and edit GitHub repositories directly in the browser without a dedicated server.
  5. Use Sourcegraph API for Public Repositories

    master
    To mitigate GitHub API rate limits, GitHub1s prioritizes using the Sourcegraph API for public repositories. This includes code search capabilities. By default, GitHub1s only falls back to the GitHub API if the Sourcegraph API request fails. You can adjust this behavior in the application settings.
  6. Install the Nim Extension for VS Code

    master

    The Nim extension provides language support for Nim within VS Code environments. It is available via the Visual Studio Marketplace and Open-VSX. This specific version is a fork of vscode-nim optimized for use with github1s.

    Visual Studio Marketplace: https://marketplace.visualstudio.com/items?itemName=nimsaem.nimvscode
    Open-VSX: https://open-vsx.org/extension/nimsaem/nimvscode
  7. Set up local development for GitHub1s

    master

    To run GitHub1s locally for development, clone the repository and execute the following commands:

    $ npm install
    $ npm run watch

    Upon completion, a dist directory will be generated. The command npm run watch includes npm run watch:dev-server, which automatically opens http://localhost:8080 in your browser. If you see 404 errors for static files, wait a moment for the build process to finish.

  8. Develop in the cloud with Gitpod

    master

    For full development capabilities (editing files, running Docker containers, creating pull requests), you can use Gitpod.

    • Click the "Develop your project on Gitpod" button in the status bar.
    • Alternatively, open the Command Palette (Ctrl+Shift+P) and select GitHub1s: Edit files in Gitpod.
  9. Local development using VS Code + Docker (Dev Containers)

    master

    You can use the Remote-Containers extension to develop inside a Docker container.

    1. Install the Remote-Containers plugin in VS Code and ensure Docker is running.
    2. Open the Command Palette (Ctrl+Shift+P) and select Remote-Containers: Clone Repository in Container Volume....
    3. Enter the repository URL: https://github.com/conwnet/github1s.git.
    4. Choose Create a unique volume or Create a new volume.
    5. Once the container is connected, open a new VS Code Terminal and run:
      npm install
      npm run watch
    npm install
    npm run watch
  10. Enable access to private repositories

    master

    To view non-public repositories, you must provide an OAuth token.

    1. Click the icon located near the bottom of the left-hand icon row.
    2. A dialog box will appear prompting for the token.
    3. You can follow the link provided in the dialog to your GitHub settings page to generate a new token if needed.

    Note: The token is stored locally in your browser and is only sent to GitHub when fetching files for your repository.