NewTerm

Open this folder in the terminal you actually use. 在你真正在用的终端里打开当前文件夹。

NewTerm adds an “Open in …” item to Finder’s context menu and toolbar. It detects the terminals and editors installed on your Mac and lets you choose which ones appear. An open-source replacement for the unmaintained TermHere. NewTerm 在 Finder 的右键菜单和工具栏中加入“在 … 中打开”。它会检测 Mac 上已安装的终端和编辑器,由你决定显示哪些。开源,用于替代已停止维护的 TermHere。

macOS 13 or later · Apple silicon and Intel · MIT License macOS 13 或更高版本 · Apple 芯片与 Intel · MIT 许可证

NewTerm settings window: a live preview of the Finder context menu on the left, the list of detected terminals on the right NewTerm 设置窗口:左侧是 Finder 右键菜单的实时预览,右侧是检测到的终端列表
The settings window. The preview on the left follows every change you make. 设置窗口。左侧的预览会随每一项设置实时变化。

Features功能

Everything is configured in one settings window. Nothing runs in the background. 全部配置集中在一个设置窗口里,没有任何后台常驻进程。

Automatic detection自动检测

Installed terminals and editors are found through LaunchServices, including apps outside /Applications such as JetBrains Toolbox, Homebrew and Nix installs. 通过 LaunchServices 查找已安装的终端和编辑器,包括 /Applications 之外的应用,例如 JetBrains Toolbox、Homebrew、Nix 安装的应用。

Your default, your order默认应用与顺序由你决定

Pick a default terminal and editor, hide the apps you do not use, and drag the rest into the order you want. 选择默认终端和默认编辑器,隐藏不用的应用,其余的拖动排序。

Context menu and toolbar右键菜单与工具栏

Works on a folder, on a file (opens its parent folder), on the window background, and from a Finder toolbar button. 可作用于文件夹、文件(打开其父文件夹)、窗口空白处,也可以从 Finder 工具栏按钮触发。

Editors and other apps编辑器与其他应用

Editors receive every selected item, so multi-selection works. Add any app that opens files or folders, such as a Git client. 编辑器会收到全部选中项,支持多选。任何能打开文件或文件夹的应用都能手动添加,例如 Git 客户端。

Copy Path拷贝路径

Copies the POSIX paths of the selected items to the clipboard, one per line. 把所选项目的 POSIX 路径拷贝到剪贴板,每行一个。

No extra permissions不需要额外权限

No Automation or Accessibility permission. Paths are passed as document URLs or arguments, never through a shell or AppleScript. 不需要“自动化”或“辅助功能”权限。路径以文档 URL 或命令行参数传递,不经过 shell 或 AppleScript。

Supported apps支持的应用

Detected automatically when installed. Any other app can be added by hand. 安装后自动检测。其他应用可以手动添加。

Terminals终端

TerminaliTerm2Ghostty Warpcmuxkitty WezTermAlacrittyRio HyperTabby

Editors编辑器

VS CodeCursorZed WindsurfXcodeSublime Text JetBrains IDEsAndroid StudioNova BBEditMacVimEmacs and more等

Install安装

Four steps, about a minute. 四个步骤,大约一分钟。

  1. Download the latest disk image, open it, and drag NewTerm onto the Applications folder. 下载最新的磁盘映像,打开后把 NewTerm 拖到“应用程序”文件夹。

  2. Open NewTerm and click Add to Finder. This enables the Finder extension and restarts Finder. 打开 NewTerm,点击 添加到 Finder。它会启用 Finder 扩展并重新启动 Finder。

  3. Choose your default terminal and editor. 选择默认终端和默认编辑器。

  4. Optional: in Finder choose View > Customize Toolbar… and drag the NewTerm button into the toolbar. 可选:在 Finder 中选择 显示 > 自定义工具栏…,把 NewTerm 按钮拖进工具栏。

How it works工作原理

Finder Sync extensions must be sandboxed and cannot start other apps with arguments, so the extension forwards each request to the host app through a URL scheme. The host app launches the target and exits. Finder Sync 扩展必须运行在沙盒内,无法带参数启动其他应用,因此扩展通过 URL scheme 把请求转交给宿主应用。宿主应用拉起目标应用后即退出。

Finder context menu / toolbar button
      │
      ▼
NewTermFinder.appex   Finder Sync extension (sandboxed)
      │  newterm://open?path=…&kind=…&app=…
      ▼
NewTerm.app           host app
      ├─ launched by URL  ──▶ launch the target app ──▶ exit
      └─ launched by user ──▶ scan installed apps   ──▶ settings