Destiny Book
All tools

OPEN SOURCE · CLI + AGENT SKILL

Let your AI read the chart,not guess the Useful Element.

The Destiny Book client and Agent Skill for AI agents are open source under the MIT license, with the code on GitHub. The client calls the chart engine running on the mymingshu.com server, and one call returns the chart facts and the engine determinations: beyond the Four Pillars, hidden stems and Ten Gods you get the structure, the Day Master strength with its evidence, the Useful, Favorable and Unfavorable Elements, seasonal balance, wealth vault, benefactors, Shensha and the career palace. The engine decides; your AI explains.

Install with one command
npm install -g github:PanYX/mingshu-bazi
  • MIT license
  • Node.js 20+
  • Works with Codex and Claude Code

01 / Install

Let your AI install it, install it yourself, or just try it online.

The CLI installs straight from GitHub, so no npm account is needed. Run mingshu setup afterwards and it wires the chart engine into your AI assistant.

Let your AI install it

Send the message below to Codex, Claude Code or another assistant that can run local commands. It installs the client and checks the connection for you.

Install Destiny Book for me: https://github.com/PanYX/mingshu-bazi
Read docs/agent-install.md in the project, then complete the installation and connection check.

Install it yourself

You need Node.js 20 or later and Git. Two commands; the second one asks whether you use Codex or Claude Code.

npm install -g github:PanYX/mingshu-bazi
mingshu setup

npm is only the installer here. Keep the full github:PanYX/mingshu-bazi address rather than the package name mingshu-cli, which is not published to npm.

Try it online first

Not ready to install? Create a chart on the website and see what the same engine returns.

Create a chart online

Trying it online needs no installation, and nothing is uploaded from or saved to your machine.

02 / The difference

Anyone can print the Four Pillars.
The determinations are what separate these tools.

Most open-source BaZi skills return the Four Pillars and the Ten Gods. Ask what your Useful Element is and the assistant has to invent an answer. Destiny Book has the engine make that call, then lets your AI explain it.

What comes backFour-Pillars-only projectsDestiny Book CLI
Four Pillars, hidden stems, Ten GodsYesYes, with element weights
Day Master strengthNo evidenceSupport from season, root and allies, listed one by one
Useful, Favorable, UnfavorableLeft to the assistantReturned by the engine
Seasonal balanceUsually missingRegulating stems with a rating
Wealth stars, vault, capacityUsually missingVault opening condition and carrying capacity
Career palace, benefactors, ShenshaUsually missingPosition with its supporting evidence
Time basisNot statedTrue solar or clock time, stated explicitly; ambiguity fails loudly
LanguagesUsually Chinese onlyFive languages, same facts and same digest

The gap is not whether the Four Pillars are computed correctly. It is who makes the calls on the Useful Element, the favorable and unfavorable elements and the strength evidence. The engine returns the determination with its basis, and the AI explains it. Neither one pretends to be the other.

03 / Real output

One call returns a chart you can explain right away.

This is the unedited response for a fictional example, reproduced exactly as the engine returns it. The Useful, Favorable and Unfavorable Elements and the strength evidence are already inside, so the assistant does not have to guess.

mingshu chart
Xin Metal (辛) · Follow-the-Strong Structure · Follow-the-Strong
Useful Element: Metal    Favorable: Earth    Unfavorable: Fire
Seasonal balance: Bing Fire (丙) · Ren Water (壬) · Wu Earth (戊) (Excellent)
Five Elements: Wood 4%   Fire 10%   Earth 43%   Metal 38%   Water 5%
Ten Gods: Companions 38%   Resource 43%   Output 5%   Wealth 4%   Authority 10%
Year Pillar  辛未  Friend
Month Pillar  辛丑  Friend
Day Pillar  辛巳  Day Master
Hour Pillar  己亥  Indirect Resource
Luck Cycles: 甲辰 2021-2030 · 乙巳 2031-2040 · 丙午 2041-2050 · 丁未 2051-2060

Without flags, the terminal prints a readable brief.

mingshu chart --json
{
  "judgments": {
    "pattern": "Follow-the-Strong Structure",
    "strength": {
      "label": "Follow-the-Strong",
      "deLing": {
        "ok": true,
        "text": "Month Branch Chou Earth (丑) supports the Day Master."
      }
    },
    "useful": [
      "Metal"
    ],
    "favorable": [
      "Earth"
    ],
    "unfavorable": [
      "Fire"
    ]
  },
  "chartDigest": "e733dfec6fbb98c2f17b4dd946ad19aa1f6bd76476b7cda226f12431a1eb0226"
}

With --json the determinations arrive with their evidence and field names, ready for an assistant to cite. Request the same chart in all five languages and the digest stays identical.

04 / Live check

One chart, five languages, one identical digest.

This is a real call to the public API. Run it again in another language: the facts, the enum values and the digest stay the same, and only the wording follows the language.

05 / Commands

A short command list your assistant can follow.

Every command supports --json. Failures exit with code 1 and return an error carrying a code and a message.

  • mingshu setupInstall the Skill into your AI assistant and check the service connection
  • mingshu version --jsonShow the CLI and Node.js versions
  • mingshu capabilities --jsonList capabilities, input contract and limits
  • mingshu doctor --jsonCheck service connectivity without sending birth details
  • mingshu example --jsonPrint a fictional sample birth input
  • mingshu validate --input birth.json --jsonValidate input locally, with no network request
  • mingshu locations --query "Shanghai" --locale en --jsonLook up a city-level place ID
  • mingshu chart --input birth.json --jsonCreate the chart and return the facts and determinations
  • mingshu skillsPrint the bundled Skill in full
  • mingshu website --locale enPrint website links without opening a browser

The default service address is https://mymingshu.com. Override it with --origin or MINGSHU_API_ORIGIN; a different address means birth details go to that server instead.

06 / Boundaries

What is open source, and what stays on the server.

The open source part

The client, the API contract, the Skill and the documentation live in a public repository under the MIT license. You can use, modify and redistribute them.

The hosted service

The chart engine, accounts and paid reports run on the mymingshu.com servers and are not part of the open repository. The CLI calls the live API, so you do not have to run anything yourself.

Birth details

A chart request sends only what you enter, to the address you choose. There is no database write and no profile. Links back to the website carry a source parameter and no birth details. The client never charges you and never calls a model.

Reading boundaries

Structure, Day Master strength, the Useful, Favorable and Unfavorable Elements and the seasonal balance all come from fixed tables. They are this engine's determinations and may differ from other schools. Element and Ten Gods percentages are engine weights, not probabilities. Readings stay inside a cultural tradition and are not medical, legal or investment advice.

FAQ

Common questions about the CLI.

01What is this CLI, and does it cost anything?

It is the open-source command line client for the chart engine behind Destiny Book, MIT licensed and free to use or redistribute. It only creates charts and returns the engine determinations. It does not generate AI readings and does not charge anything.

02How is it different from other open-source BaZi tools?

Most open-source projects return the Four Pillars and the Ten Gods, leaving the Useful Element to the assistant. Here fixed tables supply the structure, the Day Master strength evidence, the Useful and unfavorable elements and the seasonal balance. The assistant explains them and cannot rewrite them.

03What do I need in order to install it?

Node.js 20 or later and Git. The install command pulls straight from GitHub, so no npm account is required, and an AI assistant that can run local commands can do the whole step for you.

04Does a chart request store my birth details?

No. The request sends your details only to the address you choose, and the endpoint writes no database row and creates no profile. Links back to the website carry a source parameter and no birth date, time or place.

05Can I treat the result as a prediction?

No. Structure, strength and the Useful Element come from fixed tables in this engine and may differ from other schools. Treat them as one traditional reading among several, and keep real-world information in the picture for decisions that matter.

07 / Docs

Want to read the code first?

The public repository documents the installation, the API contract and worked demos.

One command puts the chart engine inside your AI.

Once it is installed, tell your assistant to use Destiny Book and read your BaZi chart. It collects the birth details, calls the CLI and explains what comes back.

npm install -g github:PanYX/mingshu-bazi

The client is distributed straight from GitHub. No npm account, and no access to your local files.