github1s Documentation

One second to read GitHub code with VS Code.

23,304 stars TypeScript TypeScript 1 file ยท ~12,824 tokens #agent#ai#ide#vscode
RAW Doc

Docker & Self-Hosted Deployment Verified OCI

Deploy github1s on any server, homelab, or cloud container platform.

1-Click Terminal Command
bash (docker run)
docker run -d --name github1s --restart always conwnet/github1s:latest

Technical Documentation: conwnet/github1s

โ„น๏ธ Provenance: Multi-Tier Ingestion ยท CodeWiki Reference

Overview (`README.md`)

GitHub1s

GitHub1s is a browser-based code explorer built on VS Code. Browse files, search code, and review changes without cloning a repository. Connect your preferred model to the built-in AI chat for help understanding the code.

๐ŸŒ Try it now ยท ๐Ÿ“– Usage guide ยท ๐Ÿ”ฎ AI setup

๐Ÿš€ Quick start

Add 1s after github in a repository URL:

text
https://github.com/microsoft/vscode
        โ†“
https://github1s.com/microsoft/vscode

Public repositories can be browsed without signing in, subject to the upstream services' access and rate limits.

You can also browse GitLab repositories at gitlab1s.com and published npm packages at npmjs1s.com. See the usage guide for URL formats, authentication, and navigation.

โœจ Features

  • Explore a project. Browse directories, find files, and search code in a familiar VS Code interface.
  • Trace a change. Switch branches or tags, inspect commits and file history, and review pull or merge request diffs on GitHub and GitLab.
  • Understand complex code. Ask GitHub1s AI about a file or selection, then follow up on implementation details.
  • Access private repositories. Connect your GitHub or GitLab account, or supply an access token with the necessary permissions.

Remote repositories are read-only. Search and code navigation depend on the repository platform and available upstream services; see capabilities and limits.

๐Ÿค– GitHub1s AI

Get a repository overview, explain a file or selection, and ask follow-up questions. The assistant can look up relevant code as you chat.

Click Toggle Secondary Side Bar in the layout controls at the top of GitHub1s to open the AI panel.

Use a model endpoint that accepts browser requests. Messages and code context are sent to the selected endpoint. See the AI guide for configuration and data handling.

๐Ÿ“š Documentation

Guide What you will find
Using GitHub1s Navigation, authentication, search, and troubleshooting
GitHub1s AI Model setup, context, tools, and data handling
Development Local setup, builds, and checks
Architecture Components, data flow, and source layout
Deployment Hosting, OAuth, and service configuration
Community Third-party extensions and star history

๐Ÿค Contributing

See the development guide to run GitHub1s locally. Report bugs and suggest improvements through GitHub Issues.

๐Ÿ‘ฅ Maintainers

conwnet ยท xcv58 ยท Siddhant Khare

๐Ÿ’– Thanks

Thanks to everyone who has contributed to GitHub1s, and to Sourcegraph, searchcode, and OSS Insight for the tools and services used by GitHub1s.

๐Ÿ“„ License

MIT


Overview (`vscode-web/README.md`)

@github1s/vscode-web

This is the companion NPM package to support GitHub1s. The NPM package is @github1s/vscode-web.

Commands

npm run clone - clone the official VS Code repo.

npm run build - build the VS Code with the custom code under src.

npm run watch - watch the code change under src directory and rebuild VS Code.

Usage

The codes in the package can be used independently, See index.html.

Publish

To publish the NPM package, please make sure you have the right access via https://www.npmjs.com/ and run the following commands:

sh
# bump the `version` field in package.json file.
npm run build && cd dist
npm publish --access public

Overview (`extensions/elm-web/README.md`)

