Show HN: OpenCodeSpace – 一次性容器,在 YOLO 模式下运行 Claude 代码
3 分•作者: vadepaysa•10 个月前
Hello HN!
我构建了 OpenCodeSpace <a href="https://github.com/ngramai/opencodespace">https://github.com/ngramai/opencodespace</a> — 这是一个 CLI 工具,让你只需一个命令就能启动一次性的、自托管的 VS Code 环境。
它就像一个自托管的 Code Spaces,但:
- 可在本地通过 Docker 运行,或在 Fly.io 上远程运行(即将支持 AWS、GCE)
- 自动配置了 Claude Code、OpenAI、Gemini CLI
- 专为 YOLO 模式开发而设计:临时的、并行的、即用即弃的会话
由于 Claude Code 和 Gemini CLI 成为我开发工作流程的核心,我一直需要一种方法来并行运行它们,在干净、隔离的环境中,以完全 YOLO 模式 (`--dangerously-skip-permissions`) 运行,而不用担心它对我的计算机的影响。
我试过 devcontainers,但并非所有仓库都配置了它们,而且远程 devcontainer 的设置很麻烦。我也试过 git work tree + 多窗口本地 VSCode,但我觉得在我的本地桌面上进行所有分支和文件夹复制有点混乱。
我想要更简单的方式,所以我构建了这个。
它是如何工作的:
* 在任何文件夹中运行 `opencodespace .`
* 它会检查 `.opencodespace`(或初始化一个)
* 你选择:使用 Docker 在本地运行或在 Fly.io 上远程运行
* 基于浏览器的 VS Code 将打开,一切就绪
安装:
pip install opencodespace
代码:
<a href="https://github.com/ngramai/opencodespace">https://github.com/ngramai/opencodespace</a>
虽然还处于早期阶段,但我很喜欢使用它。我经常在 Fly 上启动几个这样的环境,让 Claude 自动处理 bug,而我专注于本地 IDE 中更繁重的任务。
欢迎提出你的反馈和想法!
查看原文
Hello HN!<p>I built OpenCodeSpace <a href="https://github.com/ngramai/opencodespace">https://github.com/ngramai/opencodespace</a> — a CLI tool that lets you launch disposable, self-hosted VS Code environments in one command.<p>It’s like a self-hosted Code Spaces, but:<p>- Works locally with Docker or remotely on Fly.io (AWS, GCE coming soon)
- Auto-configured with Claude Code, OpenAI, Gemini CLI
- Designed for YOLO mode development: temporary, parallel, throwaway sessions<p>As Claude Code and Gemini CLI became core to my dev workflow, I kept needing a way to run them in parallel, in clean, isolated environments in full YOLO mode (`--dangerously-skip-permissions`) without worrying about its effects on my computer.<p>I tired devcontainers, but not all repos have them configured and remote devcontainer setup is a pain. I also tried git work tree + multi window local VSCode, but I felt all the branching and folder replication on my local desktop a bit messy.<p>I wanted something simpler, so I built this.<p>How it works:<p>* Run `opencodespace .` in any folder
* It checks for `.opencodespace` (or initializes one)
* You choose: run locally with Docker or remotely on Fly.io
* Browser-based VS Code opens up with everything ready<p>Install:
pip install opencodespace<p>Code:
<a href="https://github.com/ngramai/opencodespace">https://github.com/ngramai/opencodespace</a><p>It’s still early days, but I love using this. I often spin up a few of these on Fly to let Claude code automatically chug away on bugs while I focus on heavier tasks in my local IDE.<p>Would love your feedback and ideas!