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:
Want to experiment with beacons without buying one? There’s a new command line tool mBeacon that allows you to set up your Mac to advertise iBeacon.
You use by typing the following command:
$ mbeacon -uuid "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" -major 0 -minor 0
The ability to easily change the UUID, major and minor is also useful for development purposes where you wish to test, for example, an app that’s looking for lots of different beacons.