GitHub Docs - What are GitHub Codespaces
GitHub 官方文档的概念总览页:Codespaces 是什么、怎么创建、怎么定制、怎么计费。本库 开发工具 领域首篇资料。
要点
- Codespace = 云端托管的开发环境:GitHub 托管的 Docker container 跑在虚拟机上(官方架构图:编辑器 ↔ 容器 ↔ Azure VM)。连接方式:浏览器 / VS Code / GitHub CLI。
- Configuration-as-Code:向 repo 提交 dev container 配置文件 → 为所有项目用户生成可重复的环境;无配置时用默认 Ubuntu 镜像(含常用语言/工具)。远端容器只支持 Linux,Windows/macOS 不支持——与本地 OS 无关。
- 规格区间:2 核 / 8GB RAM / 32GB 存储 → 32 核 / 128GB RAM / 128GB 存储。
- 定制三层:repo 级 dev container 配置(可多套供选择);个人 dotfiles repo(shell alias、偏好工具);编辑器 Settings Sync(设置/快捷键/snippet/扩展同步)。
- 安全边界:连接后被置于 Docker 容器内,对外层 Linux VM host 只有有限访问。
- 计费模型:个人账户(Free/Pro)含每月免费配额,无需改设置或绑卡即可开始;超出需付款方式 + spending limit。组织(Team/Enterprise)可为成员的 codespaces 付费,计费归属在创建时明示;组织拥有的 codespace 可被 org owner 删除。即使账户按年计费,Codespaces 费用也始终按月结。
值得留的原话
Regardless of your local operating system, your codespace will run in a Linux environment. Windows and macOS are not supported operating systems for the remote development container.(Introduction)
When you connect, you are placed within the Docker container. You have limited access to the outer Linux virtual machine host.(Introduction)
Costs for GitHub Codespaces are always billed monthly, even if your account is otherwise billed annually.(Billing for Codespaces)
与已有页面的关联
- Agent 状态分层:Josh Rosen 主张”workspace 留本地、work 搬远程”——Codespaces 正是”开发环境远程化”的成熟先例:容器化、配置即代码、按需创建/销毁、状态与本地机器解耦。agent 时代在重新面对同一组问题。
- 首个非 AI 主题资料,触发新建 开发工具 领域。