Quickstart
Usage Examples
If you’re new to the domain, read:
Core (Tree of Life)
import { createTree } from 'kaabalah/core';
const tree = createTree({ system: 'kaabalah', parts: ['westernAstrology', 'tarot'],});
// Traverse correspondences from a sphereconst kether = tree.getNode('sphere:Kether');console.log(kether?.name);Numerology (life path)
import { calculateKaabalisticLifePath } from 'kaabalah/numerology';
const lifePath = calculateKaabalisticLifePath(new Date(1990, 5, 15, 12)); // local noon
console.log(lifePath.lifePath.reducedValue);console.log(lifePath.syntheses.finalSynthesis);Gematria (text → number)
import { calculateGematria } from 'kaabalah/gematria';
const gematria = calculateGematria('DAVID');
console.log(gematria.synthesis.originalSum);console.log(gematria.vowels.originalSum);console.log(gematria.consonants.originalSum);Tarot (shuffle + draw)
import { ARKANNUS, shuffleTarotDeck, getTarotCardProfile } from 'kaabalah/tarot';
const shuffled = await shuffleTarotDeck(ARKANNUS, /* inverted */ true);const spread = shuffled.slice(0, 3);
console.log(spread.map((c) => c.tarotCard));
// Rich card metadata (meanings, keywords, deck descriptions)const profile = getTarotCardProfile(ARKANNUS[0]);console.log(profile.descriptions);Astrology (birth chart)
import { getBirthChart, HouseSystem } from 'kaabalah/astrology';
const chart = await getBirthChart({ date: { year: 1990, month: 6, day: 15, hour: 12, minute: 30 }, latitude: 40.7128, longitude: -74.0060, houseSystem: HouseSystem.PLACIDUS, timeZoneSettings: { timeZone: 'America/New_York' },});
console.log(chart.planets.sun.zodiacPosition.sign);console.log(chart.houses.ascendant.sign);console.log(chart.sect); // "diurnal" | "nocturnal"I Ching
import { getIChingReading, getHexagramDescription } from 'kaabalah/iching';
const reading = getIChingReading('879777'); // six lines, bottom to top
console.log(reading.cast.hexagram.number);console.log(reading.oracle[0].text.english);console.log(getHexagramDescription(reading.cast.hexagram.number));For Portuguese text pass a language: getIChingReadingContent('879777', 'pt-BR') returns the same reading with a Portuguese content next to every classical text.
Store the six line values. The cast, the moving lines, and the texts are derived from them.
Ifa
import { calculateOdu } from 'kaabalah/ifa';
const odu = calculateOdu(new Date('1990-01-15'));
console.log(odu.north, odu.south, odu.east, odu.west, odu.center);Maya astrology
import { getMayaCalendarDay } from 'kaabalah/maya';
console.log(getMayaCalendarDay('2026-11-26'));Tattwa
import { generateTattwaSvg } from 'kaabalah/tattwa';
const svg = generateTattwaSvg('apas', { inner: 'tejas' });Command line
npx kaabalah numerology 1990-06-15 --json --compactnpx kaabalah iching:reading --lines 879777 --json --compactnpx kaabalah tarot:card 7 --language pt-BR --json --compactnpx kaabalah help --jsonSee the CLI reference.
Semantic (occult theme search)
import { getTarotThemeProfile, tokenizeOccultThemeText } from 'kaabalah/semantic';
// Lookup by card number, name, filename, or path slugconst profile = getTarotThemeProfile(1); // The Magicianconsole.log(profile?.keywords);console.log(profile?.correspondences.planets);
// Tokenize free text for search indexingconst tokens = tokenizeOccultThemeText('transformation and hidden power');console.log(tokens);Visual (Tree of Life SVG)
import { generateTreeSvg, getTreeRenderModel } from 'kaabalah/visual';
// Basic colored treeconst svg = generateTreeSvg({ palette: 'color', system: 'kaabalah',});
// Render model for interactive overlays: hit targets, tooltip anchors,// canonical colors, and geometry — all in SVG viewBox unitsconst model = getTreeRenderModel();const kether = model.sphereById['sphere:Kether'];console.log(kether.geometry.viewBoxUnits.hitTarget); // { kind: 'circle', cx, cy, r }console.log(kether.geometry.viewBoxUnits.anchor); // { x, y, vertical: 'below' }console.log(kether.canonicalColor); // '#cccccc'console.log(kether.material.kind); // 'special'