Metadata-Version: 2.4
Name: suicide
Version: 1.0.0
Summary: A beautiful offline terminal companion for hope, resilience and fresh perspective - quotes for your toughest moments.
Author: MrHacker-X
License-Expression: MIT
Project-URL: Author, https://github.com/MrHacker-X
Keywords: motivation,quotes,cli,terminal,fortune,encouragement,hope,hindi,devanagari
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: Operating System :: OS Independent
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Artistic Software
Classifier: Topic :: Utilities
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: rich>=13.0
Dynamic: license-file

<div align="center">

# ⃤ S U I C I D E ⃤

### *Offline motivational quote CLI - 737 original quotes, 6 moods, zero tracking, one command.*

![Python](https://img.shields.io/badge/Python-3.9%2B-3776AB?style=flat-square&logo=python&logoColor=white)
![License](https://img.shields.io/badge/License-MIT-38;5;179?style=flat-square)
![Platform](https://img.shields.io/badge/Platform-Linux%20%7C%20macOS%20%7C%20Windows%20%7C%20Termux-38;5;150?style=flat-square)
![Quotes](https://img.shields.io/badge/Bundled%20Quotes-737-38;5;245?style=flat-square)
![Network](https://img.shields.io/badge/Attitude-100%25%20Offline-38;5;179?style=flat-square)

</div>

---

## 📋 Table of Contents

- [🎯 Why suicide?](#-why-suicide)
- [🧭 Tool Purpose](#-tool-purpose)
- [🚀 Quick Start](#-quick-start)
- [📦 Installation](#-installation)
- [✨ Features](#-features)
- [⌨️ Usage](#%EF%B8%8F-usage)
- [🖥️ Preview](#%EF%B8%8F-preview)
- [🧰 Tech Stack](#-tech-stack)
- [⚠️ Disclaimer](#%EF%B8%8F-disclaimer)
- [🤝 Contributing](#-contributing)
- [📜 License](#-license)
- [👨‍💻 Developer](#-developer)

---

## 🎯 Why suicide?

> Most "motivation" tools are two things at once: **heavy** and **nosy**. Heavy - because they bundle a framework just to print a sentence. Nosy - because they phone home, nag you with updates, or bury a five-word quote under wall-to-wall ads.
>
> **suicide removes both problems.** One binary-free Python package. No network calls - ever. No accounts, no analytics, no telemetry, no interactive menus. You type one command, it prints a quote from a bundled, locally-validated database of 737 original reflections, and it exits in milliseconds. What's left is an honest reminder tool: quotes wrapped in a clean, terminal-width-aware panel that fits your window - narrow or wide.

**A word on the name.** The package name is intentionally unconventional, but its purpose is entirely positive. It is a reminder utility for the moments that feel heavy. Every bundled quote promotes hope, resilience, courage, self-improvement and positive perspectives. **Nothing here encourages, glorifies or romanticizes self-harm** - the tool exists to do the opposite.

---

## 🧭 Tool Purpose

**suicide exists for exactly three worthwhile purposes - and nothing else:**

| # | Purpose | Example |
|---|---------|---------|
| 1️⃣ | **Daily encouragement** | One honest quote on a heavy day: `suicide --mood sad` |
| 2️⃣ | **Scripting & shells** | A spread of encouragement in your MOTD, alias, cron job or tmux startup: `suicide --count 3 --json` |
| 3️⃣ | **Personal growth** | Building your own collection: favorite, add, import and export the quotes that reach you |

**What this tool is NOT:** it is **not** a tracker, **not** a network client, and **not** an interactive screen. It reads **nothing** from the network and makes **no** outbound requests - the same behavior a `fortune` command has, with structured metadata instead of fixed-width quips.

**Rule of thumb:** run it, read it, feel lighter, get on with the day.

---

## 🚀 Quick Start

```bash
pip install suicide
```

Then simply run:

```bash
suicide                      # a random quote, right now
```

No flags needed - try a mood directly:

```bash
suicide --mood sad           # something for a heavy day
suicide --category courage   # quotes about being brave
suicide --count 5            # five distinct quotes, no repeats
suicide --json               # machine-readable output
```

---

## 📦 Installation

### One-command setup

```bash
pip install suicide
suicide
```

<details>
<summary><b>🛠 The three ways (and what each one does)</b></summary>

**From PyPI (everyone):**
- `pip install suicide` → the aligned wheel with the bundled database
- Works on any Python 3.9+ interpreter with no compiler needed
- `python -m suicide` uses the exact same CLI implementation as `suicide`

**In a venv (clean machines):**
- `python3 -m venv ~/suicide-env && ~/suicide-env/bin/pip install suicide`
- Completely isolated from system packages - easiest to remove later

**On Termux (Android):**
- `pip install suicide` - pure standard library, so nothing else is required
- If a custom quote looks garbled, `export PYTHONIOENCODING=utf-8`

**The package never needs:**
- No `sudo` / `root` privileges
- No system-wide setup beyond the pip install itself
- No network connection after the install

</details>

### Supported Systems

| OS | Status | Notes |
|----|--------|-------|
| 🐧 Linux / BSD | ✅ Fully supported | data at `$XDG_DATA_HOME/suicide` (~/.local/share) |
| 🐧 macOS | ✅ Fully supported | data at `~/Library/Application Support/suicide` |
| 🪟 Windows | ✅ Fully supported | data at `%APPDATA%\suicide` |
| 📱 Termux (Android) | ✅ Fully supported | pure standard library, no extras needed |

> 💡 After install, run `suicide --info` to see the tool's purpose, author and license at a glance. suicide **degrades gracefully**: if your data directory can't be created, the CLI still prints quotes - only favorites/history pause.

---

## ✨ Features

| | Feature | Description |
|---|---------|-------------|
| 📚 | **737 bundled quotes** | Every entry original, unique and metadata-tagged - no fabricated attribution to famous people |
| 🧠 | **6 moods, 6 categories** | sad · lost · anxious · tired · hopeful · motivated × life · courage · failure · growth · discipline · hope |
| 🎲 | **Smart selection engine** | `secrets`-backed randomness, no repeats inside a batch, quietly avoids the 10 most recent quotes |
| 🎨 | **Terminal-width-aware panel** | Decorated mode wraps, pads and aligns to your *actual* window - complete borders at 20 to 160 columns |
| 🚧 | **Borderless fallback** | On extremely narrow terminals (< 20 columns) the borders step aside and the text stays readable |
| 📤 | **Clean JSON output** | `--json` emits banner-free, ANSI-free JSON on stdout - errors included, perfect for scripts |
| ⭐ | **Favorites, history, custom quotes** | `--favorite` / `--favorites` / `--history` / `--add` / `--import` / `--export` - all per-user, no root |
| 🔀 | **Live quote pool merging** | Custom quotes join the random pool next to the built-in ones, ids like `custom_0001` |
| 🚫 | **Zero gatekeeping** | No password walls, no update nags, no telemetry, nothing ever leaves your machine |
| 🎯 | **Strict conflict checker** | Incompatible flags rejected with plain language and exit 1 - never a Python traceback |
| 🛡️ | **Honest labeling** | Every flag does exactly what the help text says - nothing hidden |

<details>
<summary><b>🔄 What the flags really are</b></summary>

| Flag group | Flags | What they actually change |
|------------|-------|---------------------------|
| Browsing | *(none)* `--mood --category --count --search --id --list-moods --list-categories` | How quotes are picked and how many are shown |
| Tool info | `-v/--version` `--info` | One plain summary about the tool and author |
| Presentation | `--style minimal/classic/decorated` `--plain` `--no-color` | How the quote is rendered |
| User data | `--favorite --favorites --unfavorite --history --clear-history --add --import --export` | What is stored in your user data dir |
| Machine reading | `--json` | Turns the response into exact JSON |

</details>

---

## ⌨️ Usage

### Browsing

| Flag | Description | Example |
|------|-------------|---------|
| *(none)* | Print one random quote | `suicide` |
| `--mood MOOD` | Filter by mood | `--mood tired` |
| `--category CAT` | Filter by category | `--category courage` |
| `--count N` | Print N distinct quotes | `--count 5` |
| `--search TERM` | Case-insensitive full-text search | `--search tomorrow` |
| `--id ID` | One quote by id | `--id en_0001` |
| `--list-moods` | List available moods | `--list-moods` |
| `--list-categories` | List available categories | `--list-categories` |

Filters combine freely: `suicide --mood tired --category discipline --count 3`.
If nothing matches, you get a clear message and exit code 1 - never a traceback. If more quotes are requested than exist for a filter, you get every available one plus a short note on stderr, and exit code 0.

### The 6 moods & 6 categories

| Mood | What it targets | Category | What it covers |
|------|-----------------|----------|----------------|
| `sad` | Heavy days and losses | `life` | Perspective on being here |
| `lost` | Direction and purpose | `courage` | Facing what scares you |
| `anxious` | Worry and overthinking | `failure` | Learning from what fell apart |
| `tired` | Burnout and low battery | `growth` | Getting a little better each day |
| `hopeful` | Rebuilding outlook | `discipline` | Showing up when it's boring |
| `motivated` | Ready-for-action energy | `hope` | Believing tomorrow differs |

### Tool info

| Flag | Description | Example |
|------|-------------|---------|
| `-v, --version` | Print the version | `-v` |
| `--info` | Show tool purpose, author, license | `--info` |

`--info` explains what `suicide` is and who made it:

```text
suicide 1.0.0 - offline motivational quote CLI

Author:       MrHacker-X
Profile:      https://github.com/MrHacker-X
License:      MIT
```

It also accepts `--json` for a machine-readable summary.

### Presentation

| Flag | Description | Example |
|------|-------------|---------|
| `--style minimal` | Bare quote text only | `--style minimal` |
| `--style classic` | Clean `fortune`-style card | `--style classic` |
| `--style decorated` | Subtle colors, wrapped and centered | `--style decorated` |
| `--plain` | Shorthand for minimal | `--plain` |
| `--no-color` | Never emit ANSI codes | `--no-color` |
| `--json` | Valid JSON, decoration off | `--count 3 --json` |

Defaults are smart: a TTY gets the decorated panel; pipes and redirects get minimal output automatically. The `NO_COLOR` environment variable is respected, and terminals without ANSI support get plain, readable text.

```bash
suicide --mood anxious --style classic
suicide --count 3 --plain
suicide | cowsay          # minimal output pipes cleanly
```

### Favorites

| Flag | Description | Example |
|------|-------------|---------|
| `--favorite ID` | Remember a quote | `--favorite en_0001` |
| `--favorites` | Show every favorite | `--favorites` |
| `--unfavorite ID` | Remove one | `--unfavorite en_0001` |

Favorites live in your platform data directory - never inside the installed package, never needing root.

### History

| Flag | Description | Example |
|------|-------------|---------|
| `--history` | Recently displayed quotes (newest first) | `--history` |
| `--clear-history` | Erase it | `--clear-history` |

The selection engine quietly avoids the ten most recently shown quotes when enough alternatives remain, so repeat views stay fresh.

### Your own quotes

| Flag | Description | Example |
|------|-------------|---------|
| `--add TEXT` | Add a custom quote | `--add "Small steps still climb mountains."` |
| `--import FILE` | Merge a JSON file into your collection | `--import my-quotes.json` |
| `--export FILE` | Export your collection | `--export my-quotes.json` |

```bash
suicide --add "Small steps still climb mountains." \
        --mood tired,hopeful --category growth
```

Imported files accept either a bare JSON array or `{"quotes": [...]}`; each entry needs at least `{"text": "..."}` and may carry `moods`, `categories` and `author`. Texts already present are skipped during import, so re-importing is safe. Custom quotes join the random pool next to the built-in ones with ids like `custom_0001`.

### JSON output

`--json` always emits valid, banner-free JSON on stdout - errors included:

```bash
$ suicide --mood sad --count 2 --json
{
  "count": 2,
  "quotes": [
    {
      "id": "en_0004",
      "text": "Sadness is weather, not geography.",
      "moods": ["sad"],
      "categories": ["life", "hope"],
      "author": null
    }
  ]
}
```

Same for favorites, history, imports, exports and errors (`{"error": "..."}`), making the tool safe from scripts and bots.

### Strict combinations

Sensible combinations just work (`suicide --mood lost --count 5 --style minimal --json`).
Truly incompatible flags are rejected in plain language:

```text
suicide: --mood/--category/--count/--search belong to quote retrieval, not to --add (got --mood)
suicide: incompatible options (--id, --favorites); pick exactly one action
```

---

## 🖥️ Preview

<div align="center">

**Terminal preview - decorated panel, narrow and wide:**

</div>

```text
┌────────────────────────────────────────────────────────────────┐
│         Purpose beats mood. Do the next useful thing.          │
└────────────────────────────────────────────────────────────────┘
```

```text
┌──────────────────────────────────────────────────────────────────────┐
│  Weigh the ledger at year end, not at the half-time whistle of a     │
│                            bad week.                                 │
└──────────────────────────────────────────────────────────────────────┘
```

On a narrow terminal the same panel shrinks with it - at 20 columns the borders still close cleanly or drop away entirely, and the text is never clipped mid-character.

---

## 🧰 Tech Stack

| Layer | Technology |
|-------|------------|
| Language | Python 3.9+ |
| CLI | `argparse` (stdlib only) |
| Rendering | `rich` panel (declared dependency) with pure-stdlib plain-text fallback |
| Randomness | `secrets` (crypto-grade, no seeding) |
| Persistence | JSON files under your platform data dir, atomic writes |
| Packaging | `pyproject.toml` (setuptools), `pip install suicide`, `python -m suicide` |
| UI | tty / `NO_COLOR` / non-TTY auto-detection |

---

## ⚠️ Disclaimer

> ### Read this before using suicide.
>
> 1. **This is a motivational tool.** The name is intentional and unconventional; the purpose is entirely positive - hope, resilience, courage, and growth. Nothing it prints encourages, glorifies or romanticizes self-harm.
> 2. **This is not therapy.** If you are in a dark place, reach out to someone - a friend, a family member, or your local crisis or helpline service. A CLI can offer a sentence; a person can offer real help.
> 3. **Nothing leaves your machine.** suicide makes zero network requests, sends zero telemetry, and stores zero data anywhere but your own user directory.
> 4. **You are responsible for your setup.** suicide is provided "as is" under the MIT License, with no warranty of any kind. The author is **not liable** for anything that results from using or misusing this tool.
> 5. **Respect your data directory.** Favorites, history and custom quotes live under `SUICIDE_DATA_DIR`, `$XDG_DATA_HOME/suicide`, or your OS default. Deleting that directory deletes your data - keep exports if it matters.

---

## 🤝 Contributing

There's no separate Git repository for this project - it lives on **PyPI only**.

```bash
# ideas you like?
# 1. try the tool
pip install suicide
suicide --info
# 2. tell the author what works and what doesn't
#    via the profile: https://github.com/MrHacker-X
```

Ideas worth exploring: mood presets, a `--random-seed` flag, a `--clipboard` option, more quote sets, an upstream JSON edit tool.

---

## 📜 License

Distributed under the **MIT License**. See [`LICENSE`](LICENSE) for details.

---

## 👨‍💻 Developer

| | |
|---|---|
| **Dev** | MrHacker-X |
| **GitHub** | [github.com/MrHacker-X](https://github.com/MrHacker-X) |
| **Package** | [`suicide` on PyPI](https://pypi.org/project/suicide/) |
| **License** | MIT |

---

<div align="center">

### ⭐ Star the quote that found you when you needed it ⭐

*Built with discipline by MrHacker-X - stay strong, always.*

</div>
