@vintcessun: 与其在终端里重造编辑器,不如把 VS Code 的成熟能力直接搬进来。 https://github.com/zenbu-labs/terminal-code… terminal-code 组合 terminal-browser 与 co…
摘要
terminal-code 是一个将 VS Code 集成到终端的开源工具,通过结合 terminal-browser 和 code-server 实现,支持 SSH 和扩展,但依赖 Kitty 图形协议且 Windows 兼容性有限。
查看缓存全文
缓存时间: 2026/08/21 11:08
与其在终端里重造编辑器,不如把 VS Code 的成熟能力直接搬进来。
https://github.com/zenbu-labs/terminal-code…
terminal-code 组合 terminal-browser 与 code-server:前者负责终端内呈现,后者复用 VS Code Web 能力,CLI 再串起文件定位、工作区、分屏、diff、扩展与配置导入。优势是少造轮子、能承接现有生态;代价是依赖 Kitty 图形协议,Windows 目前还需借助 WSL,终端兼容性要先确认。
zenbu-labs/terminal-code
Source: https://github.com/zenbu-labs/terminal-code
terminal-code
VS Code inside your terminal
https://github.com/user-attachments/assets/4ba0d434-896a-4ab3-9c91-5d351dacee08
Install (macOS & Linux):
curl -fsSl https://tode.sh/install | bash
Usage
Usage: tode [path...] [options]
tode --<command>
tode Open the folder in the current working directory
tode <folder> Open the specified folder
tode <file> Open the specified file
Options:
-g, --goto <f:l:c> Open a file at a line and column
-a, --add <folder> Add a folder to the active workspace
-n, --new-window Open a new pane even for a file
-w, --wait Wait until the file is closed again
-d, --diff <a> <b> Compare two files
-r, --reuse-window Open folder in this window rather than a new pane
--install-extension Install an extension by id or vsix path
--uninstall-extension Remove an extension
--list-extensions List installed extensions
--split <direction> Open in a new pane: right, left, down, up
--size <fraction> The % a new split will take up (0.2 to 0.95)
--timing Report how long each stage of this open took
--review Open on the source control panel
--ssh <user@host> Run terminal-code on an ssh server
Commands, each as the first argument:
--shortcut-setup Resolve shortcut conflicts between terminal-code and the current terminal
--timing Profile terminal-code launch
--import [editor] Bring settings, keybindings, snippets and extensions
over from vscode compatible editors
--theme [file] Set editor theme
--serve [path] Start code server and print its url
--skill An agent skill to assist with modifying terminal-code
--upgrade [--check] Upgrade terminal-code to the latest version
--shutdown Stop all terminal-code activities
--uninstall [--yes] Remove all terminal-code data from this machine
How does it work?
terminal-code combines terminal-browser (a browser in the terminal) and code-server (VS Code in the browser) to bring VS Code to the terminal. You should look into these projects for more details!
Shortcuts
Your terminal and terminal-code will likely conflict on important shortcuts, meaning sometimes terminal-code will never even receive your key press. To resolve
shortcut conflicts you can run tode --shortcut-setup, and you will be placed into an interactive wizard that lets you change terminal or terminal-code shortcuts
so they no longer conflict
SSH
The recommended way to use terminal-code over ssh is running tode --ssh <ssh arguments> on your local machine.
The alternative is running tode directly on the machine you are shh’d into. This will work, but
requires:
- every single frame drawn by vscode to be sent over the network
- all user input to be sent over the network before vscode can react
- misses out some extra optimizations
tode --ssh improves on this by running only the backend of vscode on the remote machine. The frontend is still running locally on your device, so vscode is able to respond to interactions ~instantly. Any network requests will get proxied over the ssh connection.
Windows
terminal-code depends on a modern terminal feature (the kitty graphics protocol) that not many terminals on Windows support. There are projects attempting to bring this capability to terminals on Windows that you can try at your own risk:
- https://github.com/ibuildthecloud/winterm-ghostty
Even with a compatible terminal, terminal-code does not have an official windows build. But, it’s possible to install the linux version of terminal-code inside WSL, which is the final piece needed to run terminal-code on Windows. Please file an issue if you are eager for a more official solution
相似文章
@CycleDecoded: 程序员和终端白嫖党直接看过来,这玩意真有人做出来了。 以前写代码开一堆窗口,黑框框 Terminal、VSCode、浏览器、ChatGPT 来回切,手都要按废了。程序员开源项目 Wave Terminal(waveterm)直接把命令行、…
介绍开源 AI 终端 Wave Terminal,将命令行、编辑器、浏览器和 AI 整合到一个终端中,支持内联预览、持久 SSH 会话和多模型接入,GitHub 已获 22k+ Star。
The Story of VS Code
Visual Studio Code的诞生源于微软从专注Windows平台向服务全球开发者转型的战略决策,依托Web技术和Eric Gamma团队的远见,创建了一个强大的代码编辑器。
HN展示:terminal-code – 在终端中运行VS Code
terminal-code 是一个命令行工具,允许在终端中运行Visual Studio Code,并提供多种文件管理和集成选项。
@sunmer575399: 刷到一个神仙开源项目cline,65.6k star,写代码效率确实能提不少 一个引擎同时给SDK、CLI、VS Code和JetBrains全家桶用,你在编辑器里点两下,它自己读代码、建文件、跑命令,改完还等你点头才动手。 终端里跑全自…
介绍开源AI编码代理工具Cline,支持SDK、CLI、VS Code和JetBrains全家桶,可在IDE和终端中自动读代码、建文件、跑命令,并支持看板并行多agent和CI/CD集成。
@LinearUncle: 个人强烈推荐一个开源的媲美甚至部分超越codex app 的coding IDE:Orca https://onorca.dev https://github.com/stablyai/orca Mac/Win/Linux 全平台, 支持…
Orca 是一款开源的全平台编码 IDE,支持并行 worktree、computer use、嵌入式浏览器、移动端远程控制等功能,可与 Claude Code、Codex、OpenCode 等多种 Agent CLI 协同使用,被推荐为媲美甚至超越 Codex 的开发工具。