kaabalah 6.4.0 → 6.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -384
- package/dist/{chunk-7WG6PUEN.js → chunk-UG6HZK3Z.js} +65 -4
- package/dist/chunk-UG6HZK3Z.js.map +1 -0
- package/dist/{chunk-PBPYXWX4.mjs → chunk-UN7QMOMX.mjs} +65 -4
- package/dist/chunk-UN7QMOMX.mjs.map +1 -0
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/index.js +20 -20
- package/dist/index.mjs +1 -1
- package/dist/semantic/index.d.mts +1 -1
- package/dist/semantic/index.d.ts +1 -1
- package/dist/semantic/index.js +20 -20
- package/dist/semantic/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-7WG6PUEN.js.map +0 -1
- package/dist/chunk-PBPYXWX4.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -1,23 +1,14 @@
|
|
|
1
1
|
# Kaabalah
|
|
2
2
|
|
|
3
|
-
A comprehensive TypeScript library for numerology, astrology, kaabalah,
|
|
3
|
+
A comprehensive TypeScript library for numerology, astrology, kaabalah, gematria, tarot, and Ifa divination.
|
|
4
4
|
|
|
5
5
|
<p align="center">
|
|
6
6
|
<img src="./examples/tree-of-life-readme.svg" alt="Color Tree of Life rendered from kaabalah/visual" width="420" />
|
|
7
7
|
</p>
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Documentation
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
## Features
|
|
14
|
-
|
|
15
|
-
- **Tree of Life**: A modular and performant tree of life system to help you build correspondences across different systems
|
|
16
|
-
- **Numerology**: Calculate life path numbers and other numerological values
|
|
17
|
-
- **Astrology**: Generate birth charts and planetary positions using Swiss Ephemeris
|
|
18
|
-
- **Gematria**: Gematria (text numerology) calculations
|
|
19
|
-
- **Tarot**: Card meanings, spreads, and interpretations
|
|
20
|
-
- **Semantic profiles**: Canonical house and tarot theme metadata for deterministic matching
|
|
11
|
+
Full API reference, guides, and examples: **[docs.kaabalah.com](https://docs.kaabalah.com/)**
|
|
21
12
|
|
|
22
13
|
## Installation
|
|
23
14
|
|
|
@@ -25,401 +16,66 @@ Complete documentation here [https://docs.kaabalah.com/](https://docs.kaabalah.c
|
|
|
25
16
|
npm install kaabalah
|
|
26
17
|
```
|
|
27
18
|
|
|
28
|
-
Node.js 18.18+
|
|
19
|
+
Node.js 18.18+ required.
|
|
29
20
|
|
|
30
|
-
##
|
|
21
|
+
## Modules
|
|
31
22
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
[](https://ko-fi.com/matmoura19)
|
|
23
|
+
All modules are tree-shakable and can be imported independently:
|
|
35
24
|
|
|
36
|
-
|
|
25
|
+
| Module | Import | Description |
|
|
26
|
+
|--------|--------|-------------|
|
|
27
|
+
| Core | `kaabalah/core` | Tree of Life graph with cross-system correspondences |
|
|
28
|
+
| Numerology | `kaabalah/numerology` | Life path, cycles, challenges, personal year |
|
|
29
|
+
| Astrology | `kaabalah/astrology` | Birth charts, synastry, composite, transits, solar returns, profections, firdaria, astrocartography, dignity, decans, dodecatemoria |
|
|
30
|
+
| Gematria | `kaabalah/gematria` | Hebrew letter numerology |
|
|
31
|
+
| Tarot | `kaabalah/tarot` | 78-card deck with profiles, archetypes, correspondences, multi-deck images, spread engine |
|
|
32
|
+
| Ifa | `kaabalah/ifa` | Odu divination |
|
|
33
|
+
| Semantic | `kaabalah/semantic` | Theme profiles, kaabalistic overlay correspondences, symbol metadata |
|
|
34
|
+
| Visual | `kaabalah/visual` | Tree of Life SVG generation and layout data |
|
|
37
35
|
|
|
38
|
-
|
|
36
|
+
## Quick Example
|
|
39
37
|
|
|
40
38
|
```typescript
|
|
41
|
-
import { createTree } from 'kaabalah/core';
|
|
42
|
-
|
|
43
|
-
const tree = createTree({
|
|
44
|
-
system: 'kaabalah',
|
|
45
|
-
parts: ['westernAstrology', 'tarot'],
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
const gematriaResult = calculateGematria('kaabalah', tree);
|
|
49
|
-
|
|
50
|
-
console.log(gematriaResult);
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
### Direct Module Imports (Tree-Shakable)
|
|
54
|
-
|
|
55
|
-
```typescript
|
|
56
|
-
// Only import what you need
|
|
57
|
-
import { calculateLifePath } from 'kaabalah/numerology';
|
|
39
|
+
import { createTree, id, KaabalahTypes } from 'kaabalah/core';
|
|
58
40
|
import { getBirthChart } from 'kaabalah/astrology';
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
|
|
63
|
-
// Calculate life path number
|
|
64
|
-
const lifePath = calculateLifePath(new Date('1990-01-15'));
|
|
65
|
-
|
|
66
|
-
// Generate a birth chart (with Swiss Ephemeris)
|
|
67
|
-
const birthChart = getBirthChart({
|
|
68
|
-
date: new Date('1990-01-15T12:30:00Z'),
|
|
69
|
-
latitude: 40.7128,
|
|
70
|
-
longitude: -74.0060,
|
|
71
|
-
timezone: -5
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
// Calculate Hebrew gematria
|
|
75
|
-
const gematriaValue = calculateGematria('kaabalah');
|
|
76
|
-
const fourthHouse = getHouseThemeProfile(4);
|
|
77
|
-
|
|
78
|
-
// Get a tarot spread
|
|
79
|
-
const spread = getRandomSpread(3, true);
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
### Canonical Tarot Image Resolution
|
|
83
|
-
|
|
84
|
-
```typescript
|
|
85
|
-
import { id, KaabalahTypes } from "kaabalah/core";
|
|
86
|
-
import {
|
|
87
|
-
getTarotArchetype,
|
|
88
|
-
getTarotCardByNumber,
|
|
89
|
-
getTarotCardNumber,
|
|
90
|
-
getTarotCorrespondenceProfile,
|
|
91
|
-
getTarotCardProfile,
|
|
92
|
-
getTarotRepresentation,
|
|
93
|
-
listTarotTrees,
|
|
94
|
-
resolveTarotImageUrl
|
|
95
|
-
} from "kaabalah/tarot";
|
|
96
|
-
|
|
97
|
-
const archetype = getTarotArchetype({
|
|
98
|
-
pathId: id(KaabalahTypes.PATH, 2)
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
const riderWaite = getTarotRepresentation({ pathSlug: "beth" }, "rider-waite");
|
|
102
|
-
const queenOfCups = getTarotRepresentation(
|
|
103
|
-
{ tarotCardName: "Queen of Cups" },
|
|
104
|
-
"rider-waite"
|
|
105
|
-
);
|
|
106
|
-
const tenOfSwords = getTarotRepresentation(
|
|
107
|
-
{ tarotCardNumber: 55 },
|
|
108
|
-
"mythic"
|
|
109
|
-
);
|
|
110
|
-
const aceOfPentacles = getTarotCardProfile({
|
|
111
|
-
tarotCardName: "Ace of Pentacles"
|
|
112
|
-
});
|
|
113
|
-
const aceOfPentaclesNumber = getTarotCardNumber({
|
|
114
|
-
tarotCardName: "Ace of Pentacles"
|
|
115
|
-
});
|
|
116
|
-
const kingOfSwords = getTarotCardByNumber(51);
|
|
117
|
-
const tarotTrees = listTarotTrees();
|
|
118
|
-
const papusImageUrl = resolveTarotImageUrl(
|
|
119
|
-
{ tarotCardFilename: "02_the_high_priestess" },
|
|
120
|
-
"papus_pt"
|
|
121
|
-
);
|
|
122
|
-
const aceOfWandsUrl = resolveTarotImageUrl(
|
|
123
|
-
{ tarotCardFilename: "ace_wands" },
|
|
124
|
-
"papus_pt"
|
|
125
|
-
);
|
|
126
|
-
|
|
127
|
-
// Persist the canonical archetype ID (for example `path:2`), not the image URL.
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
`getTarotArchetype()` remains major-only. The image helpers (`getTarotRepresentation()`, `getTarotRepresentations()`, and `resolveTarotImageUrl()`) support all 78 cards and own the canonical asset rules:
|
|
131
|
-
|
|
132
|
-
- majors: `major/<filename>.jpg`
|
|
133
|
-
- minors: `minor/<suit>/<filename>.jpg`
|
|
134
|
-
- courts: `daat+royalship/<suit>/<filename>.jpg`
|
|
135
|
-
|
|
136
|
-
Downstream apps should consume the returned `imageUrl` (or `assetPath`) from the library instead of reconstructing S3 paths locally.
|
|
137
|
-
|
|
138
|
-
Tarot numbering is tree-scoped. In the current library release the canonical default tree is `kaabalah`, and `getTarotCardProfile()` resolves its `tarotCardNumber` from the direct `tarotArkAnnu ↔ number` correspondence in that tree. Use `getTarotCardNumber()` / `getTarotCardByNumber()` for forward and reverse numbering lookups, and treat raw `ARKANNUS` entries as compatibility data rather than the source of truth.
|
|
139
|
-
|
|
140
|
-
For display-facing correspondences, use `getTarotCorrespondenceProfile()` instead of rebuilding card bundles in the app:
|
|
141
|
-
|
|
142
|
-
```typescript
|
|
143
|
-
const pageOfWands = getTarotCorrespondenceProfile({
|
|
144
|
-
tarotCardName: "Page of Wands"
|
|
145
|
-
});
|
|
146
|
-
// {
|
|
147
|
-
// kind: "court",
|
|
148
|
-
// courtRank: "page",
|
|
149
|
-
// correspondences: {
|
|
150
|
-
// element: { id: "westernElement:Fire", label: "Fire" }
|
|
151
|
-
// }
|
|
152
|
-
// }
|
|
153
|
-
|
|
154
|
-
const magician = getTarotCorrespondenceProfile({
|
|
155
|
-
tarotCardName: "The Magician"
|
|
156
|
-
});
|
|
157
|
-
// includes typed astrology correspondences plus path metadata
|
|
158
|
-
// { pathId, pathNumber, pathSlug, hebrewLetter, fromSphere, toSphere, meaning }
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
Downstream apps no longer need to parse card-name prefixes like `Page of ...` to determine court rank, or rebuild the same major/court/minor correspondence collapsing logic from raw tree traversals.
|
|
162
|
-
|
|
163
|
-
Observable kaabalah-default renumbering:
|
|
164
|
-
|
|
165
|
-
- `Ten of Swords` is `55` and `Ace of Swords` is `64`
|
|
166
|
-
- `Ten of Pentacles` is `69` and `Ace of Pentacles` is `78`
|
|
167
|
-
- court/minor suit blocks run `King → Queen → Knight → Page → Ten → ... → Ace`
|
|
168
|
-
|
|
169
|
-
### Canonical Semantic Profiles
|
|
170
|
-
|
|
171
|
-
```typescript
|
|
172
|
-
import {
|
|
173
|
-
getHouseThemeProfile,
|
|
174
|
-
getTarotThemeProfile,
|
|
175
|
-
listHouseThemeProfiles,
|
|
176
|
-
tokenizeOccultThemeText
|
|
177
|
-
} from "kaabalah/semantic";
|
|
178
|
-
|
|
179
|
-
const dreamTokens = tokenizeOccultThemeText(
|
|
180
|
-
"I dreamed about family, roots, and hidden rooms."
|
|
181
|
-
);
|
|
182
|
-
|
|
183
|
-
const fourthHouse = getHouseThemeProfile(4);
|
|
184
|
-
const tower = getTarotThemeProfile("The House of God");
|
|
185
|
-
const houseProfiles = listHouseThemeProfiles();
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
Semantic profiles are deterministic, library-owned metadata layered on top of canonical correspondences. Downstream apps should consume the profile `id`, `houseNumber` or `cardNumber`, `keywords`, `tokens`, and grouped `correspondences`, while keeping scoring, ranking, and UI presentation app-side.
|
|
189
|
-
For houses, `primaryLabel` is the semantic life-area label and `houseLabel` preserves the structural astrological label (`Ascendant`, `Imum Coeli`, `Descendant`, `Medium Coeli`, etc.).
|
|
190
|
-
|
|
191
|
-
### Kaabalistic Overlay Correspondences
|
|
192
|
-
|
|
193
|
-
```typescript
|
|
194
|
-
import {
|
|
195
|
-
buildKaabalisticMapData,
|
|
196
|
-
getAstrologyTreeMarkers,
|
|
197
|
-
getKaabalisticCorrespondenceTargets,
|
|
198
|
-
getPlanetSymbolMetadata,
|
|
199
|
-
getZodiacSignSymbolMetadata
|
|
200
|
-
} from "kaabalah/semantic";
|
|
201
|
-
|
|
202
|
-
const signTargets = getKaabalisticCorrespondenceTargets({
|
|
203
|
-
kind: "sign",
|
|
204
|
-
sign: "Libra"
|
|
205
|
-
});
|
|
206
|
-
|
|
207
|
-
const sunSymbol = getPlanetSymbolMetadata("Sun");
|
|
208
|
-
const libraSymbol = getZodiacSignSymbolMetadata("Libra");
|
|
209
|
-
|
|
210
|
-
const astrologyMarkers = getAstrologyTreeMarkers({
|
|
211
|
-
planets,
|
|
212
|
-
nodes,
|
|
213
|
-
houses,
|
|
214
|
-
});
|
|
215
|
-
|
|
216
|
-
const mapData = buildKaabalisticMapData({
|
|
217
|
-
astrology: { planets, nodes, houses },
|
|
218
|
-
numerology: birthDate,
|
|
219
|
-
gematria: name,
|
|
220
|
-
});
|
|
221
|
-
```
|
|
41
|
+
import { calculateKaabalisticLifePath } from 'kaabalah/numerology';
|
|
42
|
+
import { getTarotCorrespondenceProfile } from 'kaabalah/tarot';
|
|
43
|
+
import { generateTreeSvg } from 'kaabalah/visual';
|
|
222
44
|
|
|
223
|
-
|
|
45
|
+
const tree = createTree({ system: 'kaabalah', parts: ['westernAstrology', 'tarot'] });
|
|
46
|
+
const correspondences = tree.getCorrespondences(id(KaabalahTypes.SPHERE, 'Tiphareth'), { depth: 2 });
|
|
224
47
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
The rendering layer should stay thin: ask `kaabalah/semantic` for correspondences or marker descriptors, then place them with `getTreeLayout()` from `kaabalah/visual`.
|
|
230
|
-
|
|
231
|
-
### Canonical Tree SVG Rendering
|
|
232
|
-
|
|
233
|
-
```typescript
|
|
234
|
-
import { generateTreeSvg, getTreeLayout } from "kaabalah/visual";
|
|
235
|
-
|
|
236
|
-
const svg = generateTreeSvg({
|
|
237
|
-
background: "transparent",
|
|
238
|
-
palette: "monochrome",
|
|
239
|
-
daathLayer: "back",
|
|
240
|
-
});
|
|
241
|
-
|
|
242
|
-
const layout = getTreeLayout();
|
|
243
|
-
const tiphareth = layout.percentages.spheres["sphere:Tiphareth"];
|
|
244
|
-
const path15 = layout.percentages.paths["path:15"];
|
|
245
|
-
```
|
|
246
|
-
|
|
247
|
-
`generateTreeSvg()` renders the structural tree only: paths and spheres, with no astrology, numerology, gematria, or app-specific overlays. Use it when an app needs a reusable base SVG, then place badges or glyphs using `getTreeLayout()` rather than reimplementing the coordinate math.
|
|
248
|
-
|
|
249
|
-
Contract notes:
|
|
250
|
-
|
|
251
|
-
- the exported `percentages` map is the canonical frontend grid shared with the existing app tree views
|
|
252
|
-
- `viewBoxUnits` exposes the same positions in the default `286 x 561` SVG coordinate space
|
|
253
|
-
- `palette: "color"` preserves the full-color Melkitzedeki rendering, including the special Kether, Chokhmah, Daath, and Malkuth sphere treatments
|
|
254
|
-
- `palette: "monochrome"` simplifies the tree to plain-circle spheres with a light body and dark outline, so it still reads as a luminous tree on transparent or dark backgrounds
|
|
255
|
-
- `daathLayer: "back"` places the Daath sphere behind the paths while still emitting a transparent top hit area for inline SVG interaction
|
|
256
|
-
|
|
257
|
-
### Canonical Tarot Spreads
|
|
258
|
-
|
|
259
|
-
```typescript
|
|
260
|
-
import {
|
|
261
|
-
drawTarotSpread,
|
|
262
|
-
getTarotSpread,
|
|
263
|
-
listTarotSpreads,
|
|
264
|
-
validateTarotSpreadSelection
|
|
265
|
-
} from "kaabalah/tarot";
|
|
266
|
-
|
|
267
|
-
const spreads = listTarotSpreads();
|
|
268
|
-
const treeOfLife = getTarotSpread("tree-of-life-reading");
|
|
269
|
-
|
|
270
|
-
const drawn = drawTarotSpread({
|
|
271
|
-
spreadId: "event-reading",
|
|
272
|
-
context: { inquirerGender: "man" },
|
|
273
|
-
includeInverted: true
|
|
48
|
+
const chart = await getBirthChart({
|
|
49
|
+
date: { year: 1990, month: 6, day: 15, hour: 14, minute: 30 },
|
|
50
|
+
latitude: 48.856, longitude: 2.352,
|
|
274
51
|
});
|
|
275
52
|
|
|
276
|
-
const
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
cards: drawn.cards.map((card) => ({
|
|
280
|
-
slotKey: card.slotKey,
|
|
281
|
-
cardNumber: card.cardNumber,
|
|
282
|
-
isInverted: card.isInverted
|
|
283
|
-
}))
|
|
284
|
-
});
|
|
53
|
+
const lifePath = calculateKaabalisticLifePath(new Date('1990-06-15'));
|
|
54
|
+
const magician = getTarotCorrespondenceProfile({ tarotCardName: 'The Magician' });
|
|
55
|
+
const svg = generateTreeSvg({ background: 'transparent', palette: 'monochrome' });
|
|
285
56
|
```
|
|
286
57
|
|
|
287
|
-
Downstream apps should consume `spreadId`, `slotKey`, and the slot constraint metadata from the library instead of hardcoding spread semantics. Persist the reading state as canonical spread/card data such as `spreadId`, `slotKey`, `cardNumber`, `isInverted`, and app-side notes.
|
|
288
|
-
|
|
289
58
|
## CLI
|
|
290
59
|
|
|
291
|
-
Kaabalah includes a command-line interface for quick calculations without writing code.
|
|
292
|
-
|
|
293
|
-
```bash
|
|
294
|
-
# Install globally
|
|
295
|
-
npm install -g kaabalah
|
|
296
|
-
|
|
297
|
-
# Or run directly with npx
|
|
298
|
-
npx kaabalah help
|
|
299
|
-
```
|
|
300
|
-
|
|
301
|
-
### Commands
|
|
302
|
-
|
|
303
|
-
| Command | Description |
|
|
304
|
-
|---------|-------------|
|
|
305
|
-
| `gematria <text>` | Calculate gematria for a word or phrase |
|
|
306
|
-
| `gematria:reverse <number>` | Find letter combinations matching a gematria value |
|
|
307
|
-
| `numerology <date>` | Full numerological profile for a birth date |
|
|
308
|
-
| `numerology:lifepath <date>` | Life path number (kaabalistic method) |
|
|
309
|
-
| `numerology:cycles <date> [name]` | Personal cycles (year, month, periods) |
|
|
310
|
-
| `numerology:challenges <date>` | Challenges from birth date |
|
|
311
|
-
| `numerology:fibonacci <date>` | Fibonacci cycle for current age |
|
|
312
|
-
| `astrology <date> [time]` | Calculate birth chart with aspects using Swiss Ephemeris |
|
|
313
|
-
| `astrology:synastry` | Cross-chart aspects between two birth charts (via `--input-json`) |
|
|
314
|
-
| `astrology:composite` | Midpoint composite chart from two birth charts (via `--input-json`) |
|
|
315
|
-
| `tarot [count]` | Draw tarot cards (default: 3) |
|
|
316
|
-
| `tarot:card <number>` | Look up a specific card (1-78) |
|
|
317
|
-
| `ifa <date>` | Calculate Odu from a date |
|
|
318
|
-
| `tree` | Show Tree of Life structure with all nodes, data, and edges |
|
|
319
|
-
| `tree:node <id>` | Look up a node and all its correspondences |
|
|
320
|
-
| `tree:types` | List all node types and their counts |
|
|
321
|
-
|
|
322
|
-
### Examples
|
|
323
|
-
|
|
324
|
-
```bash
|
|
325
|
-
kaabalah gematria "Hello World"
|
|
326
|
-
kaabalah numerology 1990-01-15
|
|
327
|
-
kaabalah numerology:cycles 1990-01-15 John
|
|
328
|
-
kaabalah tarot 5 --inverted
|
|
329
|
-
kaabalah tarot:card 7
|
|
330
|
-
kaabalah gematria:reverse 22
|
|
331
|
-
kaabalah ifa 1990-01-15
|
|
332
|
-
kaabalah astrology 1990-01-15 14:30 --lat=40.7128 --lon=-74.006
|
|
333
|
-
kaabalah astrology 1990-01-15 14:30 --location="New York, USA"
|
|
334
|
-
|
|
335
|
-
# Synastry (cross-chart aspects)
|
|
336
|
-
kaabalah astrology:synastry --input-json=- --json < synastry.json
|
|
337
|
-
|
|
338
|
-
# Composite (midpoint chart)
|
|
339
|
-
kaabalah astrology:composite --input-json=- --json < composite.json
|
|
340
|
-
|
|
341
|
-
# Tree of Life correspondences
|
|
342
|
-
kaabalah tree:node path:1 --json
|
|
343
|
-
kaabalah tree:node "tarotArkAnnu:The Magician" --depth=2 --json
|
|
344
|
-
kaabalah tree:node sphere:Kether --type=tarotArkAnnu --json
|
|
345
|
-
kaabalah tree:node westernZodiacSign:Libra --depth=2 --json --fields=correspondenceMap.sphere,correspondenceMap.path,correspondenceMap.westernElement
|
|
346
|
-
```
|
|
347
|
-
|
|
348
|
-
### Global Flags
|
|
349
|
-
|
|
350
|
-
| Flag | Description |
|
|
351
|
-
|------|-------------|
|
|
352
|
-
| `--json` | JSON output (auto-enabled when stdout is not a TTY) |
|
|
353
|
-
| `--no-json` | Force human-readable output even when piped |
|
|
354
|
-
| `--compact` | Minified JSON (no indentation) |
|
|
355
|
-
| `--fields=a.b,c.d` | Filter JSON output to specified dot-paths |
|
|
356
|
-
| `--input-json=-` | Read a JSON object from stdin |
|
|
357
|
-
| `--debug` | Emit debug logs to stderr (same effect as `DEBUG=kaabalah:*`) |
|
|
358
|
-
| `--trace` | Print stack traces for unexpected fatal errors in human-readable mode |
|
|
359
|
-
|
|
360
|
-
### Schema Introspection
|
|
361
|
-
|
|
362
|
-
```bash
|
|
363
|
-
# Full schema of all commands
|
|
364
|
-
kaabalah help --json
|
|
365
|
-
|
|
366
|
-
# Schema for a specific command
|
|
367
|
-
kaabalah help astrology --json
|
|
368
|
-
```
|
|
369
|
-
|
|
370
|
-
### Debugging
|
|
371
|
-
|
|
372
|
-
```bash
|
|
373
|
-
# Emit parser/config/astrology debug logs to stderr
|
|
374
|
-
DEBUG=kaabalah:* kaabalah help --json
|
|
375
|
-
|
|
376
|
-
# Same as above, but from the CLI flag
|
|
377
|
-
kaabalah astrology 1990-01-15 14:30 --lat=40.7128 --lon=-74.006 --debug
|
|
378
|
-
|
|
379
|
-
# Add --trace while reproducing an unexpected fatal error locally
|
|
380
|
-
kaabalah <command> --trace --no-json
|
|
381
|
-
```
|
|
382
|
-
|
|
383
|
-
## Development
|
|
384
|
-
|
|
385
|
-
This project uses TypeScript and WebAssembly for the Swiss Ephemeris calculations.
|
|
386
|
-
|
|
387
|
-
### Building the Project
|
|
388
|
-
|
|
389
|
-
```bash
|
|
390
|
-
npm run build
|
|
391
|
-
```
|
|
392
|
-
|
|
393
|
-
### Development Mode
|
|
394
|
-
|
|
395
60
|
```bash
|
|
396
|
-
|
|
61
|
+
npx kaabalah help # list all commands
|
|
62
|
+
npx kaabalah help --json # full schema introspection
|
|
63
|
+
npx kaabalah numerology 1990-01-15 --json --compact
|
|
64
|
+
npx kaabalah astrology 1990-01-15 14:30 --lat=40.71 --lon=-74 --json
|
|
65
|
+
npx kaabalah tree:node "tarotArkAnnu:The Magician" --depth=2 --json
|
|
397
66
|
```
|
|
398
67
|
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
The astrological calculations use the Swiss Ephemeris library, compiled to WebAssembly for use in both Node.js and browser environments.
|
|
68
|
+
27 commands covering all modules. See the [CLI Reference](https://docs.kaabalah.com/getting-started/cli/) for the full list.
|
|
402
69
|
|
|
403
|
-
|
|
70
|
+
## Support
|
|
404
71
|
|
|
405
|
-
|
|
406
|
-
import { getSwissEph, resolveSwissEphRuntimeAssets } from "kaabalah/astrology";
|
|
407
|
-
|
|
408
|
-
const assets = resolveSwissEphRuntimeAssets({
|
|
409
|
-
wasmPathCandidates: ["./vendor/kaabalah/swisseph.node.wasm"],
|
|
410
|
-
ephePathCandidates: ["./vendor/kaabalah/ephe"]
|
|
411
|
-
});
|
|
412
|
-
|
|
413
|
-
await getSwissEph(assets);
|
|
414
|
-
```
|
|
415
|
-
|
|
416
|
-
If no app-specific candidates are provided, the helper falls back to the package-bundled Node assets. In browser environments it stays filesystem-free and returns the bundled browser defaults.
|
|
72
|
+
[](https://ko-fi.com/matmoura19)
|
|
417
73
|
|
|
418
74
|
## License
|
|
419
75
|
|
|
420
|
-
|
|
76
|
+
AGPL-3.0 — see [LICENSE](LICENSE).
|
|
421
77
|
|
|
422
78
|
## Acknowledgments
|
|
423
79
|
|
|
424
|
-
- [Swiss Ephemeris](https://www.astro.com/swisseph/) for
|
|
425
|
-
- [Astro.com](https://www.astro.com/) for
|
|
80
|
+
- [Swiss Ephemeris](https://www.astro.com/swisseph/) for astronomical calculations
|
|
81
|
+
- [Astro.com](https://www.astro.com/) for ephemeris data
|
|
@@ -96,7 +96,9 @@ var defaultExcludedAstrologyPoints = /* @__PURE__ */ new Set([
|
|
|
96
96
|
normalizeLookupKey("True Node"),
|
|
97
97
|
normalizeLookupKey("Lilith True")
|
|
98
98
|
]);
|
|
99
|
+
var planetCarrierSphereIdsByKey = createPlanetCarrierSphereIdsByKey(canonicalTree);
|
|
99
100
|
var classicalPlanetPathIdsByKey = createClassicalPlanetPathIdsByKey(canonicalTree);
|
|
101
|
+
var angleCarrierSphereIdsByKey = createAngleCarrierSphereIdsByKey();
|
|
100
102
|
function normalizeLookupKey(value) {
|
|
101
103
|
return value.trim().toLowerCase();
|
|
102
104
|
}
|
|
@@ -155,6 +157,34 @@ function createClassicalPlanetPathIdsByKey(tree) {
|
|
|
155
157
|
}
|
|
156
158
|
return registry;
|
|
157
159
|
}
|
|
160
|
+
function createPlanetCarrierSphereIdsByKey(tree) {
|
|
161
|
+
const registry = /* @__PURE__ */ new Map();
|
|
162
|
+
for (const symbol of PLANET_SYMBOLS) {
|
|
163
|
+
if (!("id" in symbol) || !symbol.id) {
|
|
164
|
+
continue;
|
|
165
|
+
}
|
|
166
|
+
const sphereIds = tree.getCorrespondences(symbol.id, {
|
|
167
|
+
type: "sphere" /* SPHERE */,
|
|
168
|
+
depth: 1
|
|
169
|
+
}).map((match) => match.node.id);
|
|
170
|
+
if (!sphereIds.length) {
|
|
171
|
+
continue;
|
|
172
|
+
}
|
|
173
|
+
registry.set(
|
|
174
|
+
normalizeLookupKey(symbol.label),
|
|
175
|
+
Object.freeze([...new Set(sphereIds)])
|
|
176
|
+
);
|
|
177
|
+
}
|
|
178
|
+
return registry;
|
|
179
|
+
}
|
|
180
|
+
function createAngleCarrierSphereIdsByKey() {
|
|
181
|
+
return /* @__PURE__ */ new Map([
|
|
182
|
+
[
|
|
183
|
+
normalizeLookupKey("ASC"),
|
|
184
|
+
Object.freeze([chunkS6KNERP7_js.id("sphere" /* SPHERE */, chunkS6KNERP7_js.SPHERES.MALKUTH)])
|
|
185
|
+
]
|
|
186
|
+
]);
|
|
187
|
+
}
|
|
158
188
|
function getTargetType(targetId) {
|
|
159
189
|
return String(targetId).startsWith(`${"sphere" /* SPHERE */}:`) ? "sphere" : "path";
|
|
160
190
|
}
|
|
@@ -214,6 +244,11 @@ function lookupSignSymbolMetadata(sign) {
|
|
|
214
244
|
const metadata = symbolRegistry.byKey.get(normalizeLookupKey(rawSign));
|
|
215
245
|
return metadata?.kind === "sign" ? metadata : void 0;
|
|
216
246
|
}
|
|
247
|
+
function normalizeAngleName(angle) {
|
|
248
|
+
const rawAngle = angle.startsWith(`${"house" /* HOUSE */}:`) ? chunkS6KNERP7_js.parseId(angle) : angle;
|
|
249
|
+
const metadata = symbolRegistry.byKey.get(normalizeLookupKey(rawAngle));
|
|
250
|
+
return metadata?.kind === "angle" ? metadata.label : rawAngle;
|
|
251
|
+
}
|
|
217
252
|
function listPlanetSymbolMetadata() {
|
|
218
253
|
return symbolRegistry.planets;
|
|
219
254
|
}
|
|
@@ -331,6 +366,24 @@ function buildSignTargets(sign) {
|
|
|
331
366
|
}
|
|
332
367
|
return dedupeTargets(result);
|
|
333
368
|
}
|
|
369
|
+
function buildCarrierSphereTargets(lookup, sign) {
|
|
370
|
+
const isPlanetLookup = lookup.kind === "planet";
|
|
371
|
+
const sourceLabel = isPlanetLookup ? normalizePlanetName(lookup.planet) : normalizeAngleName(lookup.angle);
|
|
372
|
+
const sourceKey = normalizeLookupKey(sourceLabel);
|
|
373
|
+
const sphereIds = isPlanetLookup ? planetCarrierSphereIdsByKey.get(sourceKey) : angleCarrierSphereIdsByKey.get(sourceKey);
|
|
374
|
+
if (!sphereIds?.length) {
|
|
375
|
+
return [];
|
|
376
|
+
}
|
|
377
|
+
return sphereIds.map((targetId) => ({
|
|
378
|
+
targetId,
|
|
379
|
+
targetType: "sphere",
|
|
380
|
+
targetName: getTargetName(targetId),
|
|
381
|
+
mapping: "carrier-sphere",
|
|
382
|
+
distance: 1,
|
|
383
|
+
sign,
|
|
384
|
+
...isPlanetLookup ? { planet: sourceLabel } : {}
|
|
385
|
+
}));
|
|
386
|
+
}
|
|
334
387
|
function dedupeTargets(targets) {
|
|
335
388
|
const seen = /* @__PURE__ */ new Set();
|
|
336
389
|
return targets.filter((target) => {
|
|
@@ -490,9 +543,17 @@ function getKaabalisticCorrespondenceTargets(lookup) {
|
|
|
490
543
|
sign,
|
|
491
544
|
planet
|
|
492
545
|
}));
|
|
546
|
+
const carrierSphereTargets = buildCarrierSphereTargets(lookup, sign);
|
|
547
|
+
return {
|
|
548
|
+
source: createCorrespondenceSource(lookup, sign, element),
|
|
549
|
+
targets: dedupeTargets([...signTargets, ...planetPathTargets, ...carrierSphereTargets])
|
|
550
|
+
};
|
|
551
|
+
}
|
|
552
|
+
if (lookup.kind === "angle") {
|
|
553
|
+
const carrierSphereTargets = buildCarrierSphereTargets(lookup, sign);
|
|
493
554
|
return {
|
|
494
555
|
source: createCorrespondenceSource(lookup, sign, element),
|
|
495
|
-
targets: dedupeTargets([...signTargets, ...
|
|
556
|
+
targets: dedupeTargets([...signTargets, ...carrierSphereTargets])
|
|
496
557
|
};
|
|
497
558
|
}
|
|
498
559
|
return {
|
|
@@ -510,7 +571,7 @@ function toAstrologyMarkers(result, source) {
|
|
|
510
571
|
sourceType: source.sourceType,
|
|
511
572
|
sourceName: source.sourceName,
|
|
512
573
|
mapping: target.mapping,
|
|
513
|
-
label: target.mapping === "planet-sign-path" ? signGlyph : sourceGlyph,
|
|
574
|
+
label: target.mapping === "planet-sign-path" || target.mapping === "carrier-sphere" ? signGlyph : sourceGlyph,
|
|
514
575
|
...target.sign ? { sign: target.sign } : {},
|
|
515
576
|
...target.element ? { element: target.element } : {},
|
|
516
577
|
...target.planet ? { planet: target.planet } : {}
|
|
@@ -1737,5 +1798,5 @@ exports.listPlanetSymbolMetadata = listPlanetSymbolMetadata;
|
|
|
1737
1798
|
exports.listTarotThemeProfiles = listTarotThemeProfiles;
|
|
1738
1799
|
exports.listZodiacSignSymbolMetadata = listZodiacSignSymbolMetadata;
|
|
1739
1800
|
exports.tokenizeOccultThemeText = tokenizeOccultThemeText;
|
|
1740
|
-
//# sourceMappingURL=chunk-
|
|
1741
|
-
//# sourceMappingURL=chunk-
|
|
1801
|
+
//# sourceMappingURL=chunk-UG6HZK3Z.js.map
|
|
1802
|
+
//# sourceMappingURL=chunk-UG6HZK3Z.js.map
|