A Swift app to put your computer to sleep directly from Spotlight. Just build the app and install it in your applications folder.
You can download a signed version from here
Sleep is available under the MIT license. See the LICENSE file for details.