Tool Open source · MIT
Zi Wei Dou Shu is an open-source Chinese astrology charting engine following Ni Haixia's Tian Ji teaching system. It generates charts from a Gregorian date and an hour-branch index, applying true-solar-time correction, China's 1986–1991 daylight-saving rules, configurable leap-month conventions, late Zi-hour handling, selectable star-brightness tables, natal/decade/annual Four Transformations, flying-star self-transformations, twelve spirits, and more than 1,100 pattern rules. The TypeScript engine is in lib/ziwei/, with generateChart() as its main entry point, and includes classical-text data and downloadable chart-interpretation datasets. The repository's code is MIT-licensed; its sample and interpretation datasets use CC BY 4.0, while included quotations from Ni Haixia's Tian Ji use CC BY-NC-SA 4.0. The open-source repository does not include the interpretation database, AI prompts, backend routes, accounts, payments, or deployment configuration.
1 use taken from transcripts — each links to the moment in the video.
An open-source engine for Ziwei Doushu, a form of traditional Chinese astrology, that casts charts from birth time with true solar time, leap months, four transformations, flying stars, and an 1100-rule pattern library, plus open datasets of sample charts and classical texts.
1 in the library.