Skip to main content

Run commands in a Docker container via an LLM tool

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llm_tools_docker-0.1a0.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llm_tools_docker-0.1a0-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file llm_tools_docker-0.1a0.tar.gz.

File metadata

  • Download URL: llm_tools_docker-0.1a0.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for llm_tools_docker-0.1a0.tar.gz
Algorithm Hash digest
SHA256 f6daafd2a37ab04a2903b0cf4f564fbb816f87ce9a5bf2f688979e6ed7cb3752
MD5 9cd97a3bb1b84403d75f03bc64da3c09
BLAKE2b-256 76343e8e7ecf38dd50a40497bf0de2a6bf804782f30fb9c1143409ec640cb105

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_tools_docker-0.1a0.tar.gz:

Publisher: publish.yml on simonw/llm-tools-docker

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file llm_tools_docker-0.1a0-py3-none-any.whl.

File metadata

File hashes

Hashes for llm_tools_docker-0.1a0-py3-none-any.whl
Algorithm Hash digest
SHA256 ab949766d183f2db516f073f52e90ed59dcb3c6b6c2848da881cc351369e01ef
MD5 f78549405e0727406da95f37ff76a94f
BLAKE2b-256 6a3573f2e8d0ef380722d2fdd2b323edd9df70556bd15bc8a36eb7195e4375a3

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_tools_docker-0.1a0-py3-none-any.whl:

Publisher: publish.yml on simonw/llm-tools-docker

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page