Metadata-Version: 2.4
Name: herd-ai
Version: 0.2.0
Summary: A comprehensive AI-powered tools suite for file management, citation extraction, content idealization, and document generation.
Home-page: https://github.com/lukeslp/kernel/tree/master/projects/packages/working/herd
Author: Luke Steuber
Author-email: Luke Steuber <luke@lukesteuber.com>
License: MIT License
        
        Copyright (c) 2025 Luke Steuber
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/lukeslp/kernel/tree/master/projects/packages/working/herd
Project-URL: Bug Tracker, https://github.com/lukeslp/kernel/issues
Project-URL: Documentation, https://github.com/lukeslp/kernel/blob/master/projects/packages/working/herd/README.md
Project-URL: Source, https://github.com/lukeslp/kernel
Project-URL: Changelog, https://github.com/lukeslp/kernel/blob/master/projects/packages/working/herd/PROJECT_PLAN.md
Keywords: ai,file-management,citations,document-generation,idealization,rename,snippets,image-processing
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: End Users/Desktop
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
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Documentation
Classifier: Topic :: Text Processing :: Markup
Classifier: Topic :: Utilities
Classifier: Environment :: Console
Classifier: Natural Language :: English
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: rich>=13.0.0
Requires-Dist: requests>=2.32.5
Requires-Dist: Pillow>=11.0.0
Requires-Dist: pyyaml>=6.0.0
Requires-Dist: pyperclip>=1.9.0
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: inquirer>=3.0.0
Requires-Dist: blessed>=1.20.0
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# Herd AI

![PyPI Version](https://img.shields.io/pypi/v/herd-ai)
![License](https://img.shields.io/github/license/lukesteuber/herd)

A comprehensive document and code management toolkit powered by AI. Herd AI leverages Large Language Models for intelligent file organization, content extraction, and document analysis.

## Features

- **Smart File Renaming**: Automatically generate meaningful filenames based on content
- **Code Snippet Extraction**: Extract and organize important code segments
- **Citation Management**: Extract and format citations from research documents
- **Document Idealization**: Create canonical, cleaned versions of text content
- **Image Processing**: Generate alt text and description for image files
- **Documentation Generation**: Create comprehensive documentation for code repositories
- **Deduplication**: Find and manage duplicate files efficiently
- **Interactive CLI**: User-friendly interface with intuitive navigation and directory switching

## Installation

Install from PyPI:

```bash
pip install herd-ai
```

## Quick Start

```python
# Process files in a directory (CLI)
herd --dir ~/Documents/project --rename --recursive

# Extract code snippets 
herd --dir ~/code/project --snippets

# Generate documentation
herd --dir ~/code/project --docs

# Process images
herd --dir ~/images --images

# Launch interactive CLI
herd

# Use in your Python code
from pathlib import Path
from herd_ai.rename import process_renames
from herd_ai.snippets import process_snippets

# Smart file renaming
process_renames(Path("~/Documents/project"), recursive=True, provider="ollama")

# Extract code snippets
process_snippets(Path("~/code/project"), recursive=True, provider="ollama")
```

## AI Provider Support

Herd AI supports multiple AI providers:

- **Ollama** (default): Uses local models like Llama, Gemma, Mistral
- **X.AI**: Uses X.AI/Grok models for advanced processing
- **Google Gemini**: Uses Google's Gemini API for text and image processing
- **OpenAI**: Uses OpenAI's API for text and image processing
- **Cohere**: Uses Cohere's API for text processing

Select your provider with the `--provider` flag:

```bash
herd --dir ~/Documents --rename --provider openai
```

Or in code:

```python
process_renames(Path("~/Documents"), provider="openai")
```

## Interactive CLI

Herd features an intuitive interactive CLI with the following keyboard shortcuts:

- **Numeric keys (1-9)**: Select menu options
- **s**: Access settings menu (change provider, set API keys)
- **d**: Change target directory without restarting
- **q**: Quit the current menu or application
- **Ctrl+C**: Go back one menu level (or exit if at main menu)

Launch the interactive CLI:

```bash
herd
```

## Documentation

For full documentation, visit [the Herd AI documentation](https://github.com/lukesteuber/herd/docs).

## Development

See [DEVELOPMENT.md](DEVELOPMENT.md) for information on contributing to Herd AI.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
