Skip to main content

Herd

PyPI Version

Document and code management toolkit that uses language models for file organization, content extraction, and document analysis. Successor to llamaherder.

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 geepers-herd

The CLI installs as herd and the Python module as herd_ai.

System requirements

The toolkit pulls in heavyweight dependencies (Pillow, reportlab, beautifulsoup4, rich). For local inference it expects an Ollama server; point OLLAMA_API_URL at a non-default host if yours isn't on http://localhost:11434.

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")

LLM Provider Support

Herd supports multiple LLM providers:

  • Ollama (default): Uses local models like Llama, Gemma, Mistral
  • xAI: Uses 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

License

MIT. Author: Luke Steuber (luke@lukesteuber.com, lukesteuber.com).

Release files for geepers-herd 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for geepers-herd 1.0.0
File Size Uploaded
geepers_herd-1.0.0.tar.gz 134.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for geepers-herd 1.0.0
File Interpreter ABI Platform
geepers_herd-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size:269.9 kB

Release files / geepers_herd-1.0.0.tar.gz

Download URL geepers_herd-1.0.0.tar.gz
Size 134.9 kB
Tags Source
SHA-256 checksum
How to use checksums
7bee40e23a7b268a289c3e9b42d701e8fd5b0a8703bda28e58f5973871c0689c
BLAKE2b-256 checksum
How to use checksums
5a0593300bdeafeb921aafc50fd6d7b90ef3643e3d450578098c519a7f7a1aaa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release files / geepers_herd-1.0.0-py3-none-any.whl

Download URL geepers_herd-1.0.0-py3-none-any.whl
Size 135.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
54983183921c844145c84d8b752dde0ec25c9ca130df137c404c327a5038e705
BLAKE2b-256 checksum
How to use checksums
0584a4ccbbc7981aa7a56421675ac4e3bd48e59dab383fce6ead0acc3f6a5ac1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page