npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@oiyonet/saju

v1.0.0

Published

Zero-dependency pure mathematical Korean Saju (Four Pillars / BaZi) and Five Elements astronomical calculation engine & MCP server.

Readme

🔮 @oiyo/saju & saju-mcp

Zero-dependency Pure Mathematical Korean Saju (Four Pillars / BaZi) & Five Elements Calculation Engine & MCP Server.
100% Deterministic (Zero LLM Hallucination), Astronomical Julian Day algorithms, Runs in <1ms.

License: MIT Node: >=18 Zero Dependencies Speed: <1ms


💡 Why This Matters (LLM Hallucination in Metaphysics)

When asked to calculate Four Pillars (Saju / BaZi), LLMs (Claude, GPT-4, Cursor) frequently hallucinate incorrect Chinese sexagenary cycles (60 Ganzhi) and Solar Terms (24절기) because astronomical solar year cutoffs (Lichun / 입춘) and Julian day cycles cannot be reliably inferred through next-token prediction.

@oiyo/saju solves this definitively:

  • Pure Astronomical Formulas: Julian Day Number & Solar Longitude algorithms.
  • Zero External API Calls: Runs locally, completely offline, privacy-safe (birthdates never leave the machine).
  • Comprehensive Analysis: Four Pillars (8 characters), Day Master (일간), Five Elements (오행 balance & percentages), and Ten Gods (십신).

🤖 1. AI Agent Integration (Claude Desktop & Cursor MCP)

Equip Claude Desktop, Cursor, or Zed with zero-hallucination Saju calculation tools via Model Context Protocol:

Claude Desktop Configuration (claude_desktop_config.json)

{
  "mcpServers": {
    "saju": {
      "command": "npx",
      "args": ["-y", "@oiyo/saju", "mcp"]
    }
  }
}

Now, ask Claude: "Calculate the Saju and Five Elements balance for someone born on July 12, 1993 at 15:00".
Claude will call calculate_saju and give you verified, astronomically precise Four Pillars.


💻 2. CLI Usage

Instant command-line calculation via npx:

# Syntax: npx @oiyo/saju <Year> <Month> <Day> [Hour] [Minute]
npx @oiyo/saju 1993 7 12 15

Output:

============================================================
📜 사주 명식(四柱 命式) 계산 결과 (1993년 7월 12일 15시)
============================================================
[사주 팔자 (四柱 八字)]
- 시주(時柱):  壬申 (Water/Metal) [편인(偏印)]
- 일주(日柱):  甲午 (Wood/Fire)   [일원(日元)] ⭐ 일간(Day Master)
- 월주(月柱):  戊申 (Earth/Metal) [편재(偏財)]
- 연주(年柱):  癸酉 (Water/Metal) [정인(正印)]
------------------------------------------------------------
[나의 본원: 일간(日干)]
- 일간: 甲 (Jia) - 목(木) [Yang]
------------------------------------------------------------
[오행(五行) 분포 비율]
- 목(木): 1개 (13%)
- 화(火): 1개 (13%)
- 토(土): 1개 (13%)
- 금(金): 3개 (38%)
- 수(水): 2개 (25%)
============================================================

📦 3. TypeScript / JavaScript SDK

import { calculateSaju } from '@oiyo/saju';

const saju = calculateSaju({
  year: 1993,
  month: 7,
  day: 12,
  hour: 15,
});

console.log('Day Master:', saju.day_master.stem, saju.day_master.element_ko);
console.log('Year Pillar:', saju.pillars.year.ganzhi);
console.log('Five Elements Balance:', saju.element_distribution);

📜 License

MIT License © OIYO Lab