本文翻译整理自:https://github.com/conwnet/github1s
一、关于 GitHub1s
GitHub1s 是一个基于 VS Code 的在线代码阅读工具,让您能在浏览器中快速浏览 GitHub 仓库代码。
相关链接资源
- github : https://github.com/conwnet/github1s
- 官网:https://github1s.com
- 官方文档:https://github.com/conwnet/github1s/blob/master/docs/guide.md
- Demo/在线试用:https://github1s.com/microsoft/vscode
- Community : https://github.com/conwnet/github1s/discussions
- License : MIT
关键功能特性
- 在浏览器中使用 VS Code 界面浏览 GitHub 代码
- 支持私有仓库(需 OAuth 令牌)
- 支持 GitLab 和 npm 仓库(gitlab1s.com / npmjs1s.com)
- 可快速切换 github.com 和 github1s.com
- 集成 Gitpod 云端开发环境
二、使用方法
1、基本使用
只需在浏览器地址栏的 GitHub 仓库 URL 中的 “github” 后添加 1s
并回车即可。
例如,尝试访问 VS Code 仓库:
https://github1s.com/microsoft/vscode
2、其他平台支持
同样的方式也可用于:
- GitLab: https://gitlab1s.com
- npm: https://npmjs1s.com
3、书签工具
将以下代码保存为书签,可快速在 github.com 和 github1s.com 间切换:
javascript: window.location.href = window.location.href.replace(/github(1s)?.com/, function(match, p1) { return p1 ? 'github.com' : 'github1s.com' })
4、云端开发
点击状态栏中的 “Develop your project on Gitpod” 按钮,可进行文件编辑、运行 Docker 容器、创建 PR 等操作。也可通过命令面板(默认快捷键 Ctrl+Shift+P
)选择 GitHub1s: Edit files in Gitpod
。
三、私有仓库支持
如需查看非公开仓库,需添加 OAuth 令牌。该令牌仅存储在浏览器中,仅在获取仓库文件时发送给 GitHub。点击左侧图标栏底部的图标,对话框会提示您输入令牌,并引导至 GitHub 设置页面生成。

四、开发指南
1、云端开发环境
点击以下按钮可通过 Gitpod 启动在线开发环境:
查看详情:https://gitpod.io/#https://github.com/conwnet/github1s
2、本地开发
git clone git@github.com:conwnet/github1s.git
cd github1s
npm install
npm run watch
# 构建完成后会自动打开 http://localhost:8080
# 若未自动打开,可访问 http://localhost:8080/conwnet/github1s
完整 VS Code 构建
需要满足 VS Code 构建的先决条件。
验证构建:
cd github1s
npm run build:vscode
成功构建后可使用 watch 模式:
cd github1s
npm install
npm run watch-with-vscode
# 构建完成后会自动打开 http://localhost:8080
# 若未自动打开,可访问 http://localhost:8080/conwnet/github1s
3、VS Code + Docker 开发
使用 VS Code 插件 Remote-Containers 的 Dev Container
功能:
1、在 VS Code 中安装 Remote-Containers 插件并配置 Docker
2、打开命令面板(默认快捷键 Ctrl+Shift+P
)选择 Remote-Containers: Clone Repository in Container Volume...
3、输入仓库地址,如 https://github.com/conwnet/github1s.git
4、选择 Create a unique volume
或 Create a new volume
5、打开新终端,运行以下命令:
npm install
npm run watch
# 构建完成后会自动打开 http://localhost:8080
# 若未自动打开,可访问 http://localhost:8080/conwnet/github1s
4、代码格式化
npm run format
使用 prettier
格式化所有代码。
5、构建
npm install
npm run build
五、反馈与支持
- 如遇问题,请创建 issue
六、赞助商
GitHub1s 的持续开发维护得益于以下赞助商的支持:
![]() |
七、合作伙伴
与 OSS Insight 合作获取趋势仓库分析。该平台基于 TiDB Cloud 构建。
![]() |
八、第三方相关项目
Chrome 扩展
- Repositree (chouglesaud/repositree)
- github-code-viewer (febaoshan/edge-extensions-github-code-viewer)
- Github1s Extension (Darkempire78/GitHub1s-Extension)
- Github Web IDE (zvizvi/Github-Web-IDE)
- shortcut to github1s (katsuhisa91/github1s-shortcut)
- Github1s Shortut - Open source
- ⚡️ 1s to GitHub1s!
- github1s Google Chrome Extensions
Firefox 扩展
- Repositree (chouglesaud/repositree)
- Github1s Extension (Darkempire78/GitHub1s-Extension)
- Github1s (mcherifi/github1s-firefox-addon)
- Github Web IDE (zvizvi/Github-Web-IDE)
Microsoft Edge 扩展
- github-code-viewer (febaoshan/edge-extensions-github-code-viewer)
- Github Web IDE (zvizvi/Github-Web-IDE)
Safari 扩展
Tampermonkey 脚本
九、截图展示
伊织 xAI 2025-04-28(一)