It works by brute force, enumerating for each successive integer radius sets of integer sides that produce a polygon. It takes an argument that is a limit on the number of sides to allow it to investigate small numbers of sides for a range of radiuses in a reasonable amount of time. It has an optional "-d" argument to make all the sides different.
It uses floating point trig functions to determine the angles, so it (a) has to have a small tolerance to allow for inexact calculation and (b) produces false positives. I've used double precision (assumed to be 64 bit) with a generous tolerance, and then check the successful results with 1000-bit precision using Gnu MPFR. Results that fail the check have a "?" in front of them; reject them.
rational-polygons -d 4 - quickly find rational quadrilaterals (and triangles) with all sides different.
rational-polygons 20 - find rational polygons with up to 20 sides; gets slow quickly
Below is output with up to 100 sides for radiuses up to 21. The 16-sided radius 21 case is an example of a false positive rejected by the multi-precision check; it's off by about 2E-13.