Metadata-Version: 2.4
Name: lunar-cli
Version: 0.1.0
Summary: CLI for Lunar API - chat completions and semantic routing
Author-email: Lunar <dev@lunar-sys.com>
License-Expression: MIT
Keywords: ai,cli,llm,lunar,router,semantic
Requires-Python: >=3.9
Requires-Dist: click>=8.0.0
Requires-Dist: httpx>=0.25.0
Requires-Dist: rich>=13.0.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == 'dev'
Requires-Dist: ruff>=0.1.0; extra == 'dev'
Description-Content-Type: text/markdown

# Lunar CLI

Command-line interface for the Lunar API - chat completions and semantic routing.

## Install

```bash
pip install -e .
```

## Quick Start

```bash
# Configure authentication
lunar config set api-key YOUR_API_KEY

# Chat completion
lunar chat "Hello world" -m gpt-4o-mini

# Streaming
lunar chat "Explain recursion" -m claude-3-5-sonnet --stream

# Semantic routing - picks the best model for your prompt
lunar router route "Explain quantum computing" -m gpt-4o-mini,claude-3-5-sonnet

# Routing with cost optimization
lunar router route "Write a poem" -m gpt-4o-mini,claude-3-5-sonnet -c 0.5

# Dry run - see routing decision without executing
lunar router route "Hello" -m gpt-4o-mini,claude-3-5-sonnet --dry-run

# List models and providers
lunar models
lunar providers -m gpt-4o-mini
```

## Commands

| Command | Description |
|---------|-------------|
| `lunar chat` | Send a chat completion request |
| `lunar router route` | Route a prompt to the best model |
| `lunar router profiles` | List semantic routing profiles |
| `lunar models` | List available models |
| `lunar providers` | List available providers |
| `lunar config show` | Show current configuration |
| `lunar config set` | Set a config value |
| `lunar config get` | Get a config value |
| `lunar config delete` | Delete a config value |

## Configuration

Config is stored in `~/.lunar/config.json`. Environment variables are used as fallbacks:

| Config Key | Env Variable | Description |
|------------|-------------|-------------|
| `api-key` | `LUNAR_API_KEY` | API key |
| `jwt` | `LUNAR_JWT` | JWT token |
| `environment` | `LUNAR_ENV` | `dev` or `prod` (default: `prod`) |
| `base-url` | - | Custom API base URL |
| `timeout` | - | Request timeout in seconds |
