Metadata-Version: 2.4
Name: openjyotish
Version: 1.6.1
Summary: Free, open-source, cross-platform Vedic astrology toolkit with AI-powered chart readings.
Author: Jhora Contributors
License: AGPL-3.0-or-later
Project-URL: Homepage, https://github.com/velteyn/OpenJyotish
Project-URL: Repository, https://github.com/velteyn/OpenJyotish.git
Project-URL: Issues, https://github.com/velteyn/OpenJyotish/issues
Keywords: vedic,astrology,jyotish,hora,dasa,yoga
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Astronomy
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: PyQt6>=6.11.0
Requires-Dist: pyswisseph>=2.10.3.2
Requires-Dist: typer>=0.27.2
Requires-Dist: rich>=15.0.0
Requires-Dist: requests>=2.34.2
Requires-Dist: prompt_toolkit>=3.0.53
Requires-Dist: numpy>=2.4.6
Requires-Dist: tzdata>=2024.1; platform_system == "Windows"
Provides-Extra: test
Requires-Dist: pytest>=9.1.1; extra == "test"
Dynamic: license-file

# OpenJyotish — Free Vedic Astrology Toolkit

Free, open-source, cross-platform Vedic astrology software.  
**CLI** + **GUI** (PyQt6) + **TUI** (terminal). AI-powered readings via local LLMs.

```
35 CLI commands  |  8 GUI categories + sub-tabs  |  9 TUI menus + sub-menus
21-section JSON API for AI agents  |  1082 tests  |  AGPL v3.0
```

## Quick Install

