Metadata-Version: 2.4
Name: shramikfont
Version: 0.2.0
Summary: Mission-assurance personality layer for command-line tools. The worker. The mission. The font.
Author: SHRAMIK
License: MIT
Project-URL: Homepage, https://shramik.io
Project-URL: Documentation, https://shramik.io/docs
Project-URL: Repository, https://github.com/SHRAMIK-IO/shramikfont
Keywords: cli,terminal,ui,mission-assurance,load-testing,federal,ansi,shramik
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Topic :: Software Development :: Testing
Classifier: Topic :: System :: Monitoring
Classifier: Topic :: Terminals
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# SHRAMIK · The worker. The mission. The font.

[![test](https://github.com/SHRAMIK-IO/shramikfont/actions/workflows/test.yml/badge.svg)](https://github.com/SHRAMIK-IO/shramikfont/actions/workflows/test.yml)
[![PyPI](https://img.shields.io/pypi/v/shramikfont.svg)](https://pypi.org/project/shramikfont/)
[![Python](https://img.shields.io/pypi/pyversions/shramikfont.svg)](https://pypi.org/project/shramikfont/)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)

> Drop-in mission-assurance personality for your command-line tools.
> Pure Python. **Zero dependencies.** CI/CD safe. Federal-friendly.

```
                       ◉ SHRAMIK MISSION ASSURANCE PLATFORM
        Validation  →  Performance  →  Readiness  →  Evidence  →  Authorization
                       One Platform. One Workflow. One Mission.
```

---

## Why

Most CLI tools look like CLI tools. **SHRAMIK** tools look like *mission consoles* — without losing a single deterministic guarantee. The engine stays boring. Reports stay clean. The exit code is still the contract. The CLI just gets a soul.

Fonts wrap text in personality. **ShramikFont** wraps your CLI in personality. Drop it in, pick a theme, ship it.

---

## The five-line drop-in

```python
import shramikfont as sf
from shramikfont.cli import add_shramik_args

parser = add_shramik_args(your_existing_argparser)
args = parser.parse_args()
theme, _ = sf.resolve_theme(args.ui_theme)         # auto-falls-back to 'none' in CI
sf.print_banner(theme, edition="Lite")             # silent in CI, hype in futuristic mode
# ... your engine runs untouched ...
sf.mission.print_dashboard(theme, metrics)         # executive-friendly post-run summary
```

That's the deal. **Engine logic stays where it is.** ShramikFont only writes to stdout, only after the engine asks it to, and only when the environment allows.

---

## What it looks like

| Theme | Use for | Vibe |
|---|---|---|
| `classic`    | Lite & Pro defaults                         | Familiar. Minimal. Doesn't show off. |
| `vintage`    | Titan default. Federal proof runs.          | Mature federal engineering aesthetic. No animation. |
| `futuristic` | Sales demos. Walkthroughs. `--demo-ui`.     | Full Palantir / Anduril hype. Cyber-glitch banner, pulses, loading bars. |
| `none`       | CI/CD, `--raw`, `--json`, pipes             | Pure machine-readable. Auto-forced. |

---

## Mission profiles

```bash
--profile smoke           # Quick dev validation. Minimal output.
--profile stress          # Heavy load. Vintage theme. Minimal UI.
--profile ci-gate         # CI/CD. Forces theme=none, suppresses banner, deterministic.
--profile federal-proof   # Fingerprint + integrity manifest + authorization badge + mission patch.
--profile airgap          # Highlights no-internet, no-telemetry posture.
```

---

## The 12 lovable features

1. **Mission Readiness Score** (0–100) blending SLA / errors / latency / throughput
2. **Deployment Gate** — `PASS` or `BLOCKED` with enumerated reasons. Drives exit code.
3. **Run Fingerprint** — `SK-LITE-YYYYMMDD-HHMMSS-XXXX`. Short, sortable, shareable.
4. **Mission Control Dashboard** — executive-friendly ASCII summary
5. **Evidence Vault** — tidy summary of report artifacts with status badges
6. **Mission Timeline** — Anduril-style timestamped event log
7. **SHA256 Integrity Manifest** — federal-audit-grade artifact verification
8. **Authorization Badge** — `READY FOR REVIEW` / `REQUIRES REMEDIATION` (RMF / ATO language)
9. **Air-Gap Readiness Panel** — declares the run's air-gap posture, screenshot-worthy
10. **Mission Patch** — ASCII patch in-terminal + SVG export for Slack / stickers
11. **Achievement Unlocks** — `ZERO_ERROR_MISSION`, `SUSTAINED_TPS_500`, etc.
12. **Mission Log** — `~/.shramik/log.jsonl` remembers your last N runs

Plus a handful of pure-delight extras:

- `shramikfont vibe` — today's mission vibe (morning / afternoon / Friday / weekend)
- `shramikfont fortune` — Unix-style mission aphorisms
- `shramikfont demo` — the full boot-sequence hype reel
- `shramikfont screensaver` — looping MISSION READY pulse until Ctrl+C
- `shramikfont readme` — pretty-prints this README in-terminal
- `shramikfont missions` — your last 10 missions, color-coded
- `shramikfont forge --plan pro` — mints a demo license key (cosmetic)
- `shramikfont patch --export run.svg` — exports an SVG mission patch
- `--sfx` — opt-in sound effects on PASS / BLOCK (macOS / Linux / Windows)

---

## Safety guarantees

ShramikFont **never** influences the engine. Hard rules enforced by `shramikfont.safety`:

- `CI=true`, `GITHUB_ACTIONS`, `GITLAB_CI`, `JENKINS_HOME`, `TF_BUILD`, `BUILDKITE`, `CIRCLECI`, `TRAVIS`, `BAMBOO_BUILD_NUMBER`, `TEAMCITY_VERSION`, `CODEBUILD_BUILD_ID`, `DRONE` → **theme forced to `none`**
- `--raw` / `--json` / `--output-json` → **theme forced to `none`** (cannot be overridden, ever)
- Stdout not a TTY (piped or redirected) → **theme forced to `none`**
- `--force-ui` overrides CI auto-detect but **not** `--raw` / `--json`
- Themes carry an explicit `sleep_multiplier`. Non-futuristic themes set it to `0.0` — no animation, no delays, no surprises in long-running sessions.

The headline guarantee: **switching themes never changes engine metrics.** Covered by `tests/test_themes_isolated.py::test_readiness_score_identical_regardless_of_theme`.

---

## Try it now

```bash
# 1. Run the full hype-reel demo
python3 -m shramikfont.cli demo

# 2. Run the example load tester in futuristic mode
python3 examples/shramik_lite.py --url https://httpbin.org/get \
                                 --users 10 --duration 10 --ui-theme futuristic

# 3. Run the same thing as a federal proof
python3 examples/shramik_lite.py --url https://httpbin.org/get \
                                 --users 10 --duration 10 \
                                 --profile federal-proof --mission-patch \
                                 --export-patch ~/Desktop/run.svg

# 4. Run it as a CI/CD gate (auto-disables all UI, deterministic 2-line output)
python3 examples/shramik_lite.py --url https://httpbin.org/get \
                                 --users 10 --duration 10 --raw

# 5. Have fun
python3 -m shramikfont.cli vibe
python3 -m shramikfont.cli fortune
python3 -m shramikfont.cli patch --edition LITE --status READY
```

---

## Install

```bash
pip install -e .          # for now (PyPI later)
```

Or just drop the `shramikfont/` folder next to your script. **Pure stdlib means zero install friction.**

---

## Editions

ShramikFont ships with one PoC: `examples/shramik_lite.py`. It's a real load-tester (the engine from the v1.7.0 production Lite binary) with ShramikFont wrapped around it.

Future PoCs will follow the same pattern: take an existing engine, leave the engine alone, wrap the CLI surface in ShramikFont.

| Edition | Default theme | Status |
|---|---|---|
| `shramik_lite.py`  | classic  | ✅ v0.1.0 (`examples/`) — single-file load tester |
| `shramik_pro.py`   | classic  | ✅ v0.2.0 (`examples/`) — full Pro engine: SLA, --rampup, --pacing, bearer/basic auth, HTML/CSV/JSON exports, CPU/mem telemetry |
| `shramik_check.py` | classic  | ✅ v0.2.0 (`examples/`) — functional API validation (subcommand CLI: `doctor` / `run`) |
| `shramik_flow.py`  | classic  | ✅ v0.2.0 (`examples/`) — CI/CD operational validation (subcommand CLI: `version` / `doctor` / `check` / `report`) |
| `shramik_titan.py` | vintage  | planned (when the Titan async engine lands) |

---

## Architecture

```
your_cli.py
   ↓
   parse args  →  add_shramik_args()
   ↓
   resolve theme  →  sf.resolve_theme()  (auto-safe in CI / --raw / --json)
   ↓
   print banner  →  sf.print_banner()    (silent if theme.name == 'none')
   ↓
   ─────── your engine runs untouched ───────
   ↓
   collect metrics → dict
   ↓
   sf.mission.print_dashboard(theme, metrics)
   sf.mission.print_readiness(theme, inputs)
   sf.mission.print_gate(theme, gate_result)
   sf.mission.print_fingerprint(theme, run_id)
   sf.mission.print_timeline(theme, events)
   sf.mission.print_mission_patch(theme, run_id)
   ↓
   sys.exit(gate_result.exit_code)
```

The presentation layer **never** lives inside the request loop, latency collection, metrics engine, report serializer, or SLA evaluator. That's the contract.

---

## Tests

```bash
python3 -m pytest tests/ -v
```

27 tests covering safety guardrails, readiness scoring, deployment gate logic, fingerprint format, and the theme-isolation guarantee.

---

## Domains

- **shramik.io** — primary
- **shramik.ai** — reserved
- **shramik.tech** — reserved

---

## License

MIT · © 2026 SHRAMIK · [shramik.io](https://shramik.io)
