Skip to main content

LLM toolkit for file management, citation extraction, content idealization, and document generation.

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

geepers_herd-1.0.0.tar.gz (134.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

geepers_herd-1.0.0-py3-none-any.whl (135.0 kB view details)

Uploaded Python 3

File details

Details for the file geepers_herd-1.0.0.tar.gz.

File metadata

  • Download URL: geepers_herd-1.0.0.tar.gz
  • Upload date:
  • Size: 134.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for geepers_herd-1.0.0.tar.gz
Algorithm Hash digest
SHA256 7bee40e23a7b268a289c3e9b42d701e8fd5b0a8703bda28e58f5973871c0689c
MD5 d7d5294a64ab3036483cf25a083928a7
BLAKE2b-256 5a0593300bdeafeb921aafc50fd6d7b90ef3643e3d450578098c519a7f7a1aaa

See more details on using hashes here.

File details

Details for the file geepers_herd-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: geepers_herd-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 135.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for geepers_herd-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 54983183921c844145c84d8b752dde0ec25c9ca130df137c404c327a5038e705
MD5 390b27c043ffe69f8ccea2ff6a8c4bed
BLAKE2b-256 0584a4ccbbc7981aa7a56421675ac4e3bd48e59dab383fce6ead0acc3f6a5ac1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page