Metadata-Version: 2.4
Name: clutch-cli
Version: 0.2.0
Summary: GitHub tracks your work. Clutch tracks you.
Author-email: Lay Patel <lay.patel.1313@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/laypatel13/clutch
Project-URL: Bug Tracker, https://github.com/laypatel13/clutch/issues
Keywords: github,developer,activity,cli,dashboard,streak
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Version Control :: Git
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: typer>=0.12.0
Requires-Dist: httpx>=0.27.0
Requires-Dist: rich>=13.0.0

<div align="center">

# ⚡ clutch-cli

### *The CLI companion for Clutch — GitHub tracks your work. Clutch tracks you.*

[![PyPI](https://img.shields.io/pypi/v/clutch-cli?style=for-the-badge&color=green)](https://pypi.org/project/clutch-cli)
[![Python](https://img.shields.io/badge/Python-3.11+-3776AB?style=for-the-badge&logo=python&logoColor=white)](https://python.org)
[![License](https://img.shields.io/badge/License-MIT-blue?style=for-the-badge)](https://github.com/laypatel13/clutch/blob/main/LICENSE)

</div>

---

`clutch-cli` is the terminal companion for [Clutch](https://clutch-laypatel.netlify.app) — an open-source AI-powered developer activity dashboard. Get your GitHub streaks, stats, coding patterns, and AI insights without leaving your terminal.

## Installation

```bash
pip install clutch-cli
```

## Quick Start

```bash
# Login via GitHub (opens browser automatically, no copy-paste needed)
clutch auth login

# Check your streak
clutch streak

# View your stats
clutch stats

# Get your AI weekly insight
clutch insight
```

## Commands

| Command | Description |
|---|---|
| `clutch auth login` | Login via GitHub OAuth (fully automatic) |
| `clutch auth logout` | Logout and clear saved credentials |
| `clutch auth whoami` | Show currently logged-in user |
| `clutch streak` | Current and longest commit streak |
| `clutch stats` | Activity stats — commits, PRs, issues, active days |
| `clutch stats --days 7` | Stats for a custom time range |
| `clutch repos` | Your most recently active repositories |
| `clutch insight` | AI-generated weekly insight (powered by Groq Llama) |
| `clutch patterns` | Coding patterns — best day, consistency score, day distribution |
| `clutch status` | Login status and API health check |
| `clutch --version` | Show installed version |

## How Login Works

`clutch auth login` spins up a temporary local server on port `9876`, opens GitHub OAuth in your browser, and automatically captures the token when GitHub redirects back. No copy-pasting required.

```
$ clutch auth login

⚡ Clutch Login
Opening GitHub in your browser...
Waiting for GitHub authorization...

✅ Logged in as @laypatel13
Welcome to Clutch, Lay Patel!
```

After the first login, your token is saved in `~/.clutch/config.json` and all commands work silently.

## Configuration

By default the CLI talks to the hosted Clutch API. To point it at a local backend:

```bash
export CLUTCH_API_URL=http://localhost:8000
clutch auth login
```

## Links

- 🌐 [Live Dashboard](https://clutch-laypatel.netlify.app)
- 📖 [Full Documentation](https://github.com/laypatel13/clutch)
- 🐛 [Report a Bug](https://github.com/laypatel13/clutch/issues)

## License

MIT © [Lay Patel](https://github.com/laypatel13)
