Metadata-Version: 2.4
Name: llm-fragments-dir
Version: 0.1
Summary: Load files from a local directory as fragments
Author: R. Keelan
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/rkeelan/llm-fragments-dir
Project-URL: Changelog, https://github.com/rkeelan/llm-fragments-dir/releases
Project-URL: Issues, https://github.com/rkeelan/llm-fragments-dir/issues
Project-URL: CI, https://github.com/rkeelan/llm-fragments-dir/actions
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: llm
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Dynamic: license-file

# llm-fragments-github

[![PyPI](https://img.shields.io/pypi/v/llm-fragments-dir.svg)](https://pypi.org/project/llm-fragments-dir/)
[![Changelog](https://img.shields.io/github/v/release/rkeelan/llm-fragments-dir?include_prereleases&label=changelog)](https://github.com/rkeelan/llm-fragments-dir/releases)
[![Tests](https://github.com/rkeelan/llm-fragments-dir/actions/workflows/test.yml/badge.svg)](https://github.com/rkeelan/llm-fragments-dir/actions/workflows/test.yml)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/rkeelan/llm-fragments-dir/blob/main/LICENSE)

Load GitHub repository contents as fragments

## Installation

Install this plugin in the same environment as [LLM](https://llm.datasette.io/).
```bash
llm install llm-fragments-dir
```
## Usage

Use `-f dir:path/to/directory` to recursively include every text file from the specified directory as a fragment. For example:
```bash
llm -f dir:/home/user/src/repo "Suggest new features for this tool"
```

## Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:
```bash
cd llm-fragments-dir
python -m venv venv
source venv/bin/activate
```
Now install the dependencies and test dependencies:
```bash
llm install -e '.[test]'
```
To run the tests:
```bash
pytest .
```
