Skip to content

simonw/llm-tools-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

llm-tools-docker

PyPI Changelog Tests License

Run commands in a Docker container via an LLM tool

Installation

Install this plugin in the same environment as LLM.

llm install llm-tools-docker

Usage

To use this with the LLM command-line tool:

llm chat -T DockerAlpine --tools-debug --chain-limit 0

Then in the chat try:

Install Python 3 and use it to draw a cowsay cow

This plugin currently only works with llm chat since the container is not persisted across multiple calls.

Warning

This is a very early alpha. Every time you start a new chat it will create a new Docker container without closing down the previous one.

It will mount the current directory as a volume in the container, so commands that run in Docker will be able to modify or delete files in that directory.

Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:

cd llm-tools-docker
python -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

llm install -e '.[test]'

To run the tests:

python -m pytest

About

Grant LLM access to a Docker container for running commands

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages