thoth-cli 0.2.8 → 0.2.10

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/dist/bin.js CHANGED
@@ -43,7 +43,7 @@ Examples:
43
43
  thoth synastry --date1 1991-07-08 --time1 14:06 --city1 "New York" --date2 2026-02-26 --time2 04:35 --city2 "New York"
44
44
  thoth progressions --natal-date 1991-07-08 --natal-time 14:06 --city "New York" --target-date 2026-03-01
45
45
  thoth moon
46
- thoth ephemeris --body pluto`).version("0.2.8");
46
+ thoth ephemeris --body pluto`).version("0.2.10");
47
47
  program.command("chart").description("Calculate a natal chart").requiredOption("--date <date>", "Birth date (YYYY-MM-DD)").requiredOption("--time <time>", "Birth time (HH:MM)").option("--lat <lat>", "Latitude", parseFloat).option("--lng <lng>", "Longitude", parseFloat).option("--city <city>", "City name").option("--nation <nation>", "Country code", "US").option("--name <name>", "Name", "Subject").option("--json", "Output raw JSON").option("--svg", "Output SVG chart").option("--svg-file <path>", "Save SVG to file").action(async (options) => {
48
48
  if (!options.city && (!options.lat || !options.lng)) {
49
49
  console.error(chalk.red("Error: Must provide either --city or both --lat and --lng"));
@@ -501,40 +501,125 @@ program.command("key").description("Symbol reference guide").action(() => {
501
501
  console.log(chalk.bold.white("\n\u{1315D} THOTH KEY \u2014 Complete Reference\n"));
502
502
  console.log(chalk.bold.cyan("\u2550\u2550 PLANETS \u2550\u2550"));
503
503
  console.log(` ${sun("\u2609 Sun")} Identity, vitality, ego, life force`);
504
- console.log(` ${moon2("\u263D Moon")} Emotions, instincts, the unconscious`);
505
- console.log(` ${mercury("\u263F Mercury")} Mind, communication, learning`);
506
- console.log(` ${venus("\u2640 Venus")} Love, beauty, values, attraction`);
507
- console.log(` ${mars("\u2642 Mars")} Action, desire, aggression, drive`);
508
- console.log(` ${jupiter("\u2643 Jupiter")} Expansion, luck, wisdom, abundance`);
509
- console.log(` ${saturn("\u2644 Saturn")} Structure, limits, time, karma`);
510
- console.log(` ${uranus("\u2645 Uranus")} Revolution, awakening, innovation`);
511
- console.log(` ${neptune("\u2646 Neptune")} Dreams, illusion, spirituality`);
512
- console.log(` ${pluto("\u2647 Pluto")} Transformation, death/rebirth, power`);
504
+ console.log(` ${chalk.dim("Rules:")} ${sun("Leo")} ${chalk.dim("Sephira:")} Tiphareth`);
505
+ console.log(` ${moon2("\u263D Moon")} Emotions, instincts, the unconscious, mother`);
506
+ console.log(` ${chalk.dim("Rules:")} ${moon2("Cancer")} ${chalk.dim("Sephira:")} Yesod`);
507
+ console.log(` ${mercury("\u263F Mercury")} Mind, communication, learning, commerce`);
508
+ console.log(` ${chalk.dim("Rules:")} ${mercury("Gemini, Virgo")} ${chalk.dim("Sephira:")} Hod`);
509
+ console.log(` ${venus("\u2640 Venus")} Love, beauty, values, attraction, harmony`);
510
+ console.log(` ${chalk.dim("Rules:")} ${venus("Taurus, Libra")} ${chalk.dim("Sephira:")} Netzach`);
511
+ console.log(` ${mars("\u2642 Mars")} Action, desire, aggression, courage, drive`);
512
+ console.log(` ${chalk.dim("Rules:")} ${mars("Aries")} ${chalk.dim("Sephira:")} Geburah`);
513
+ console.log(` ${jupiter("\u2643 Jupiter")} Expansion, luck, wisdom, abundance, faith`);
514
+ console.log(` ${chalk.dim("Rules:")} ${jupiter("Sagittarius")} ${chalk.dim("Sephira:")} Chesed`);
515
+ console.log(` ${saturn("\u2644 Saturn")} Structure, limits, time, karma, discipline`);
516
+ console.log(` ${chalk.dim("Rules:")} ${saturn("Capricorn")} ${chalk.dim("Sephira:")} Binah`);
517
+ console.log(` ${uranus("\u2645 Uranus")} Revolution, awakening, innovation, freedom`);
518
+ console.log(` ${chalk.dim("Rules:")} ${uranus("Aquarius")} ${chalk.dim("Sephira:")} Chokmah`);
519
+ console.log(` ${neptune("\u2646 Neptune")} Dreams, illusion, spirituality, dissolution`);
520
+ console.log(` ${chalk.dim("Rules:")} ${neptune("Pisces")}`);
521
+ console.log(` ${pluto("\u2647 Pluto")} Transformation, death/rebirth, power, shadow`);
522
+ console.log(` ${chalk.dim("Rules:")} ${pluto("Scorpio")}`);
513
523
  console.log("");
514
524
  console.log(chalk.bold.cyan("\u2550\u2550 POINTS \u2550\u2550"));
515
- console.log(` ${chiron("\u26B7 Chiron")} Wound & gift of healing`);
516
- console.log(` ${lilith("\u26B8 Lilith")} Primal feminine, shadow`);
517
- console.log(` ${northNode("\u260A North Node")} Soul's direction`);
518
- console.log(` ${southNode("\u260B South Node")} Past karma`);
525
+ console.log(` ${chiron("\u26B7 Chiron")} The wounded healer. Core wound & gift of healing.`);
526
+ console.log(` ${lilith("\u26B8 Lilith")} Black Moon. Primal feminine, shadow, rejection.`);
527
+ console.log(` ${northNode("\u260A North Node")} Soul's direction. Growth edge. Future karma.`);
528
+ console.log(` ${southNode("\u260B South Node")} Past life gifts. Comfort zone. Past karma.`);
529
+ console.log("");
530
+ console.log(chalk.bold.cyan("\u2550\u2550 ZODIAC SIGNS \u2550\u2550"));
531
+ console.log(` ${mars("\u2648 Aries")} ${chalk.dim("Cardinal Fire")} Initiative, courage, impatience`);
532
+ console.log(` ${chalk.dim("Ruler:")} ${mars("Mars")} ${chalk.dim('"I AM"')}`);
533
+ console.log(` ${venus("\u2649 Taurus")} ${chalk.dim("Fixed Earth")} Stability, sensuality, stubborn`);
534
+ console.log(` ${chalk.dim("Ruler:")} ${venus("Venus")} ${chalk.dim('"I HAVE"')}`);
535
+ console.log(` ${mercury("\u264A Gemini")} ${chalk.dim("Mutable Air")} Curiosity, duality, scattered`);
536
+ console.log(` ${chalk.dim("Ruler:")} ${mercury("Mercury")} ${chalk.dim('"I THINK"')}`);
537
+ console.log(` ${moon2("\u264B Cancer")} ${chalk.dim("Cardinal Water")} Nurturing, protective, moody`);
538
+ console.log(` ${chalk.dim("Ruler:")} ${moon2("Moon")} ${chalk.dim('"I FEEL"')}`);
539
+ console.log(` ${sun("\u264C Leo")} ${chalk.dim("Fixed Fire")} Creative, proud, dramatic`);
540
+ console.log(` ${chalk.dim("Ruler:")} ${sun("Sun")} ${chalk.dim('"I WILL"')}`);
541
+ console.log(` ${mercury("\u264D Virgo")} ${chalk.dim("Mutable Earth")} Analytical, service, critical`);
542
+ console.log(` ${chalk.dim("Ruler:")} ${mercury("Mercury")} ${chalk.dim('"I ANALYZE"')}`);
543
+ console.log(` ${venus("\u264E Libra")} ${chalk.dim("Cardinal Air")} Balance, partnership, indecisive`);
544
+ console.log(` ${chalk.dim("Ruler:")} ${venus("Venus")} ${chalk.dim('"I BALANCE"')}`);
545
+ console.log(` ${pluto("\u264F Scorpio")} ${chalk.dim("Fixed Water")} Intensity, depth, secretive`);
546
+ console.log(` ${chalk.dim("Ruler:")} ${pluto("Pluto")} ${chalk.dim('"I DESIRE"')}`);
547
+ console.log(` ${jupiter("\u2650 Sagittarius")} ${chalk.dim("Mutable Fire")} Adventure, truth, reckless`);
548
+ console.log(` ${chalk.dim("Ruler:")} ${jupiter("Jupiter")} ${chalk.dim('"I SEE"')}`);
549
+ console.log(` ${saturn("\u2651 Capricorn")} ${chalk.dim("Cardinal Earth")} Ambition, mastery, cold`);
550
+ console.log(` ${chalk.dim("Ruler:")} ${saturn("Saturn")} ${chalk.dim('"I USE"')}`);
551
+ console.log(` ${uranus("\u2652 Aquarius")} ${chalk.dim("Fixed Air")} Humanitarian, eccentric, detached`);
552
+ console.log(` ${chalk.dim("Ruler:")} ${uranus("Uranus")} ${chalk.dim('"I KNOW"')}`);
553
+ console.log(` ${neptune("\u2653 Pisces")} ${chalk.dim("Mutable Water")} Compassion, dreams, escapist`);
554
+ console.log(` ${chalk.dim("Ruler:")} ${neptune("Neptune")} ${chalk.dim('"I BELIEVE"')}`);
555
+ console.log("");
556
+ console.log(chalk.bold.cyan("\u2550\u2550 HOUSES \u2550\u2550"));
557
+ console.log(` ${chalk.bold("1st House")} ${mars("Ascendant")} Self, identity, appearance, first impressions`);
558
+ console.log(` ${chalk.bold("2nd House")} Money, possessions, values, self-worth`);
559
+ console.log(` ${chalk.bold("3rd House")} Communication, siblings, short travel, learning`);
560
+ console.log(` ${chalk.bold("4th House")} ${saturn("IC")} Home, family, roots, private self, mother`);
561
+ console.log(` ${chalk.bold("5th House")} Creativity, romance, children, pleasure, play`);
562
+ console.log(` ${chalk.bold("6th House")} Health, work, service, daily routines, pets`);
563
+ console.log(` ${chalk.bold("7th House")} ${chalk.white("Descendant")} Partnerships, marriage, open enemies, others`);
564
+ console.log(` ${chalk.bold("8th House")} Death, sex, shared resources, transformation`);
565
+ console.log(` ${chalk.bold("9th House")} Philosophy, long travel, higher education, beliefs`);
566
+ console.log(` ${chalk.bold("10th House")} ${sun("MC")} Career, reputation, public self, father`);
567
+ console.log(` ${chalk.bold("11th House")} Friends, groups, hopes, wishes, humanity`);
568
+ console.log(` ${chalk.bold("12th House")} Unconscious, isolation, secrets, karma, dreams`);
519
569
  console.log("");
520
570
  console.log(chalk.bold.cyan("\u2550\u2550 ASPECTS \u2550\u2550"));
521
- console.log(` ${sun("\u260C")} Conjunction 0\xB0 Fusion, intensification`);
522
- console.log(` ${moon2("\u260D")} Opposition 180\xB0 Tension, awareness`);
523
- console.log(` ${jupiter("\u25B3")} Trine 120\xB0 Harmony, ease`);
524
- console.log(` ${mars("\u25A1")} Square 90\xB0 Challenge, growth`);
525
- console.log(` ${venus("\u26B9")} Sextile 60\xB0 Opportunity`);
571
+ console.log(` ${sun("\u260C Conjunction")} 0\xB0 Fusion, intensification, new cycle`);
572
+ console.log(` ${chalk.dim("Sephira: Tiphareth (Sun) \u2014 creative union")}`);
573
+ console.log(` ${moon2("\u260D Opposition")} 180\xB0 Awareness, tension, projection`);
574
+ console.log(` ${chalk.dim("Sephira: Yesod (Moon) \u2014 polarity, reflection")}`);
575
+ console.log(` ${jupiter("\u25B3 Trine")} 120\xB0 Harmony, ease, natural talent`);
576
+ console.log(` ${chalk.dim("Sephira: Chesed (Jupiter) \u2014 grace, flow")}`);
577
+ console.log(` ${mars("\u25A1 Square")} 90\xB0 Friction, challenge, forced growth`);
578
+ console.log(` ${chalk.dim("Sephira: Geburah (Mars) \u2014 strength through struggle")}`);
579
+ console.log(` ${venus("\u26B9 Sextile")} 60\xB0 Opportunity, cooperation, ease`);
580
+ console.log(` ${chalk.dim("Sephira: Netzach (Venus) \u2014 gentle harmony")}`);
581
+ console.log(` ${mercury("\u235F Quintile")} 72\xB0 Creativity, talent, genius`);
582
+ console.log(` ${chalk.dim("Sephira: Hod (Mercury) \u2014 mental brilliance")}`);
583
+ console.log(` ${uranus("\u26BB Quincunx")} 150\xB0 Adjustment, awkwardness, recalibration`);
526
584
  console.log("");
527
585
  console.log(chalk.bold.cyan("\u2550\u2550 ELEMENTS \u2550\u2550"));
528
- console.log(` ${mars("\u{1F702} Fire")} Spirit, will, action`);
529
- console.log(` ${venus("\u{1F703} Earth")} Matter, stability`);
530
- console.log(` ${mercury("\u{1F701} Air")} Mind, communication`);
531
- console.log(` ${moon2("\u{1F704} Water")} Emotion, intuition`);
586
+ console.log(` ${mars("\u{1F702} Fire")} ${mars("Aries, Leo, Sagittarius")}`);
587
+ console.log(` Spirit, will, action, enthusiasm`);
588
+ console.log(` ${chalk.dim("Hot & Dry \u2014 Choleric \u2014 Intuitive function")}`);
589
+ console.log(` ${venus("\u{1F703} Earth")} ${venus("Taurus, Virgo, Capricorn")}`);
590
+ console.log(` Matter, stability, practicality, form`);
591
+ console.log(` ${chalk.dim("Cold & Dry \u2014 Melancholic \u2014 Sensation function")}`);
592
+ console.log(` ${mercury("\u{1F701} Air")} ${mercury("Gemini, Libra, Aquarius")}`);
593
+ console.log(` Mind, communication, connection, ideas`);
594
+ console.log(` ${chalk.dim("Hot & Wet \u2014 Sanguine \u2014 Thinking function")}`);
595
+ console.log(` ${jupiter("\u{1F704} Water")} ${moon2("Cancer, Scorpio, Pisces")}`);
596
+ console.log(` Emotion, intuition, the unconscious, soul`);
597
+ console.log(` ${chalk.dim("Cold & Wet \u2014 Phlegmatic \u2014 Feeling function")}`);
598
+ console.log("");
599
+ console.log(chalk.bold.cyan("\u2550\u2550 MODALITIES \u2550\u2550"));
600
+ console.log(` ${chalk.bold("Cardinal")} ${mars("Aries")}, ${moon2("Cancer")}, ${venus("Libra")}, ${saturn("Capricorn")}`);
601
+ console.log(` Initiating, leadership, action`);
602
+ console.log(` ${chalk.dim('The spark. Begins seasons. "I start."')}`);
603
+ console.log(` ${chalk.bold("Fixed")} ${venus("Taurus")}, ${sun("Leo")}, ${pluto("Scorpio")}, ${uranus("Aquarius")}`);
604
+ console.log(` Stabilizing, persistence, stubborn`);
605
+ console.log(` ${chalk.dim('The sustainer. Mid-season. "I maintain."')}`);
606
+ console.log(` ${chalk.bold("Mutable")} ${mercury("Gemini")}, ${mercury("Virgo")}, ${jupiter("Sagittarius")}, ${neptune("Pisces")}`);
607
+ console.log(` Adapting, flexible, changeable`);
608
+ console.log(` ${chalk.dim('The dissolver. End of season. "I change."')}`);
532
609
  console.log("");
533
610
  console.log(chalk.bold.cyan("\u2550\u2550 OTHER \u2550\u2550"));
534
- console.log(` \u211E Retrograde \u2014 Planet appears to move backward`);
611
+ console.log(` ${mars("\u211E")} Retrograde Planet appears to move backward. Internalized energy.`);
612
+ console.log(` H House Area of life. e.g., 4H = home, roots, private self`);
613
+ console.log(` \u2192 Flow Direction. e.g., 2H\u21924H (transit house \u2192 natal house)`);
614
+ console.log("");
615
+ console.log(chalk.bold.cyan("\u2550\u2550 DIGNITIES \u2550\u2550"));
616
+ console.log(` ${chalk.bold("Domicile")} Planet in sign it rules. Full power. ${chalk.dim("e.g., \u2642 in Aries")}`);
617
+ console.log(` ${chalk.bold("Exaltation")} Planet in sign of peak expression. ${chalk.dim("e.g., \u2609 in Aries")}`);
618
+ console.log(` ${chalk.bold("Detriment")} Planet opposite its home. Challenged. ${chalk.dim("e.g., \u2642 in Libra")}`);
619
+ console.log(` ${chalk.bold("Fall")} Planet opposite exaltation. Weakened. ${chalk.dim("e.g., \u2609 in Libra")}`);
535
620
  console.log("");
536
621
  });
537
622
  console.log(chalk.dim(""));
538
- console.log(chalk.yellow(" \u{1315D}") + chalk.dim(" thoth-cli v0.2.8"));
623
+ console.log(chalk.yellow(" \u{1315D}") + chalk.dim(" thoth-cli v0.2.10"));
539
624
  console.log(chalk.dim(""));
540
625
  program.parse();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thoth-cli",
3
- "version": "0.2.8",
3
+ "version": "0.2.10",
4
4
  "description": "𓅝 Astrological calculations from the command line. Swiss Ephemeris precision. Built for humans and agents.",
5
5
  "author": "AKLO <aklo@aklolabs.com>",
6
6
  "license": "MIT",
@@ -1,20 +1,26 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * Postinstall script - downloads the correct thoth-core binary
3
+ * Postinstall script - downloads and decompresses the correct thoth-core binary
4
4
  * 𓅝
5
5
  */
6
6
 
7
7
  import { platform, arch } from 'os';
8
8
  import { join, dirname } from 'path';
9
- import { existsSync, mkdirSync, createWriteStream, chmodSync, statSync } from 'fs';
9
+ import { existsSync, mkdirSync, createWriteStream, chmodSync, statSync, unlinkSync } from 'fs';
10
+ import { createGunzip } from 'zlib';
11
+ import { pipeline } from 'stream/promises';
10
12
  import { fileURLToPath } from 'url';
11
13
  import https from 'https';
12
14
 
13
15
  const __dirname = dirname(fileURLToPath(import.meta.url));
14
16
 
15
- const VERSION = '0.2.7';
17
+ const VERSION = '0.2.10';
16
18
  const REPO = 'aklo360/thoth-cli';
17
- const BASE_URL = `https://github.com/${REPO}/releases/download/v${VERSION}`;
19
+
20
+ // Use jsDelivr CDN for faster downloads (mirrors GitHub releases)
21
+ const CDN_URL = `https://cdn.jsdelivr.net/gh/${REPO}@v${VERSION}/releases`;
22
+ // Fallback to GitHub releases directly
23
+ const GITHUB_URL = `https://github.com/${REPO}/releases/download/v${VERSION}`;
18
24
 
19
25
  function getPlatformKey() {
20
26
  const p = platform();
@@ -38,14 +44,12 @@ function getBinaryName() {
38
44
  return platform() === 'win32' ? 'thoth-core.exe' : 'thoth-core';
39
45
  }
40
46
 
41
- async function download(url, dest) {
47
+ function download(url) {
42
48
  return new Promise((resolve, reject) => {
43
- const file = createWriteStream(dest);
44
-
45
49
  https.get(url, (response) => {
46
50
  // Handle redirects
47
51
  if (response.statusCode === 302 || response.statusCode === 301) {
48
- download(response.headers.location, dest).then(resolve).catch(reject);
52
+ download(response.headers.location).then(resolve).catch(reject);
49
53
  return;
50
54
  }
51
55
 
@@ -54,15 +58,19 @@ async function download(url, dest) {
54
58
  return;
55
59
  }
56
60
 
57
- response.pipe(file);
58
- file.on('finish', () => {
59
- file.close();
60
- resolve();
61
- });
61
+ resolve(response);
62
62
  }).on('error', reject);
63
63
  });
64
64
  }
65
65
 
66
+ async function downloadAndDecompress(url, dest) {
67
+ const response = await download(url);
68
+ const gunzip = createGunzip();
69
+ const fileStream = createWriteStream(dest);
70
+
71
+ await pipeline(response, gunzip, fileStream);
72
+ }
73
+
66
74
  async function main() {
67
75
  const platformKey = getPlatformKey();
68
76
  const binaryName = getBinaryName();
@@ -72,34 +80,43 @@ async function main() {
72
80
  // Skip if binary already exists AND has content
73
81
  if (existsSync(binaryPath)) {
74
82
  const stats = statSync(binaryPath);
75
- if (stats.size > 0) {
76
- console.log(`✓ thoth-core binary already exists`);
83
+ if (stats.size > 1000) { // Real binary is ~18MB, placeholder is 0
84
+ console.log(`✓ thoth-core binary already exists (${(stats.size / 1024 / 1024).toFixed(1)}MB)`);
77
85
  return;
78
86
  }
79
- console.log(`Found empty placeholder, downloading actual binary...`);
87
+ console.log(`Found placeholder, downloading actual binary...`);
88
+ unlinkSync(binaryPath); // Remove placeholder
80
89
  }
81
90
 
82
- console.log(`Downloading thoth-core for ${platformKey}...`);
83
-
84
91
  // Create bin directory
85
92
  mkdirSync(binDir, { recursive: true });
86
93
 
87
- // Download binary
88
- const url = `${BASE_URL}/thoth-core-${platformKey}${platform() === 'win32' ? '.exe' : ''}`;
94
+ // Compressed filename
95
+ const compressedName = `thoth-core-${platformKey}${platform() === 'win32' ? '.exe' : ''}.gz`;
96
+
97
+ // Try GitHub releases (jsDelivr doesn't serve release assets directly)
98
+ const url = `${GITHUB_URL}/${compressedName}`;
99
+
100
+ console.log(`Downloading thoth-core for ${platformKey}...`);
101
+ console.log(` From: ${url}`);
102
+
103
+ const startTime = Date.now();
89
104
 
90
105
  try {
91
- await download(url, binaryPath);
106
+ await downloadAndDecompress(url, binaryPath);
92
107
 
93
108
  // Make executable on Unix
94
109
  if (platform() !== 'win32') {
95
110
  chmodSync(binaryPath, 0o755);
96
111
  }
97
112
 
98
- console.log(`✓ Downloaded thoth-core to ${binaryPath}`);
113
+ const stats = statSync(binaryPath);
114
+ const elapsed = ((Date.now() - startTime) / 1000).toFixed(1);
115
+ console.log(`✓ Downloaded and decompressed (${(stats.size / 1024 / 1024).toFixed(1)}MB) in ${elapsed}s`);
99
116
  } catch (error) {
100
117
  console.warn(`⚠ Could not download binary: ${error.message}`);
101
- console.warn(` You can run in development mode with Python installed.`);
102
- console.warn(` Install thoth-core: pip install thoth-core`);
118
+ console.warn(` You may need to install thoth-core manually.`);
119
+ console.warn(` Or install via: pip install thoth-core`);
103
120
  }
104
121
  }
105
122