Herd AI
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:
pip install herd-ai
Quick Start
# 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:
herd --dir ~/Documents --rename --provider openai
Or in code:
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:
herd
Documentation
For full documentation, visit the Herd AI documentation.
Development
See DEVELOPMENT.md for information on contributing to Herd AI.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Release files for herd-ai 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| herd_ai-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Release files / herd_ai-0.2.0-py3-none-any.whl
| Download URL | herd_ai-0.2.0-py3-none-any.whl |
|---|---|
| Size | 112.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4dfd54a6aefb126c8ab3fb8ae43dc1b044cc90576c1ce45ce83e2fa59cef714e
|
|
BLAKE2b-256 checksum How to use checksums |
bf7e5bb37245a8d9420a706a86f994f133ea4d5b3df1c1e7bdb266c896161bcf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|