Skip to content

rbharvs/llm-tools-readonly-fs

Repository files navigation

llm-tools-readonly-fs

Python 3.9+ MIT License

Grants LLM the ability to glob, grep, and view files within a directory.

Installation

Install this plugin in the same environment as LLM.

llm install llm-tools-readonly-fs

Usage

To use this with the LLM command-line tool:

llm --tool ReadonlyFsTools "What test cases are missing?" --tools-debug

With the LLM Python API:

import llm
from llm_tools_readonly_fs import ReadonlyFsTools

model = llm.get_model("gpt-4.1-mini")

result = model.chain(
    "What are the main classes this repository defines?",
    tools=[ReadonlyFsTools()],
).text()

Development

To set up this plugin locally, first checkout the code. Then install the dependencies and development dependencies:

cd llm-tools-readonly-fs
uv sync --dev

To add the plugin to your local LLM installation, in editable mode, run:

llm install -e .

To run the tests:

uv run pytest -v

To run linting and formatting:

uv run ruff check --fix
uv run ruff format

License

MIT License - see LICENSE for details.

Links

About

Grants LLM the ability to list, view, and search across files within a directory

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages