New File Creator is a small macOS Finder Sync extension that adds file creation commands to Finder's context menu.
It adds a single native-looking New File item to Finder's context menu with a submenu of file types:
Untitled.txtUntitled.md
If a file already exists, the app creates the next available name, such as Untitled 1.txt.
Finder Sync extensions are sandboxed, so the extension does not write files directly. The extension only reads Finder's current target folder and opens a private newfilecreator:// URL. The containing app handles that URL and creates the file.
This keeps the Finder extension small and avoids unreliable direct writes from the extension process.
The containing app is a headless LSUIElement agent (no Dock icon, no menu bar item). On first launch it registers itself as a login item via SMAppService, so it stays resident in the background and relaunches at login. Because the agent is already warm, the newfilecreator:// round-trip skips the cold app launch and file creation feels instant.
The menu is presented as one New File parent item with a file-type submenu, mirroring Finder's own patterns (e.g. "New Folder with Selection"). Leading icons are applied only on macOS versions where native context menus show them (macOS 26+), using template SF Symbols so they tint correctly in dark mode.
macOS requires a one-time user toggle to enable any Finder Sync extension — there is no supported API to flip it automatically. If the extension is not yet enabled, the agent shows a small onboarding window that deep-links to the correct Settings pane for your macOS version and watches for the toggle, restarting Finder automatically once it is on. After that, the extension stays enabled across restarts.
- macOS 14.0 or newer
- Xcode 15 or newer
make buildThe built app is written to:
build/NewFileCreator.app
The build script uses ad-hoc signing so the app can run locally without an Apple Developer account.
Regenerate the app icon assets from the source SVG:
make iconsRegenerate the README demo media:
make demoFirst build the app:
make buildThen register it with macOS:
make install-localThis command:
- Verifies
build/NewFileCreator.app - Copies the app to
/Applications(a stable path is required so the login item registers correctly) - Registers the app's
newfilecreator://URL scheme - Registers and best-effort enables the Finder Sync extension with
pluginkit - Launches the agent, which registers the login item and shows the onboarding window if the extension is not yet enabled
- Restarts Finder
If macOS still does not show the menu item, enable the extension manually:
System Settings -> Privacy & Security -> Extensions -> Finder Extensions
Enable New File Creator, then restart Finder:
killall Finder- Open a Finder window.
- Right-click inside the folder, or right-click a folder or item.
- Choose
New File, then a file type from the submenu.
The new file is created in the targeted Finder folder and selected in Finder.
Finder controls where third-party context-menu items appear, so the
New Fileitem is grouped with other extension items (toward the bottom of the menu), not above Finder's built-inNew Folder. This placement cannot be changed via the Finder Sync API.
Press a shortcut anywhere to create a file in the folder Finder is currently showing — including the Desktop, which the Finder context menu cannot reach. The file is created and selected immediately by the resident background agent.
Defaults:
- ⌃⌥⌘N — new text file
- ⌃⌥⌘M — new Markdown file
The first time you use a shortcut, macOS asks for permission for New File Creator to control Finder (Automation). Approve it once; the shortcuts work silently after that.
The app is headless (no Dock or menu bar icon). To change the shortcuts, double-click
New File Creator in /Applications — the running agent opens a Settings window
where you can rebind each shortcut, disable either one, or reset to defaults. Changes
apply immediately.
The project intentionally keeps the extension thin:
FinderSync.swiftbuilds the Finder menu, resolves the target folder, and opens the app URL.AppDelegate.swiftparses the app URL, creates a unique file name, writes the file, and reveals it in Finder.
The default bundle identifier is:
io.github.tjansn.NewFileCreator
This matches the tjansn GitHub namespace.
Before publishing a release, decide how you want users to install it:
- For source-only distribution,
make buildandmake install-localare enough. - For binary distribution, sign with a Developer ID certificate and notarize the app.
- Keep generated files out of git. The included
.gitignoreexcludesbuild/,DerivedData/, Xcode user state, and packaged app artifacts.
Build a Developer ID signed release archive:
SIGN_IDENTITY='Developer ID Application: Your Name (TEAMID)' \
DEVELOPMENT_TEAM='TEAMID' \
./scripts/package-release.shBuild, submit for notarization, staple the ticket, and create a final zip:
SIGN_IDENTITY='Developer ID Application: Your Name (TEAMID)' \
DEVELOPMENT_TEAM='TEAMID' \
NOTARY_PROFILE='new-file-creator' \
./scripts/package-release.shCreate the notary profile once with:
xcrun notarytool store-credentials new-file-creatorIf the menu item does not appear:
pluginkit -m -p com.apple.FinderSync -A -D -v | grep NewFileCreator
killall FinderAlso verify that the app was launched or registered after building. make install-local does this automatically.
NewFileCreator/
NewFileCreator.xcodeproj
NewFileCreator/ # containing app (headless background agent)
AppDelegate.swift # URL handling, login item, hotkeys, file creation
GlobalHotKey.swift # Carbon global shortcut + Finder location lookup
HotKeyConfiguration.swift # shortcut persistence and defaults
PreferencesWindowController.swift # Settings UI + shortcut recorder
OnboardingWindowController.swift # extension-enable onboarding
Info.plist
MainMenu.xib
Assets.xcassets/
NewFileExtension/ # sandboxed Finder Sync extension
FinderSync.swift # builds the context menu, resolves target folder
Info.plist
NewFileExtension.entitlements
scripts/
build.sh
install-local.sh
package-release.sh
MIT. See LICENSE.