### Option 1: Release (Windows — no Python needed)
Download the latest `openjyotish-v*-windows.zip` from [Releases](https://github.com/velteyn/OpenJyotish/releases).  
Extract, double-click `OpenJyotish.bat`. Includes ephemeris data.

### Option 2: From source (Linux / Mac / Windows with Python)

```bash
# Linux / Mac
git clone https://github.com/velteyn/OpenJyotish.git
cd OpenJyotish
./install.sh
./run.sh

# Windows
git clone https://github.com/velteyn/OpenJyotish.git
cd OpenJyotish
install.bat
run.bat
```

**Requires**: Python 3.11+

Ephemeris data is auto-downloaded by `install.sh` / `install.bat` (2 files, ~1MB).

### No-Python downloads (Windows & macOS)

Each [release](https://github.com/velteyn/OpenJyotish/releases) ships
ready-to-run binaries — no Python, pip or terminal needed:

| Platform | Files |
|----------|-------|
| Windows | `OpenJyotish-<ver>-Windows-Setup.exe` (installer: wizard, Start menu, uninstaller) |
| Linux | `OpenJyotish-<ver>-Linux-amd64.deb` (`sudo dpkg -i`, menu entry + `jhora` CLI) or `-Linux-x86_64.tar.gz` |

Notes: the apps are unsigned, so Windows SmartScreen will ask once
("More info" → Run). Your charts live per-user (`%APPDATA%\OpenJyotish`
on Windows).

## One-Minute Examples

```bash
# Get your chart
jhora chart "1973-03-14 14:55 +0100 45.41 11.88"

# Everything at a glance (AI-friendly JSON)
jhora analyze "1973-03-14 14:55 +0100 45.41 11.88"

# Current dasa period
jhora dasa-timeline "1973-03-14 14:55 +0100 45.41 11.88"

# Choghadiya — auspicious/inauspicious time slots for today
jhora choghadiya --lat 28.61 --lon 77.21 --tz 5.5

# Strengths
jhora shadbala --bhava --vimsopaka "birthdata"

# Prediction (Tithi Pravesha)
jhora tithi-pravesha "birthdata"

# Matchmaking
jhora kuta "girl_birthdata" "boy_birthdata"

# AI interpretation (needs Ollama)
# Full guide: https://github.com/velteyn/OpenJyotish/wiki/AI-Complete-Guide
jhora ai "birthdata"
jhora teach "How do I read my 7th house?" --chart "birthdata"

# Launch desktop app
./run.sh
```

## Birth Data Format

All commands accept birth data as: `"YYYY-MM-DD HH:MM TZ LAT LON"`

```
"1973-03-14 14:55 +0100 45.41 11.88"
  │         │     │     │      └─ Longitude (E positive)
  │         │     │     └─ Latitude (N positive)  
  │         │     └─ Timezone (+0100 = UTC+1, +0530 = India, -0500 = EST)
  │         └─ Local time (24h)
  └─ Date
```

## GUI

`jhora gui` or `./run.sh` — 8 main categories with sub-tabs:

| Category | Contains |
|----------|----------|
| **Dashboard** | Current dasa, transits, strengths, upcoming |
| **Chart & Varga** | Chart View (Planets & Data, Ashtakavarga), Planets, Houses & Chalit, Varga Charts, Yogas |
| **Strengths** | Shadbala, Arudha & Karaka, Ashtakavarga |
| **Dasas** | Dasa Periods with interactive bar chart |
| **Transits & Tajaka** | Transits, Tajaka & TP, Mundane |
| **Special** | Matchmaking, Prasna, Muhurta (incl. Choghadiya) |
| **AI & Learn** | AI Chat, AI Teacher, Knowledge, Reading |
| **Tools** | Ephemeris |

**Getting started**: Fill form → "Find" city → "Now" button → "Calculate"

### Supported AI Models

Prompt templates, thinking behavior and context needs differ per model, so
only this slate is verified (eval harness) and guaranteed:

| Pick | Model (LM Studio key) | For |
|------|----------------------|-----|
| Quality | `mistralai/ministral-3-14b-reasoning` | Best entities/faithfulness; slow on small GPUs |
| Speed/VRAM | `qwen/qwen3.5-9b` (clean instruct release) | Fits 8GB VRAM, fast; weaker entity tracking |

Set it in the AI tab's **Prefer** field (or CLI `--preferred-model`); the app
auto-loads it with a VRAM-safe context and never unloads your own models.
Roleplay/abliterated merges and ultra-low quants (IQ1_S) confabulate lore —
avoid them for readings. Anything outside the slate may work but is **not
guaranteed**.

Full audit trail, per-model scorecards and setup laws: `docs/AI_LESSONS.md`.

## TUI

`jhora tui` — interactive terminal app with the same 9-category structure.  
Arrow keys ↑↓ to navigate, letters to jump, Enter to select, `b` to go back, `q` to quit.

```
Main Menu:
  1  Birth Data Input          d  Dashboard
  c  Chart & Varga             s  Strengths
  a  Dasas & Timing            t  Transits & Tajaka
  x  Special                   i  AI & Knowledge
  u  Tools                     q  Quit
```

## AI Tool-Calling (JSON API)

One command, everything computed. Pipe to AI agents, `jq`, or Python:

```bash
jhora analyze "birthdata"
# → 10KB JSON — 21 sections, every calculation

# Pipe it around
jhora analyze "..." | jq '.planets.Su.house'
jhora analyze "..." | jq '.dasa.mahadashas[] | select(.current)'
jhora analyze "..." | jq '.dasa.systems'   # current MD in every dasa system
jhora analyze "..." | jq '.choghadiya.current'   # current Choghadiya slot
jhora analyze "..." | jq '.muhurta_adjuncts.chandra_bala'   # daily adjunct grades
```

```python
import json, subprocess
data = json.loads(subprocess.run(
    ["jhora", "analyze", birthdata], capture_output=True, text=True
).stdout)
```

## All CLI Commands (35)

| Command | What it does |
|---------|-------------|
| `chart` | Rasi chart + planets + upagrahas + outer planets |
| `analyze` | AI-friendly JSON dump (21 sections) |
| `shadbala` | Six-fold planetary strength (+ --bhava + --vimsopaka) |
| `kuja-dosha` | Kuja Dosha (Mangal Dosha) Mars affliction |
| `yogas` | Detect 200+ planetary combinations |
| `ashtakavarga` | BAV, SAV, Sodhya Pinda, Kakshya bindu |
| `dasa` | Dasa periods for any system: vimsottari/ashtottari/yogini/sudasa/chara/narayana/kalachakra/brahma (MD/AD; system positional) |
| `dasa-timeline` | Text bar chart with now-marker |
| `conditional-dasas` | List additional dasa systems that apply |
| `transit` | Current transits with SAV scores |
| `tajaka` | Solar return chart |
| `tithi-pravesha` | Annual solar-tithi ingress |
| `progression` | Secondary progressions (1 day = 1 year) |
| `kuta` | Marriage compatibility (Porutham + Ashta Koota) |
| `prasna` | Horary (108/249/Nadi modes) |
| `muhurta` | Electional — 11 task types (+ `--adjuncts` daily table, `--janma-nakshatra` Bala grades) |
| `choghadiya` | 8 day + 8 night auspicious/inauspicious time slots |
| `mundane` | World events, eclipses, ingresses |
| `compare` | Natal vs transit or two-chart comparison |
| `interpret` | Rule-based chart reading |
| `traditional-report` | Formatted traditional-style chart report |
| `knowledge` | Search 16 Vedic textbooks (FTS5) |
| `ai` | LLM chart reading (Ollama/LM Studio/Unsloth) |
| `teach` | AI Teacher — learn Vedic astrology |
| `export` | HTML report (printable to PDF) |
| `ephemeris` | Daily planet table |
| `varga` | Any divisional chart (D-1 to D-150) |
| `navamsa` | D-9 Navamsa |
| `panchanga` | Monthly calendar (tithi/nakshatra/rahu kalam) |
| `chakras` | Sarvatobhadra + Kota chakras |
| `lagnas` | All special lagnas with meanings |
| `sphutas` | Prasna Marga auspicious points (Tri/Chatus/Pancha/Prana/Deha/Mrityu/Beeja/Kshetra/Yoga) |
| `learning` | Marana karaka, KP sub-lords, vaiseshikamsas |
| `tui` | Launch interactive terminal UI |
| `gui` | Launch desktop GUI |

## Features

### Calculation Engine
Rasi chart (D-1) with South/North/East styles · 23 varga charts (D-2 to D-150) ·
8 dasa systems · 5 conditional dasas · Shadbala · Bhava Bala · Vimsopaka Bala (4 schemes) ·
200+ yogas · Ashtakavarga (BAV/SAV/Kakshya) · Arudha Padas · Chara Karakas ·
36 Sahamas · 20 ayanamsa modes (Lahiri/Raman/KP/Fagan/Tropical/etc.) ·
Outer planets (Uranus/Neptune/Pluto) · Upagrahas (5 solar + Gulika/Mandi) ·
Special lagnas (Bhrigu Bindu/Indu/Varnada/Pranapada/Vighati) ·
KP sub-lords (5 levels) · Chalit/Bhava charts

### Forecasting
Transits with SAV scores · Tajaka solar return · Tithi Pravesha ·
Progressions · Dasa timeline · Mundane (ingresses/eclipses/conjunctions) ·
Matchmaking (10 Porutham + Ashta Koota 36pt) · Muhurta · Choghadiya · Prasna

### AI & Data
Local LLM (Ollama/LM Studio/Unsloth) · RAG pipeline with textbook citations ·
AI Teacher mode · 8 AI topic templates · Context budgeting for small models ·
LM Studio setup guard (preferred model auto-load with VRAM-safe context) ·
Mechanical answer verification (every reading checked against computed data) ·
Unified SQLite DB (atlas 34K cities + knowledge + charts) · HTML export ·
JHD import/export · Chart browser · JSON API for AI agents

## Architecture

```
src/jhora/
├── types/          Enums: Graha, Rasi, Nakshatra, Varga, Bhava, Dasa
├── ephemeris/      Swiss Ephemeris wrapper (18 API functions)
├── charts/         ChartBuilder, ChartData (frozen), VargaChartComputer
├── calc/           29 modules: strengths, yogas, dasas, transits, chakras...
├── dasas/          9 dasa system modules
├── ai/             AI engine, RAG pipeline, JSON export, teacher
├── interpreter/    Chart reading, knowledge base
├── export/         HTML report generator
├── io/             Atlas (SQLite/FTS5), JHD parser
├── core/           Unified database
├── cli/            Typer CLI (34 commands)
├── tui/            prompt_toolkit menu system
└── ui/             PyQt6 GUI (8-category tabs, chart widget, dasa timeline)
```

### 💬 Community & Support
If you want to discuss the project, ask questions, or share your own astrology software tools, join our official community on Reddit: [r/AstrologySoftware](https://www.reddit.com/r/AstrologySoftware/).

## Traditions & Lineage

No single sampradaya — like JHora itself, this toolkit follows an eclectic
school with a clear backbone:

- **Parashara core** (Brihat Parashara Hora Shastra): Lahiri ayanamsa,
  whole-sign Rasi houses, Vimsottari dasa, Shadbala, Ashtakavarga —
  the mainstream North-Indian practice most software implements.
- **Jaimini integration** (SJC / Sanjay Rath lineage, via P.V.R. Narasimha
  Rao's integrated approach): Arudha Padas, Chara Karakas, Rasi dasas
  (Chara, Narayana, Sudasa).
- **Karnataka muhurta** (B.V. Raman): electional rules, Panchaka-Rahita,
  Durmuhurta/Varjya.
- **Krishnamurti elements**: KP sub-lords for stellar precision.
- **Tajaka annual horoscopy**: Indo-Persian Varshaphala (solar returns,
  Muntha, Mudda/Patyayini dasas).

Purists of any single tradition will find foreign bodies here; that mixing
*is* the JHora school this project continues.

## Credits

Based on **OpenJyotish 8.0 Lite** by PVR Narasimha Rao (Sri Jagannath Vedic Centre).  
Atlas data: GeoNames.org (CC BY 4.0).  

## License

**GNU GENERAL PUBLIC LICENSE v3.0** — free forever.  
Modifications must remain open. Network use counts as distribution.
