Skip to content

davidrpapp1/plumber

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Plumber

A Python-based CSV manager and manipulator with natural language interface.

Overview

Plumber is a command-line tool that allows you to manipulate CSV files using natural language commands. It uses a local language model to interpret your requests and perform operations like merging, splitting, filtering, and transforming CSV data.

Features

  • Natural Language Interface: Describe what you want to do in plain English
  • Flexible CSV Operations: Merge, split, filter, count, transform CSV files
  • Local LLM Integration: Uses llama-cpp-python with .gguf model files
  • Automatic File Discovery: Automatically finds CSV files in the input directory
  • Rich Output: Beautiful terminal output with status information

Installation

  1. Clone this repository
  2. Install dependencies using uv:
    uv sync

Usage

Interactive Mode

Start the interactive CLI:

uv run python -m plumber

Then describe what you want to do:

  • "merge all CSV files"
  • "split data.csv into 3 parts"
  • "count unique values in the name column"
  • "filter rows where age > 25"

Other Commands

  • Show status: uv run plumber status
  • List CSV files: uv run plumber list-files
  • Model help: uv run plumber model-help

Setting Up Models

For full natural language processing, download a compatible .gguf model:

  1. Install huggingface-hub: pip install huggingface-hub
  2. Download a model:
    huggingface-cli download TheBloke/Llama-2-7B-Chat-GGUF llama-2-7b-chat.Q4_K_M.gguf --local-dir models/
  3. Update the model name in the configuration if needed

Directory Structure

plumber/
├── input_csvs/     # Place your input CSV files here
├── output_csvs/    # Generated output files appear here
├── models/         # Place .gguf model files here
├── plumber/        # Main application code
└── tests/          # Test files

Development

Running Tests

uv run pytest

Linting and Formatting

./lint.sh

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors