Metadata-Version: 2.1
Name: tanu-cli
Version: 1.0.1
Summary: Automated evaluation assistant for SK
Home-page: https://github.com/yourusername/tanu-cli
Author: Tanu Team
Author-email: Tanu Team <tranlequybaotk12@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/yourusername/tanu-cli
Project-URL: Documentation, https://github.com/yourusername/tanu-cli/wiki
Project-URL: Repository, https://github.com/yourusername/tanu-cli.git
Project-URL: Bug Tracker, https://github.com/yourusername/tanu-cli/issues
Keywords: cli,automation,snorkel,evaluation,playwright
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: playwright>=1.40.0
Requires-Dist: rich>=13.0.0
Requires-Dist: prompt_toolkit==3.0.36
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: flake8>=6.0.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"

# Tanu CLI

<div align="center">

```
╔════════════════════════════════════════════════════════════╗
║                                                            ║
║   ████████╗ █████╗ ███╗   ██╗██╗   ██╗                     ║
║   ╚══██╔══╝██╔══██╗████╗  ██║██║   ██║                     ║
║      ██║   ███████║██╔██╗ ██║██║   ██║                     ║
║      ██║   ██╔══██║██║╚██╗██║██║   ██║                     ║
║      ██║   ██║  ██║██║ ╚████║╚██████╔╝                     ║
║      ╚═╝   ╚═╝  ╚═╝╚═╝  ╚═══╝ ╚═════╝                      ║
║                                                            ║
║                  CLI - Command Line Interface              ║
║                     SK Automation Tool                     ║
║                                                            ║
╚════════════════════════════════════════════════════════════╝
```

**Automated evaluation assistant for SK**

[![PyPI version](https://badge.fury.io/py/tanu-cli.svg)](https://badge.fury.io/py/tanu-cli)
[![Python](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

</div>

## Features

✨ **Beautiful CLI Interface** - Rich colors, tables, and interactive prompts  
🤖 **Automated Form Filling** - Automatically fill evaluation forms  
📊 **Content Extraction** - Save instructions and responses to files  
🔐 **Smart Authentication** - OTP input from CLI, session management  
⚡ **Fast & Reliable** - Efficient automation with Playwright  

## Installation

### From PyPI (recommended)

```bash
pip install tanu-cli
```

**That's it!** Playwright Chromium will be installed automatically.

If auto-install fails, run manually:
```bash
playwright install chromium
```

### From source

```bash
git clone https://github.com/yourusername/tanu-cli.git
cd tanu-cli
pip install -e .
# Playwright Chromium installs automatically
```

## Quick Start

```bash
# Run Tanu CLI
tanu

# First time setup:
# 1. Enter your Sk email
# 2. Enter OTP code
# 3. Select rating (1-5)
# 4. Fill evaluation forms
```

## Usage

### Basic Workflow

1. **Login** - Enter email (saved for next time) and OTP
2. **Step 1** - Rate prompt quality (1-5)
3. **Step 2** - Evaluate Response A:
   - Strengths (200+ chars)
   - Other issues (20+ chars)
   - Weaknesses (optional)
4. **Step 3** - Evaluate Response B
5. **Step 4** - Compare responses

### Weaknesses Selection

Select weaknesses using numbers or codes:

```
Available Weakness Categories:
#  Code         Description
1  [INST]       Instruction Following Failures
2  [OVERENG]    Overengineering
3  [TOOL]       Tool Use Errors
...

Select weaknesses: 1,3,7
# or
Select weaknesses: INST,TOOL,ROOT
```

### Output Files

All data is saved to `./evaluation_results/{task_id}/`:

- `instruction.md` - Task prompt and instructions
- `response_A.md` - Response A content
- `response_B.md` - Response B content
- `*.json` - JSON versions of all data

## Configuration

Config file: `./tanu_config.json`

```json
{
  "email": "your.email@example.com"
}
```

Session cookies: `./snorkel_cookies.json` (auto-managed)

## Development

### Setup development environment

```bash
git clone https://github.com/yourusername/tanu-cli.git
cd tanu-cli
pip install -e ".[dev]"
```

### Run tests

```bash
pytest tests/
```

### Build package

```bash
python -m build
```

## Requirements

- Python 3.8+
- playwright >= 1.40.0
- rich >= 13.0.0
- prompt_toolkit == 3.0.36

## License

MIT License - see [LICENSE](LICENSE) file for details.

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## Support

- Issues: https://github.com/yourusername/tanu-cli/issues
- Documentation: https://github.com/yourusername/tanu-cli/wiki

## Changelog

### v1.0.0 (2026-03-19)

- Initial release
- Email configuration with auto-save
- Interactive rating selection
- Number-based weakness selection
- Rich CLI interface with spinners
- OTP input from CLI
- Automated form filling
- Content extraction to JSON/Markdown

---

**Made with ❤️ by Tanu Team**
