资源管理器
- 📁 src/
- 📁 components/
- 📄 hero.tsx
- 📄 nav.tsx
- 📄 footer.tsx
- 📁 pages/
- 📁 public/
- 📄 package.json
- 📄 README.md
1import { useTranslations } from 'next-intl';
2
3export const Hero = () => {
4const t = useTranslations('hero');
5return (
6<section>
7{t('title')}
8</section>
9);
10};
为团队实际编码方式而构建
65,535
每容器并发 VS Code 实例数
不到 1 秒
从点击 URL 到就绪(热恢复)
8
API 接口组
0
新开发者入职所需本地安装
一个 URL 即 IDE
Code 是完整的 VS Code——不是精简分支,不是专有编辑器——在你的容器内运行,通过浏览器访问。差异在于运维层面,而非编辑器本身。
按实例安装扩展
通过查询参数在启动时预装扩展。每个 URL 以适合工作的工具集启动——无共享配置漂移。
# Pre-install extensions on spawn
GET /code/v1/instance?extensions=rust-analyzer,prettier
→ { instance_id: "abc", extensions: 2, ready_ms: 840 }
# Spawn a VS Code instance at a URL
curl "https://proj-dev-code-1.hoody.com/?folder=/home/user/project&id=1"
# Install an extension via API
curl -X POST \
https://proj-dev-code-1.hoody.com/api/v1/code/extensions/install \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"url": "https://marketplace.../ext.vsix"}'
# Response:
# {
# "installed": true,
# "id": "publisher.extension-name",
# "instance_id": 1
# }
11 个端点。完整 IDE 控制。
提供编辑器、验证用户、代理本地端口、管理扩展——全部通过 HTTP,从任何语言或脚本调用。
VS Code 界面
{count, plural, =1 {# 个端点} other {# 个端点}'}GET .../api/v1/code?folder=/home/user/project
身份验证
{count, plural, =1 {# 个端点} other {# 个端点}'}POST .../api/v1/code/login → Set-Cookie: hoody-session
端口代理
{count, plural, =1 {# 个端点} other {# 个端点}'}GET .../api/v1/code/proxy/3000/api/data → localhost:3000/api/data
扩展
{count, plural, =1 {# 个端点} other {# 个端点}'}POST .../api/v1/code/extensions/install { url: "...vsix" }