This extension is a fork from [elm-language-client-vscode](https://github.com/elm-tooling/elm-language-client-vscode) for github1s.

At present only languages features is reserved

I have deleted some files and only reserved the necessary code

Elm Plugin for Visual Studio Code (VSCode)



Supports elm 0.19 and up

Highlighted Features

  • Syntax Highlighting

Overview (`extensions/github1s-ai/README.md`)

GitHub1s AI

GitHub1s AI is the built-in assistant for exploring code in GitHub1s. It combines chat, file and selection attachments, repository tools, and optional MCP connections with a user-configured model endpoint.

Use the assistant

Open GitHub1s AI: Open AI Settings from the Command Palette to add a model, then run GitHub1s AI: Open Chat.

See the AI guide for model configuration, context, tools, and data handling.

Development

The extension requires GitHub1s's browser workbench and repository providers. See the development guide for running the complete application.


Overview (`extensions/nim-web/README.md`)

This extension is a fork from [vscode-nim](https://github.com/saem/vscode-nim) for github1s

At present only languages features is reserved

I have deleted some files and only reserved the necessary code

Nim Extension

Visual Studio:

Open-VSX:


This extension adds language support for the Nim language to VS Code, including:

  • Syntax Highlight (nim, nimble, nim.cfg)

Overview (`extensions/ocaml-web/README.md`)

This extension is a fork from [vscode-ocaml-platform](https://github.com/ocamllabs/vscode-ocaml-platform) for github1s.

At present only languages features is reserved

I have deleted some files and only reserved the necessary code

VSCode OCaml Platform

Visual Studio Code extension for OCaml and relevant tools.

Please report any bugs you encounter.

Features

  • Syntax highlighting
    • ATD
    • Cram tests
    • Dune
    • Menhir
    • Merlin
    • META
    • OASIS
    • OCaml
    • OCamlbuild
    • OCamlFormat
    • OCamllex
    • opam
    • ReasonML
    • Eliom
  • Indentation rules
  • Snippets
    • Dune
    • OCaml
    • OCamllex
  • Task Provider
    • Dune

Overview (`extensions/vlang-web/README.md`)

This extension is a fork from [vscode-vlang](https://github.com/vlang/vscode-vlang) for github1s.

At present only languages features is reserved

I have deleted some files and only reserved the necessary code

V language support for Visual Studio Code


Provides V language support for Visual Studio Code.

Features

  • Syntax Highlighting

License

MIT


Overview (`workers/discovery/README.md`)

Repository Discovery Snapshots

This Worker collects public repositories from GitHub Search on a schedule, stores complete JSON snapshots in Workers KV, and exposes a public endpoint for reading the latest snapshot.

Preview collection locally

From the repository root, provide GITHUB_TOKEN in the process environment and run:

bash
npm run discovery

The command writes out/discovery/github/latest.json using the same collection logic as the Worker. It does not publish to KV. It accepts no command-line arguments; edit src/collections.ts to change queries.

The collections cover new projects, recently updated projects with fewer stars, highly starred projects, and selected topics. Queries and per-collection limits are defined in that file; the collection names describe those filters rather than a measure of recent star growth.


Ai (`docs/ai.md`)

GitHub1s AI

Documentation ยท Using GitHub1s

GitHub1s AI is the built-in assistant for asking questions about a repository. It can explain attached files or selections and use repository tools to find relevant code. You configure the model endpoint and API key used for each conversation.

Configure a model

  1. Click Toggle Secondary Side Bar in the layout controls at the top of GitHub1s to open the AI panel.
  2. Click the gear icon at the top of the AI panel, then select Models โ†’ Add model.
  3. Enter a Name, choose a Provider and, where available, a Protocol.
  4. Set the Base URL, API key, and Model ID for an endpoint you can access from your browser.
  5. Select Save Model, then click Back to chat.

You can also open the Command Palette (F1) and run GitHub1s AI: Open Chat or GitHub1s AI: Open AI Settings.

The first saved model is selected automatically. With multiple configurations, use the model selector in the chat composer to choose one.

Providers and protocols

Provider Default protocol Other supported protocols Default base URL
Custom OpenAI Chat Completions OpenAI Responses, Anthropic Messages Supply your endpoint
OpenAI OpenAI Responses OpenAI Chat Completions https://api.openai.com/v1
Anthropic Anthropic Messages โ€” https://api.anthropic.com/v1

Use the API base URL, such as https://api.example.com/v1, rather than a complete generation-request URL. The URL must use HTTP or HTTPS and cannot contain credentials, a query string, or a fragment. Use a model ID available through your endpoint.

Browser access

Model requests originate in your browser. The endpoint must support browser requests, including the necessary cross-origin resource sharing (CORS) headers. An endpoint that works from a server-side script may still reject a browser request. Local endpoints can also be affected by the browser's HTTPS and local-network access rules.

Ask questions with context

Start with Repository overview, Explain current file, or Explain selection, or type a question in the chat composer.

Use the composer toolbar's Add fileโ€ฆ, Attach current file, or Attach current selection buttons. The editor action Add to GitHub1s AI Chat attaches the selection when one exists, or the current file otherwise.

Attached content is read when you send the message. Remove a pending attachment with its remove button before sending. Click an attachment chip to open its source file or selection.

Include recent files is enabled by default. It adds up to five recently viewed file paths to the model's context; the assistant can then read those files with its tools. Turn it off in the composer when those paths are not relevant to the question.

New Chat starts a separate conversation and clears pending attachments. Previous conversations remain available through GitHub1s AI: Show History.

Customize responses

In AI Settings โ†’ Prompts, add preferences such as the response language under User Rules, then select Save prompts. Instructions replaces the default assistant instructions, and Quick Actions customizes the starter questions. Leave instruction or quick-action fields empty to use their defaults. Reset updates the form; select Save prompts to save the reset values.

Repository tools

The assistant has four built-in tools:

Tool Purpose
read Read a text file or a range of lines
ls List a directory
glob Find files by a path pattern
search Search text in files

These tools read within the open workspace. Results are bounded: for example, read accepts files up to 5 MiB and returns at most 2,000 lines per call. Long lines and tool output can be truncated, and searches depend on the workspace's search provider. These are tool limits; attached files use a separate context-loading path.

For a large repository, ask about a specific directory, file, or symbol so the assistant can retrieve focused context.

Connect MCP servers

Model Context Protocol (MCP) servers add tools to the chat. Open GitHub1s AI: Open AI Settings, select MCP, and enter a configuration such as:

json
{
	"mcpServers": {
		"example": {
			"type": "http",
			"url": "https://example.com/mcp",
			"headers": {
				"Authorization": "Bearer YOUR_TOKEN"
			}
		}
	}
}

Replace the example URL and token, then select Save MCP settings. Changes apply to the next response. Supported transports are http and sse; local stdio servers are unavailable in the browser. Headers are optional, and the server must allow browser access.

Configured MCP tools become available to the assistant. Their capabilities determine which external actions it can perform; they are not restricted by the built-in repository tools' read-only behavior. Connect servers whose tools you intend the assistant to use.

Save { "mcpServers": {} } to remove all configured MCP connections.

Data and storage

Data Where it goes
Model configuration, including API keys Saved in browser-backed VS Code extension global state; the selected credentials are used for model requests
Messages, attached code, recent file paths, and retrieved tool results Included in requests to the configured model endpoint as conversation context
Conversation history Saved in browser-backed extension storage, separated by workspace
MCP configuration and credentials Saved in extension global state; used to connect to the configured servers
MCP tool calls Sent to the corresponding server; their results become available to the model

The model and MCP services receive the data sent to them under their own service policies. Select endpoints appropriate for the repository content you plan to discuss.

Manage saved data

  • Delete one conversation: open Show History, use its delete action, and confirm Delete.
  • Export conversations: in AI Settings, open General โ†’ Export history โ†’ Export. The JSON contains conversation data for the current workspace, including stored message and tool content.
  • Reset AI data: in General, select Clear all data and confirm. This removes local AI conversations across all workspaces, model settings and API keys, MCP settings, and prompt settings.

Troubleshooting

Message or symptom What to check
Select a model before sending a message. Add a model and select it in the composer
Authentication failure Check the API key and the endpoint account's access
Endpoint or model not found Check the base URL, protocol, and model ID
Unable to reach the endpoint Check network access, CORS, and browser restrictions on the endpoint
Rate limit reached Follow the model service's retry guidance
Missing repository context Attach the relevant file or selection; check whether repository search is available
Unable to load MCP tools Check the server URL, credentials, CORS support, and tool-name conflicts

Architecture (`docs/architecture.md`)

Architecture

Documentation ยท Development ยท Deployment

GitHub1s combines a browser build of VS Code with extensions that expose remote repositories as read-only workspaces. The browser loads files on demand through platform APIs and external code services. Pages Functions handle OAuth callbacks and a GitHub code-search proxy; a separate Worker supplies repository discovery snapshots.

Components

Component Responsibility Source
Web application Select the platform and workspace, load VS Code, and bridge browser authentication src/
VS Code web package Build and package VS Code with GitHub1s-specific source overlays vscode-web/
Repository extension Route repository URLs, provide files and search, and display history and diffs extensions/github1s/
AI extension Manage chat, model connections, repository context, and optional MCP tools extensions/github1s-ai/
Pages Functions Exchange OAuth authorization codes and proxy GitHub REST code search functions/
Discovery Worker Collect public repositories and publish scheduled snapshots workers/discovery/

The root src/ directory is the application entry point. VS Code source overlays live under vscode-web/src/.

Opening a repository

  1. src/index.ts selects a platform from the hostname and extracts the repository or package from the path.
  2. src/config.ts creates the workspace configuration. GitHub, GitLab, and npm use different URI schemes; the GitHub home page opens Discovery.
  3. The repository extension registers adapters and VS Code providers.
  4. A platform adapter parses the URL and supplies a data source. VS Code requests files, directory listings, or search results through the corresponding provider.
  5. The extension fetches data and presents it in the editor, Explorer, or source control views.

The file system providers are registered as read-only. The separate /editor entry opens an editor workspace without mounting a remote repository.

mermaid
flowchart TD
    Browser[Browser application] --> Workbench[VS Code workbench]
    Workbench --> Repository[Repository extension]
    Workbench --> AI[AI extension]
    Repository --> APIs[GitHub / GitLab / npm data services]
    Repository --> Search[Sourcegraph / searchcode]
    Repository --> Proxy[Pages Function: code search]
    Proxy --> GitHub[GitHub REST API]
    Browser --> OAuth[Pages Functions: OAuth callbacks]
    OAuth --> Identity[GitHub / GitLab OAuth]
    Repository --> Snapshot[Discovery snapshot endpoint]
    AI --> Context[Workspace files and search]
    Context --> Repository
    AI --> Model[Configured model endpoint]
    AI --> MCP[Configured MCP servers]

Adapters separate platform behavior from VS Code providers. Each adapter supplies URL parsing, data access, and the views supported by that platform. Start with the adapter types and adapter registration when changing a platform integration.

GitHub data access uses REST and GraphQL. When Prefer to use Sourcegraph API is enabled, supported operations try Sourcegraph first. GitHub text search then falls back to searchcode, followed by GitHub REST code search through the same-origin /api/github/search/code proxy. Definition, reference, and hover results use Sourcegraph separately.

These services have different indexing, authentication, and query capabilities. The usage guide describes the user-visible limitations. The current GitHub fallback sequence is implemented in data-source.ts.

Authentication and data flow

Repository tokens are persisted through VS Code extension global state in the browser. Direct authenticated repository API requests include the relevant token. The GitHub search fallback also sends the authorization header to the same-origin Pages Function, which forwards it to GitHub.

OAuth uses a popup and a server-side callback. The callback exchanges the authorization code for a token, then returns the result to the browser. OAuth application secrets belong to the callback runtime. See deployment configuration and user authentication.

The AI extension has a separate model configuration and conversation store. It sends conversation context and tool results to the selected model endpoint and can connect to user-configured MCP servers. See AI data handling for the boundaries users need to understand.

Repository discovery

The Discovery Worker runs GitHub Search queries on a schedule, combines their results into a snapshot, and stores it in Workers KV. The browser's Discovery adapter reads the public snapshot endpoint and renders repository collections as a virtual workspace.

This service is separate from repository file access. Its configuration, collection rules, and refresh behavior are documented in the Discovery Worker README.

Builds and source overlays

The normal application build uses the published @github1s/vscode-web package, compiles the local extensions, and bundles the web entry with webpack. Output goes to dist/, with assets grouped under a directory derived from the Git commit.

The vscode-web/ build clones the revision recorded in .VERSION, applies source overlays, and packages the result. Keeping that build separate lets most changes use the prebuilt editor. Changes to VS Code itself use the full VS Code development workflow.


Community (`docs/community.md`)

Community

Documentation ยท GitHub1s

Contributing and feedback

Report problems or propose improvements in the issue tracker.
For a bug report, include the repository URL, steps to reproduce it, browser version, and the error message.
Remove tokens and other credentials from logs and screenshots before sharing them.

To work on the project, start with the development guide.

Third-party projects

These independently maintained browser extensions and scripts offer shortcuts to GitHub1s.
See each project's documentation for installation and support.

Chrome extensions

Firefox extensions

Microsoft Edge extensions

Safari extension

Tampermonkey scripts

Star history


Deployment (`docs/deployment.md`)

Deployment

Documentation ยท Development ยท Architecture

A GitHub1s deployment consists of static application assets and, for OAuth and the GitHub REST search fallback, server-side Functions. Cloudflare Pages can host both. Repository discovery uses a separate Worker.

Deployment layout

Part Location Purpose
Application assets Build output in dist/ VS Code, extensions, and the web entry
Pages Functions Source in functions/ OAuth callbacks and GitHub code-search proxy
Discovery Worker workers/discovery/ Scheduled repository collections and their public JSON endpoint

Serve the application at the root of an origin, such as https://code.example.com. Asset paths are absolute; deployment under a subdirectory requires code changes.

Custom hostnames select the GitHub platform by default. GitLab and npm selection currently depends on the hostname rules in src/index.ts; adapt those rules when hosting either platform on your own domain.

Configure OAuth

OAuth configuration is needed for the Connect to GitHub and Connect to GitLab buttons. Users can also supply repository tokens manually.

Create the corresponding OAuth application at the repository provider and register the callback on the same origin as GitHub1s:

Provider Callback URL
GitHub https://code.example.com/api/github-auth-callback
GitLab https://code.example.com/api/gitlab-auth-callback

Replace the origin with your deployment's origin. Set the following variables for each provider you enable:

Variable Stage Value
GITHUB_OAUTH_ID Build and Functions runtime GitHub OAuth application's client ID
GITHUB_OAUTH_SECRET Functions runtime GitHub OAuth application's client secret
GITHUB1S_ALLOWED_ORIGINS Functions runtime Comma-separated allowed origins
GITLAB_OAUTH_ID Build and Functions runtime GitLab application's client ID
GITLAB_OAUTH_SECRET Functions runtime GitLab application's client secret
GITLAB1S_ALLOWED_ORIGINS Functions runtime Comma-separated allowed origins

Use the same client ID at build time and runtime. Allowed origins include the scheme and any port, with no path or trailing slash, for example https://code.example.com,http://localhost:8788. The callback checks its own request origin against this list and returns authorization to the browser on that origin.

Set client IDs in the environment before building; webpack does not load them from .dev.vars or .env automatically. Configure runtime values in the Pages project's variables and secrets for the target environment. Keep OAuth application secrets in the Functions runtime. See Cloudflare's Functions bindings guide for runtime secrets.

The repository also reads GITHUB_DOMAIN, GITHUB_API_PREFIX, GITLAB_DOMAIN, and GITLAB_API_PREFIX during builds. These customize some upstream URLs, but OAuth endpoints and the GitHub search proxy still target github.com and gitlab.com. Supporting an enterprise or self-managed provider requires reviewing those paths as well as platform selection.

Build and deploy to Pages

Use the development prerequisites. From the repository root, install dependencies and build with the client IDs for the providers you enabled:

bash
npm install
export GITHUB_OAUTH_ID='your-github-client-id'
npm run build

Omit the export for a deployment without GitHub OAuth; set GITLAB_OAUTH_ID as well when enabling GitLab OAuth.

For a CLI deployment, authenticate with Cloudflare and create a Pages project if needed:

bash
npx wrangler login
npx wrangler pages project create

Configure the project's runtime variables and secrets, then deploy:

bash
npx wrangler pages deploy dist --project-name your-pages-project

Run this command from the repository root so Wrangler also compiles and uploads functions/. Uploading only dist/ through the dashboard does not include these Functions. See Pages Direct Upload.

With Pages Git integration, use the repository root as the build root, npm run build as the build command, and dist as the output directory. Set the Node version to the CI baseline documented in the development guide.

Preview Pages Functions locally

Wrangler can run the built assets and Functions together. Prepare OAuth configuration before building or starting it if you want to test authentication.

For OAuth, provide the runtime variables in a root .dev.vars file. Before creating it, add .dev.vars* to your local .git/info/exclude; the repository's .gitignore does not currently cover it. An example for GitHub is:

dotenv
GITHUB_OAUTH_ID=your-github-client-id
GITHUB_OAUTH_SECRET=your-github-client-secret
GITHUB1S_ALLOWED_ORIGINS=http://localhost:8788

Register http://localhost:8788/api/github-auth-callback with the OAuth application used for local testing. Then, from the repository root, export that application's client ID, rebuild, and start the preview:

bash
export GITHUB_OAUTH_ID='your-github-client-id'
npm run build
npx wrangler pages dev dist

Omit the OAuth configuration and export for a preview without GitHub OAuth. Open http://localhost:8788/conwnet/github1s. See Pages local development and local secrets.

Other static hosts

To serve the application assets on another host:

  • Publish dist/ at the origin root.
  • Serve index.html for application routes such as /owner/repo/blob/ref/path, while serving real assets directly.
  • Apply the response headers from public/_headers: Cross-Origin-Opener-Policy: same-origin and Cross-Origin-Embedder-Policy: credentialless.
  • Provide equivalent server routes for OAuth callbacks and /api/github/search/code if those features are required.

Pages supplies an SPA fallback when no top-level 404.html exists. Its _headers rules apply to static assets; Functions manage their own responses.

Discovery service

The application reads Discovery from a URL defined in extensions/github1s/src/adapters/discovery/data-source.ts. To use your own service, deploy the Discovery Worker, update that URL, and rebuild the application.

Verify the deployment

  1. Open a public repository and read a file.
  2. Reload a deep file URL to verify route fallback and asset paths.
  3. If OAuth is enabled, connect an account and validate its token in Settings.
  4. Check the /api/github/search/code route. Successful search through another service alone does not verify the GitHub fallback.
  5. Open the home page and confirm Discovery loads from the intended endpoint.

AI model and MCP requests originate in the browser. Their connectivity depends on the endpoints configured by each user; see the AI guide.


Development (`docs/development.md`)

Development

Documentation ยท Architecture ยท Deployment

Most changes to GitHub1s use the published VS Code web package. Build VS Code locally when changing the editor source overlays under vscode-web/.

Prerequisites

  • Git and npm.
  • Node.js 24, matching the repository's CI configuration.
  • A browser for testing the application.

The commands below assume a Unix-compatible shell. Run them from the repository root unless a different working directory is shown.

Run locally

bash
git clone https://github.com/conwnet/github1s.git
cd github1s
npm install
npm run watch

The install step also installs dependencies for the local extensions. Watch mode starts webpack's development server and the repository and AI extension watchers.

Wait for the application and both extensions to finish compiling, then open localhost:8080/conwnet/github1s. The development server uses port 8080 and writes generated assets to dist/.

OAuth callback Functions are not run by npm run watch; use a manually supplied token for repository authentication or follow the Pages development instructions.

Build the application

bash
npm run build

This compiles the local extensions and produces the application in dist/. See the deployment guide for hosting the assets and enabling the accompanying Functions.

Check changes

Choose checks for the part of the project you changed:

Command Coverage
npm run eslint:check Repository lint checks, without automatic fixes
npm run typecheck Root application and Pages Functions
npm --prefix extensions/github1s run test Repository extension tests
npm --prefix extensions/github1s-ai run typecheck AI extension and webview types
npm --prefix extensions/github1s-ai run test AI extension tests
npm run build Production compilation and packaging

For browser integration tests, build the application first, stop any server already using port 8080, then run:

bash
npm run build
npm run test:ci

The test command starts the development server, installs the test dependencies and Playwright browsers, and runs the Jest browser suite. The existing tests launch Chromium, exercise repository loading and navigation, and depend on external repository services.

npm run format formats the whole repository, and npm run eslint applies lint fixes. To format only a documentation change, pass the changed files to Prettier:

bash
npx prettier --write README.md docs/usage.md

Develop with a local VS Code build

This workflow requires the native build tools used by the pinned VS Code revision. Follow the VS Code package guide for upstream prerequisites and overlay maintenance.

Install and build the companion package:

bash
npm install
cd vscode-web
npm install
npm run build
cd ..
npm run link

The package build clones VS Code and its localization repository, applies the overlays, compiles the editor, and writes vscode-web/dist/. The link command makes the root application use that package.

Run the VS Code watchers in one terminal:

bash
cd vscode-web
npm run watch

Run the application and extension watchers from the repository root in another terminal:

bash
npm run watch-with-vscode

Wait for both terminals to finish their initial compilation, then open the same local application URL. In this mode, the development server serves editor assets from vscode-web/lib/vscode/.

To test a production build using the locally built package, run npm run build from the repository root after building and linking vscode-web.

Where to make changes

Change Location
Application startup, workspace selection, or browser OAuth src/
Repository access, routing, history, or search extensions/github1s/src/
AI chat, model connections, context, or tools extensions/github1s-ai/src/
VS Code behavior modified by GitHub1s vscode-web/src/
OAuth callback or GitHub search proxy functions/
Repository discovery collections or snapshots workers/discovery/
Build and packaging behavior scripts/, webpack.config.js

See the architecture guide for how these components fit together.

Troubleshooting

  • Missing files during startup: check that both extension watchers and webpack have completed compilation, then reload the browser.
  • OAuth fails locally: the webpack server does not host the OAuth callbacks. Use a token or the Pages preview workflow.
  • Changes to VS Code do not appear: use the two-terminal workflow above and edit the overlays under vscode-web/src/.
  • A root type check passes but AI code fails: the AI extension has its own type checks; run its typecheck script.

Guide (`docs/guide.md`)

Documentation

GitHub1s

The original guide has been reorganized into focused documents:

  • Using GitHub1s: repository navigation, authentication, search, and troubleshooting.
  • GitHub1s AI: configure a model, add context, connect tools, and manage stored data.
  • Development: run the application, build it, and check changes.
  • Architecture: understand the components and their data flow.
  • Deployment: host the application and configure its services.
  • Community: find third-party extensions and view star history.

Component documentation


Usage (`docs/usage.md`)

Using GitHub1s

Documentation ยท AI guide

GitHub1s opens remote repositories in a VS Code interface in your browser. Public repositories can be browsed without signing in, subject to the upstream services' access and rate limits.

Open a repository or package

For GitHub, add 1s after github in the address bar. For GitLab or npm, add 1s after gitlab or npmjs.

Source Example
GitHub repository https://github1s.com/microsoft/vscode
GitLab repository https://gitlab1s.com/gitlab-org/gitlab
npm package https://npmjs1s.com/package/lodash

Opening GitHub1s without a repository path displays repository collections from GitHub Discovery. Within a repository, use GitHub1s: Open Repository... in the Command Palette and enter a repository name such as owner/repo for the current platform. Use the browser address bar for a complete URL.

GitHub1s recognizes common repository URLs. Replace the placeholders below with a repository, branch, tag, commit, or request number:

View URL pattern
GitHub branch or directory https://github1s.com/owner/repo/tree/ref/path
GitHub file and selected lines https://github1s.com/owner/repo/blob/ref/path#L10-L20
GitHub commit https://github1s.com/owner/repo/commit/sha
GitHub pull request https://github1s.com/owner/repo/pull/number
GitLab file https://gitlab1s.com/group/project/-/blob/ref/path
GitLab merge request https://gitlab1s.com/group/project/-/merge_requests/number

For branches or tags, you can also run GitHub1s: Checkout to.... Its Checkout detached option accepts a ref directly. This changes the revision being browsed.

  • Use Explorer to browse files and directories, or Go to File to find a file by name.
  • Use Search for text across the repository and the editor's Find action for the open file.
  • Open a file and expand Timeline in Explorer to inspect its history. Select a commit entry to open that file's diff.
  • In Source Control, use the built-in Graph view to browse commits for the current ref and inspect their changed files and diffs.
  • In Source Control, select a pull/merge request from Pull Requests (GitHub) or Merge Requests (GitLab) to inspect its changed files and diffs.
  • Run GitHub1s: Toggle File Blame to display revision information beside file lines where available.

Open the Command Palette with F1, Ctrl+Shift+P, or Cmd+Shift+P on macOS. Browser and operating-system shortcuts can take precedence.

For questions about the code, click Toggle Secondary Side Bar in the layout controls at the top of GitHub1s to open the AI panel, then follow the AI setup guide.

Authentication and private repositories

Use authentication to access private repositories or make authenticated API requests. The account or token must have access to the repository you want to open.

  1. Open Settings in the left activity bar.
  2. Choose Connect to GitHub or Connect to GitLab, then complete the authorization flow in the popup.
  3. Alternatively, enter a token in Manual Input AccessToken and select Submit. Create New AccessToken opens the corresponding provider's token creation page.
  4. After connecting, use Validate to check the token and reopen the repository if necessary.

Token storage and requests

GitHub and GitLab tokens are stored separately in the browser's VS Code extension state. Authenticated repository requests send the relevant token to the repository provider. Two additional paths matter:

  • OAuth callbacks exchange authorization codes for tokens on the site's server-side Functions.
  • GitHub's REST code-search fallback sends the authorization header through the site's same-origin search proxy, which forwards it to GitHub.
  • The above features are all Cloudflare Functions now, which you can review in the functions directory

To remove a saved token, choose Clear, then Confirm, in Settings. This removes the browser's saved token. Revoke the token or application authorization in GitHub if you also want to withdraw its access at the provider.

Search and code navigation

Repository-wide search relies on external services. For GitHub, Prefer to use Sourcegraph API in Settings enables an initial Sourcegraph attempt. Search then falls back to searchcode and, if needed, the GitHub REST API through the site's proxy.

Results depend on the service's repository coverage, indexed revision, permissions, and rate limits. In particular:

  • The GitHub REST fallback uses default-branch search results; they can differ from the ref currently open in the editor.
  • That fallback does not support regular-expression or multiline searches, and result positions derived from snippets can be approximate.
  • GitHub definition, reference, and hover results depend on Sourcegraph availability and coverage.
  • Successful file browsing does not guarantee that repository-wide search or symbol navigation is available, especially for private repositories.

Authentication can help with API access and rate limits, but each provider and endpoint applies its own limits. Follow the error's retry guidance rather than assuming a single request quota covers every feature.

Capabilities and limits

Area Scope
GitHub and GitLab Read repository files and inspect supported history and code-review views
AI Requires a configured model and API key; see AI setup
npm Browse published package files and versions
Remote repository changes Read-only; use the repository host or a development environment to edit and submit changes
Extensions Browser-compatible extensions; availability differs from desktop VS Code

Troubleshooting

Symptom What to check
A private repository does not open Validate the token, check repository access, and confirm the URL works on the provider's site
Requests are rate limited Authenticate if appropriate, inspect the reported limit, and wait for the retry time
Search is empty or fails while files load Try a simple text query; check the selected ref and the service limitations above
OAuth does not complete Allow the authentication popup; on a self-hosted instance, check OAuth configuration
AI cannot connect Check the endpoint, model ID, API key, and browser access requirements in the AI guide

For an unresolved problem, open an issue with the repository URL, browser version, and steps to reproduce it. Remove credentials from any logs or screenshots you include.

Browser shortcuts

The community directory lists browser extensions and scripts. You can also save this JavaScript as a bookmark's URL to switch between GitHub and GitHub1s while preserving the repository path:

javascript
javascript: (() => {
	const url = new URL(window.location.href);
	if (url.hostname === 'github.com') {
		url.hostname = 'github1s.com';
	} else if (url.hostname === 'github1s.com') {
		url.hostname = 'github.com';
	} else {
		return;
	}
	window.location.href = url.href;
})();

--- METRICS ---