Metadata-Version: 2.4
Name: fleece-cli
Version: 0.4.1
Summary: Credit card research and redemption CLI — live data via Brave Search, PointsYeah URL generation, designed for humans and AI agents.
Author-email: Yuan Chen <cysbc1999@gmail.com>
License: MIT
License-File: LICENSE
Keywords: ai,brave-search,cli,credit-cards,finance
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
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 :: Office/Business :: Financial
Requires-Python: >=3.11
Requires-Dist: langchain-core>=0.3.0
Requires-Dist: pydantic>=2.0
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: requests>=2.31.0
Requires-Dist: typer[all]>=0.12.0
Description-Content-Type: text/markdown

# Fleece — Credit Card Research & Redemption

[![PyPI version](https://img.shields.io/pypi/v/fleece-cli?color=FFD100&label=fleece-cli)](https://pypi.org/project/fleece-cli/)
[![PyPI downloads](https://img.shields.io/pypi/dm/fleece-cli?color=FFD100)](https://pypi.org/project/fleece-cli/)
[![Python](https://img.shields.io/pypi/pyversions/fleece-cli?color=FFD100)](https://pypi.org/project/fleece-cli/)
[![License: MIT](https://img.shields.io/badge/License-MIT-FFD100.svg)](https://github.com/chenyuan99/fleece/blob/main/LICENSE)
[![Publish to PyPI](https://github.com/chenyuan99/fleece/actions/workflows/publish.yml/badge.svg)](https://github.com/chenyuan99/fleece/actions/workflows/publish.yml)
[![ClawHub](https://img.shields.io/badge/ClawHub-fleece%401.5.0-FFD100)](https://clawhub.ai)
[![Website](https://img.shields.io/website?url=https%3A%2F%2Fgetfleece.io&color=FFD100&label=getfleece.io)](https://getfleece.io/)

> Find the best card for deal saviors.

Fleece is a free, open-source credit card research and award redemption toolkit. It provides live data via Brave Search — no stale training data. Every command outputs clean JSON, making it easy to plug into AI agent workflows.

---

## Quick Start

```bash
pip install fleece-cli
export BRAVE_API_KEY=<your_key>   # optional — offline commands work without it

fleece card "Amex Gold"           # full card report
fleece wallet                     # portfolio analysis
fleece mcc 5812                   # MCC lookup (no API key needed)
fleece flights JFK NRT --date 2026-06-01 --cabin business --open
```

### Install as an agent skill (55+ agents)

```bash
npx skills add chenyuan99/fleece
```

Works with Claude Code, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, Codex, Warp, Kiro, and more — all from one command.

## CLI Commands

### Research (requires `BRAVE_API_KEY`)

| Command | Description |
|---|---|
| `fleece card "<name>"` | Fees, welcome offer, earning rates, credits, benefits |
| `fleece rates "<name>"` | Earning rates by spend category |
| `fleece partners "<name>"` | Transfer partners, ratios, and timing |
| `fleece credits "<name>"` | Statement credits and perks |
| `fleece news "<name>"` | Recent changes (past month) |
| `fleece compare "<A>" "<B>"` | Side-by-side card comparison |
| `fleece wallet` | Portfolio analysis — coverage, overlaps, gaps |
| `fleece roi "<name>"` | First-year ROI estimate |
| `fleece recommend "<profile>"` | Personalized card recommendations |

### Offline (no API key needed)

| Command | Description |
|---|---|
| `fleece mcc <code>` | Look up a Merchant Category Code (981 codes bundled) |
| `fleece mcc <code> --wallet` | Cross-reference MCC with your saved cards |
| `fleece flights <ORIGIN> <DEST> --date <YYYY-MM-DD>` | PointsYeah award flight search URL |
| `fleece hotels "<location>" --checkin <date> --checkout <date>` | PointsYeah award hotel search URL |
| `fleece profile set <field> <value>` | Save your spending profile |
| `fleece profile show` | View your profile |

All commands support `--json` for agent-friendly output and `-` to read from stdin.

## Spending Profile

Set your profile once — `fleece wallet`, `fleece roi`, and `fleece recommend` use it automatically:

```bash
fleece profile set dining_monthly 600
fleece profile set travel_monthly 300
fleece profile set home_airport JFK
fleece profile set goal "business class to Tokyo 2027"
fleece profile set annual_fee_tolerance 550

fleece roi "Amex Gold"      # spend values pulled from profile
fleece wallet               # gap analysis tailored to your spend
```

## AI Agent Integration

### Universal (55+ agents) — recommended
```bash
npx skills add chenyuan99/fleece
```
Installs to Claude Code, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, Codex, Warp, Kiro, Continue, and Junie in one command.

### Platform-specific
```bash
bash install.sh --claude    # Claude Code slash commands
bash install.sh --agents    # OpenClaw / Codex SKILL.md
bash install.sh --gemini    # Gemini CLI (GEMINI.md)
bash install.sh --copilot   # GitHub Copilot
bash install.sh --cursor    # Cursor
bash install.sh --windsurf  # Windsurf
bash install.sh --all       # everything above
```

### ClawHub Registry
```bash
clawhub install fleece   # fleece@1.5.0
```

## Chatbot

A Streamlit conversational interface is also included:

```bash
pip install -r requirements.txt
OPENAI_API_KEY=<key> streamlit run fleece.py
```

## Development

```bash
git clone https://github.com/chenyuan99/fleece.git
cd fleece
pip install -e .
export BRAVE_API_KEY=<your_key>
fleece --help
```

### Running tests
```bash
pip install pytest
pytest -q
```

## License

MIT — see [LICENSE](LICENSE)

## Author

[@chenyuan99](https://github.com/chenyuan99) · [getfleece.io](https://getfleece.io/)
