Skip to content
jitdorPublic

About

Native SwiftUI batch filename utility for macOS

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

TitleLift

TitleLift is a native SwiftUI utility for Apple-silicon Macs running macOS 14 or later. It renames every top-level file in a selected folder, moves the files into the parent folder, and removes the source folder after it is empty.

For a template named:

Summer Trip 2026.mp4

the source names 1, 2-1, and 2-2 become:

Summer Trip 2026-1.mp4
Summer Trip 2026-2-1.mp4
Summer Trip 2026-2-2.mp4

Architecture

  • Swift 6 and SwiftUI for the native macOS interface
  • AppModel for main-thread UI state
  • FileOperationService actor for planning, validation, file moves, and rollback
  • XCTest for the core filesystem behavior
  • Swift Package Manager for a source-controlled, dependency-free scaffold

The first release is intentionally not App Sandbox-enabled. A sandbox grant for only the selected child folder does not reliably authorize writes into its parent. For Mac App Store distribution, change the workflow to let the user grant access to the parent folder explicitly and persist a security-scoped bookmark.

Safety behavior

  • Shows an exact preview before enabling the destructive action.
  • Accepts a single folder dropped directly onto the Choose button.
  • Rejects drag-and-drop input in the title field; titles can be typed, pasted normally, or inserted with the Paste button.
  • Supports Finder-visible / characters by storing the macOS-compatible : representation underneath. The preview continues to show /.
  • Rejects existing destination names and duplicate generated names.
  • Rejects nested folders and symbolic links.
  • Preserves each source file's real extension. Extensionless files use the template extension.
  • Rolls already moved files back if a later move or folder removal fails.
  • Removes .DS_Store, but never silently deletes other unexpected items.

Build and test

Use Xcode 26.6 with its license and first-launch setup completed. If necessary, select it as the active developer directory:

sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer

Then build and test:

xcrun swift test
zsh Scripts/build-app.sh

The app bundle is written to outputs/TitleLift.app. It is ad-hoc signed for local use. Developer ID signing and notarization can be added for distribution.

The build script automatically uses /Applications/Xcode.app when present. Alternate Xcode and SDK locations can be supplied explicitly:

TITLELIFT_DEVELOPER_DIR=/path/to/Xcode.app/Contents/Developer \
TITLELIFT_SDKROOT=/path/to/MacOSX.sdk \
zsh Scripts/build-app.sh

Opening Package.swift in Xcode also provides an editable project without checking in generated Xcode project files.

About

Native SwiftUI batch filename utility for macOS

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages