From an email to the pgf mailing list, Evan Sultanik has written a Java Library to create TikZ code. If you code in Java, then it might be useful even if the code is in early stages of development. The library can be found here.
Instructions on using the Library can be found in the email.
Instructions on using the Library can be found in the email.