# MangoDesk CLI

Command-line tool for running tool-use RL environment evaluations.

## Installation

```bash
# Using pipx (recommended)
pipx install mangodesk

# Using pip
pip install mangodesk
```

## Quick Start

```bash
# 1. Get your API key from https://mangodesk-api-ezq8.onrender.com
# 2. Configure the CLI
mangodesk set MANGO_API_KEY=sk-mango-xxx

# 3. Initialize a new environment
mangodesk init my-env

# 4. Run evaluation
mangodesk eval ./my-env claude-3-5-sonnet
```

## Configuration

```bash
# Set your API key (get it from the dashboard)
mangodesk set MANGO_API_KEY=sk-mango-xxx

# Set API URL (optional, for self-hosted)
mangodesk set API_URL=https://your-api.example.com

# Set Anthropic API key for LLM calls (coming in Phase 2)
mangodesk set ANTHROPIC_API_KEY=sk-ant-xxx

# View current configuration
mangodesk config
```

## Commands

### Initialize a new environment

```bash
mangodesk init my-env
```

Creates a new environment scaffold with:
- `tools.py` - Tool definitions
- `data.py` - Data loader
- `tasks.json` - Task definitions
- `README.md` - Documentation

### Run evaluation

```bash
mangodesk eval <env_path> <model> [--tasks task1,task2]
```

Examples:
```bash
# Run all tasks
mangodesk eval ./my-env claude-3-5-sonnet

# Run specific tasks
mangodesk eval ./my-env gpt-4 --tasks task_001,task_002
```

### View/set configuration

```bash
# Set a value
mangodesk set KEY=value

# View all config
mangodesk config
```

## Environment Structure

A MangoDesk environment consists of:

```
my-env/
├── tools.py       # Tool definitions in OpenAI function format
├── data.py        # Initial state and context
├── tasks.json     # Task definitions with verifiers
└── README.md      # Documentation
```

## License

Proprietary - Copyright © MangoDesk Inc. All rights reserved.
