Menu bar app that installs custom right-click actions into macOS Services — no signing, no app extensions, no Xcode required.
swift build -c releaseBinary lands at .build/release/Mejic.
.build/release/MejicA terminal icon appears in the menu bar. Click it to open the command editor.
So Mejic launches automatically on login:
- Open System Settings → General → Login Items & Extensions
- Click + under "Open at Login"
- Navigate to
.build/release/Mejicand add it
Or from the terminal (macOS 13+):
osascript -e 'tell application "System Events" to make login item at end with properties {path:"/path/to/.build/release/Mejic", hidden:false}'Mejic reads ~/.config/mejic/commands.yaml and writes one Automator .workflow bundle per enabled command into ~/Library/Services/. macOS Services appear natively in Finder's right-click menu — no daemon, no Finder extension, no code signing.
Hitting Save in the popover:
- Writes the updated YAML
- Deletes old Mejic workflows from
~/Library/Services/ - Writes new ones
- Calls
pbs -updateto refresh the Services cache immediately
Config lives at ~/.config/mejic/commands.yaml:
- label: Copy Path
command: echo {file} | pbcopy
enabled: true
- label: Open in VS Code
command: open -a 'Visual Studio Code' {file}
enabled: true
- label: Make Executable
command: chmod +x {file}
enabled: true
- label: Compress Video
command: ffmpeg -i {file} -crf 28 {file}_compressed.mp4
enabled: true{file} is replaced with the selected file's full path, double-quoted: "${f}". For commands that reference {file} multiple times, each occurrence is substituted independently.
Quoting tip: do not wrap {file} in single quotes — it already gets double-quoted. Shell-escape other arguments normally.
The generated bash wrapper:
for f in "$@"
do
YOUR COMMAND WITH "${f}"
doneMulti-select in Finder runs the command once per file.
| What | Command |
|---|---|
| Copy path | echo {file} | pbcopy |
| Open in Sublime | open -a 'Sublime Text' {file} |
| SHA256 checksum | shasum -a 256 {file} | pbcopy |
| Move to Desktop | mv {file} ~/Desktop/ |
| New Terminal here | open -a Terminal {file} |
| Word count | wc -l {file} | pbcopy |
Sources/Mejic/
main.swift — NSApplication entry, menu bar + popover
ConfigStore.swift — YAML read/write, ObservableObject
WorkflowWriter.swift — generates .workflow bundles
ContentView.swift — SwiftUI editor UI
Resources/
commands.yaml — example config (copied to ~/.config/mejic/ on first launch)
To add more items to Finder Right-click context menu: defaults write -g NSServicesMinimumItemCountForContextSubmenu -int 999
