Metadata-Version: 2.4
Name: menupapi-cm
Version: 1.0.0
Summary: MENUPAPI Claude Session Monitor - real 5-hour resets from Claude.ai usage API with fallback estimate mode
Author-email: Sylvester Assiamah <sylvesterassiamah105@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/AssiamahS/menupapi-cm
Project-URL: Repository, https://github.com/AssiamahS/menupapi-cm
Project-URL: Issues, https://github.com/AssiamahS/menupapi-cm/issues
Keywords: claude,claude-code,monitor,usage,tokens,menubar,terminal,dashboard,session,anthropic
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Utilities
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Monitoring
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: rich>=13.7.0
Provides-Extra: dev
Requires-Dist: build>=1.2.1; extra == "dev"
Requires-Dist: twine>=5.1.1; extra == "dev"
Requires-Dist: ruff>=0.4.8; extra == "dev"
Dynamic: license-file

# MENUPAPI-CM (cm)

A lightweight terminal monitor that shows your **Claude Code 5-hour reset timer** and utilization.

Unlike most monitors, this supports **REAL Claude web session reset data** by pulling:

```
https://claude.ai/api/organizations/{org_id}/usage
```

If cookies are missing, it runs instantly in **estimate mode**.

---

## Install

```bash
pip install menupapi-cm
```

## Run

```bash
cm
```

## Features

- Shows real `five_hour.utilization` and `five_hour.resets_at`
- Shows real `seven_day.utilization` and `seven_day.resets_at`
- Works instantly without setup (estimate mode)
- Optional "real mode" using cookie file
- Includes `cm setup` and `cm doctor`

## Usage

```bash
# Run monitor
cm

# Setup real usage mode
cm setup

# Diagnose cookie + API access
cm doctor
```

## Enable REAL MODE (Claude Web API)

Cookie stored here:

```
~/.claude_cookie.txt
```

Permissions required:

```bash
chmod 600 ~/.claude_cookie.txt
```

Example cookie file format (ONE line only):

```
sessionKey=sk-ant-sid02-xxxxx; cf_clearance=xxxxx; lastActiveOrg=xxxxxxxx
```

## Works Out The Box

This tool cannot auto-grab browser cookies safely.
Auto-extracting cookies from Chrome would become malware-adjacent.

So the correct UX is:

- `cm` runs immediately in estimate mode
- `cm setup` enables real mode
- `cm doctor` validates cookie + prints fix steps

## Build + Publish (for maintainer)

```bash
# Build
python3 -m build

# Upload to PyPI
python3 -m twine upload dist/*
```

## Author

**Sylvester Assiamah** — The Menu Papi
