NewFileMenu 是一个原生 macOS Finder Sync 扩展,为 Finder 添加类似 Windows 的“新建文件”功能。
支持新建:
- Word 文档(
.docx) - PowerPoint 演示文稿(
.pptx) - Excel 工作簿(
.xlsx) - Markdown 文档(
.md)
- 普通本地文件夹:在 Finder 文件夹空白处右键,选择“新建文件”。
- Google Drive 等 File Provider 云盘:Finder 不会合并第三方 Finder Sync 右键菜单。请点击 Finder 工具栏右侧的
»,再选择“新建文件”。也可以通过“显示 → 自定工具栏”,将“新建文件”放到工具栏上。 - 如果目标名称已存在,App 会自动添加编号,例如“新建 Markdown 文档 2.md”。
前往 GitHub Releases 下载最新 DMG:
- 打开 DMG。
- 将
NewFileMenu.app拖入“应用程序”文件夹。 - 首次打开 App,按提示启用 Finder 扩展。
- 如果菜单没有立即出现,请重新打开 Finder 窗口。
当前公开构建使用 Apple Development 签名,尚未进行 Developer ID 公证。如果 macOS 提示无法验证,请点击“完成”,然后前往“系统设置 → 隐私与安全性”,选择“仍要打开”。免提示公开分发需要 Developer ID Application 证书及 Apple Notarization。
- 使用 Xcode 打开
NewFileMenu.xcodeproj。 - 在项目的 Signing & Capabilities 中,为 App 和 Finder Extension 选择同一个开发团队。
- 运行
NewFileMenuscheme。 - 在 App 中点击“启用 Finder 扩展”,然后在系统设置中启用“新建文件”。
最低支持 macOS 13。推荐使用完整 Xcode 构建和签名,以便 Finder 接受扩展提供的菜单。
仓库也提供了一个 Apple Silicon 命令行构建脚本,可在只有 Command Line Tools 的机器上生成临时签名版本:
zsh Scripts/build-command-line.sh /path/to/NewFileMenu.app命令行产物采用 ad-hoc 签名,仅用于验证二进制结构和启动流程;Finder 可能拒绝显示其菜单。功能测试和公开分发应使用 Apple Development 或 Developer ID 证书签名,正式分发版本还应完成公证。
工程定义保存在 project.yml。安装 XcodeGen 后运行:
xcodegen generate当前版本面向直接签名分发。Finder 扩展使用 home-relative 临时例外权限,在个人主目录范围内创建文件。若提交 Mac App Store,需要改为用户选择目录并持久化 security-scoped bookmark,同时针对 Finder Sync 的用途进行审核评估。
NewFileMenu is a native macOS Finder Sync extension that brings a Windows-style New File menu to Finder.
It can create:
- Word documents (
.docx) - PowerPoint presentations (
.pptx) - Excel workbooks (
.xlsx) - Markdown files (
.md)
- Regular local folders: right-click an empty area in a Finder folder and choose New File.
- File Provider locations such as Google Drive: Finder does not merge third-party Finder Sync context menus into these locations. Click the
»button on the right side of the Finder toolbar, then choose New File. You can also use View → Customize Toolbar to keep the New File button visible. - If a file with the default name already exists, the app adds a number automatically, for example
新建 Markdown 文档 2.md.
Download the latest DMG from GitHub Releases:
- Open the DMG.
- Drag
NewFileMenu.appinto the Applications folder. - Open the app and follow the prompt to enable the Finder extension.
- If the menu does not appear immediately, reopen the Finder window.
The current public build is signed with an Apple Development certificate but is not notarized with a Developer ID certificate. If macOS says it cannot verify the app, click Done, open System Settings → Privacy & Security, and choose Open Anyway. Warning-free public distribution requires a Developer ID Application certificate and Apple Notarization.
- Open
NewFileMenu.xcodeprojin Xcode. - In Signing & Capabilities, select the same development team for the app and Finder Extension targets.
- Run the
NewFileMenuscheme. - Click Enable Finder Extension in the app, then enable NewFileMenu in System Settings.
The minimum supported version is macOS 13. A full Xcode build with a valid signing identity is recommended so Finder accepts the extension menus.
The repository also includes an Apple Silicon command-line build script for machines with Command Line Tools only:
zsh Scripts/build-command-line.sh /path/to/NewFileMenu.appThe command-line output uses an ad-hoc signature and is intended only for validating binary structure and launch behavior. Finder may reject its menus. Functional testing and public distribution should use an Apple Development or Developer ID certificate; production releases should also be notarized.
The project definition lives in project.yml. After installing XcodeGen, run:
xcodegen generateThe current version targets direct signed distribution. Its Finder extension uses a temporary home-relative read/write exception to create files within the user's home directory. A Mac App Store version would need a user-selected folder with a persistent security-scoped bookmark and an App Review assessment of the Finder Sync use case.