How to Set Up Aseprite (or any custom binary) on macOS for Spotlight Search
Enhance your workflow by making Aseprite instantly accessible without the need for terminal commands.
Quicklinks
Aseprite is a popular pixel art tool, and if you’re using it on macOS, you may want to make it easily accessible via Spotlight search. While the installation instructions for Aseprite on macOS are already available in the official Aseprite GitHub repository, this guide will show you how to make Aseprite searchable in Spotlight and easily launchable from the desktop. It’s a nice-to-have addition to streamline your workflow.
Disclaimer: This is a general guide to make custom binaries or programs available via OS X Spotlight. I just wrote this up for Aseprite to help the artists who may be using it.
Prerequisites: Make sure you have Aseprite built and running on your macOS. You can use the instructions from the official installation guide) or this blog for Apple Silicon Mac specifically (Emad Dehnavi) .
Create a Symlink for Aseprite
First, you need to make Aseprite available globally by creating a symbolic link to the executable in /usr/local/bin
.
If you already have a working symlink, you can skip this step.
-
Create a wrapper script for the Aseprite binary:
Create a new file at /usr/local/bin/aseprite with
nano
or your preferred text editor:sudo nano /usr/local/bin/aseprite
Paste the following into the file content. Replace
/path/to/aseprite/build/bin
with the actual path to your Aseprite build directory.#!/bin/bash cd /path/to/aseprite/build/bin ./aseprite "$@"
Then make the script executable:
sudo chmod +x /usr/local/bin/aseprite
-
Test the symlink:
After creating the symlink, verify that it works by typing the following in the terminal:
aseprite
Make Aseprite Searchable in Spotlight
To make Aseprite easily accessible from Spotlight, we need to wrap it in an .app bundle. This will allow you to search for and launch it just like any other macOS application.
-
Create a Minimal .app Wrapper
Create the app bundle structure
mkdir -p ~/Applications/Aseprite.app/Contents/MacOS
-
Create the executable script:
In the
~/Applications/Aseprite.app/Contents/MacOS
directory, create a new shell script called Aseprite.nano ~/Applications/Aseprite.app/Contents/MacOS/Aseprite
Paste the following content into the file:
#!/bin/bash /usr/local/bin/aseprite "$@"
Save and exit.
-
Make the script executable:
chmod +x ~/Applications/Aseprite.app/Contents/MacOS/Aseprite
-
Create the Info.plist file:
In the
~/Applications/Aseprite.app/Contents
directory, create theInfo.plist
file:nano ~/Applications/Aseprite.app/Contents/Info.plist
Paste the following XML content into the file:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleName</key> <string>Aseprite</string> <key>CFBundleIdentifier</key> <string>com.yourname.aseprite</string> <key>CFBundleVersion</key> <string>1.0</string> <key>CFBundleExecutable</key> <string>Aseprite</string> <key>CFBundlePackageType</key> <string>APPL</string> </dict> </plist>
-
Force Spotlight to Re-index the app (if necessary)
In the Terminal, execute this:
mdimport ~/Applications/Aseprite.app
Now bring up Spotlight and search for Aseprite. You should see it there:
-
Optional: Add an Icon:
If you want the Aseprite to have its own icon in Spotlight search, you can first download the Aseprite macOS Big Sur icon from the Aseprite Community Forum. Place it in the
~/Applications/Aseprite.app/Contents/Resources/
directory. Then, in your Info.plist file, add this line at the end of the<dict>...</dict>
tag.... <key>CFBundleIconFile</key> <string>Aseprite.icns</string> </dict> </plist>
Bring up Spotlight again and search for Aseprite. You should now see the icon:
If the icon does appear correctly in your Dock, you can clear the cache and restart the Dock with:
sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \; sudo find /private/var/folders/ -name com.apple.iconservices -exec rm -rf {} \; killall Dock
Ta-da!
Conclusion
With these steps, you’ve successfully made Aseprite searchable via Spotlight, making it easy to launch without needing to open a terminal window. You can even right-click and Keep in Dock so you can launch it directly from your Dock.