There’s a new GitHub Swift source code project, cbeacon, that implements a command line program that transmits iBeacon advertisements. It works on macOS 10.12 or greater.
The author is also the author of another application, BeaconFinder, written in objective-c, that provides GUI tool for detecting iBeacons: