Metadata-Version: 2.4
Name: llmpeg
Version: 0.1.2
Summary: LLM-powered FFmpeg command assistant
Project-URL: Homepage, https://github.com/imortaltatsu/llmpeg
Project-URL: Repository, https://github.com/imortaltatsu/llmpeg
Project-URL: Issues, https://github.com/imortaltatsu/llmpeg/issues
Author: imortaltatsu
License: MIT
License-File: LICENSE
Keywords: ai,audio,compression,conversion,ffmpeg,llm,video
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Multimedia :: Sound/Audio
Classifier: Topic :: Multimedia :: Video
Classifier: Topic :: Utilities
Requires-Python: >=3.12
Requires-Dist: openai>=1.0.0
Requires-Dist: pydantic>=2.12.4
Requires-Dist: rich>=14.2.0
Requires-Dist: typer>=0.20.0
Description-Content-Type: text/markdown

## llmpeg

LLM-powered FFmpeg command assistant that converts natural language instructions into `ffmpeg` commands.

**Repository:** [https://github.com/imortaltatsu/llmpeg](https://github.com/imortaltatsu/llmpeg)  
**PyPI Package:** [https://pypi.org/project/llmpeg/](https://pypi.org/project/llmpeg/)

### Features
- Conversational interface that converts natural language instructions into `ffmpeg` commands
- GPT-compatible API support (OpenRouter, Ollama, or custom endpoints)
- Interactive file selection when requests are ambiguous
- Automatic command validation and error correction
- Support for compression, conversion, and cropping operations

### Installation

#### From PyPI (Recommended)

**Using pip:**
```bash
pip install llmpeg
```

**Using pipx** (isolated installation, recommended for CLI tools):
```bash
pipx install llmpeg
```

**Using uv:**
```bash
uv pip install llmpeg
```

#### From Git Repository

**Using pip:**
```bash
pip install git+https://github.com/imortaltatsu/llmpeg.git
```

**Using pipx:**
```bash
pipx install git+https://github.com/imortaltatsu/llmpeg.git
```

**Using uv:**
```bash
uv pip install git+https://github.com/imortaltatsu/llmpeg.git
```

**Using uvx (run without installing):**
```bash
uvx git+https://github.com/imortaltatsu/llmpeg.git
```

#### Local Development

```bash
# Clone the repository
git clone https://github.com/imortaltatsu/llmpeg.git
cd llmpeg

# Install in development mode
uv sync
# or
pip install -e .
```

### Setup

After installation, configure your API settings:

```bash
# Interactive setup
llmpeg setup init

# Or use environment variables
export LLMPEG_PROVIDER=openrouter
export LLMPEG_API_KEY=your-api-key
export LLMPEG_MODEL_NAME=gpt-oss:20b
```

### Usage

```bash
# Single command
llmpeg -p "convert sample.png to jpg"

# Interactive mode
llmpeg

# Setup commands
llmpeg setup init    # Configure API settings
llmpeg setup show    # Show current configuration
llmpeg setup test    # Test API connection
```

### Configuration

Configuration is stored in `~/.llmpeg/config.py` or `~/.llmpeg/config.json`.

Supported providers:
- **OpenRouter**: Use `gpt-oss:20b` or other models
- **Ollama**: Local Ollama instance (defaults to `gpt-oss:20b`)
- **Custom**: Any OpenAI-compatible API endpoint

### Requirements

- Python 3.12+
- FFmpeg installed and available in PATH
- API access (OpenRouter API key, Ollama running locally, or custom endpoint)
