A Python-based CSV manager and manipulator with natural language interface.
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.
- 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
- Clone this repository
- Install dependencies using uv:
uv sync
Start the interactive CLI:
uv run python -m plumberThen 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"
- Show status:
uv run plumber status - List CSV files:
uv run plumber list-files - Model help:
uv run plumber model-help
For full natural language processing, download a compatible .gguf model:
- Install huggingface-hub:
pip install huggingface-hub - Download a model:
huggingface-cli download TheBloke/Llama-2-7B-Chat-GGUF llama-2-7b-chat.Q4_K_M.gguf --local-dir models/
- Update the model name in the configuration if needed
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
uv run pytest./lint.sh