Skip to main content

llm-plugin-generator

PyPI Changelog Tests License

LLM plugin to generate plugins for LLM

Installation

Install this plugin in the same environment as LLM:

llm install llm-plugin-generator

Usage

To generate a new LLM plugin, use the generate-plugin command:

llm generate-plugin "Description of your plugin"

Options:

  • PROMPT: Description of your plugin (optional)
  • INPUT_FILES: Path(s) to input README or prompt file(s) (optional, multiple allowed)
  • --output-dir: Directory to save generated plugin files (default: current directory)
  • --type: Type of plugin to generate (default, model, or utility)
  • --model, -m: Model to use for generation

--type

--type model will use a few-shot prompt focused on llm model plugins. --type utility focuses on utilities. leaving off --type will use a default prompt that combines all off them. I suggest picking one of the focused options which should be faster.

Examples:

  1. Basic usage:
llm generate-plugin "Create a plugin that translates text to emoji" --output-dir ./my-new-plugin --type utility --model gpt-4
  1. Using a prompt and input files - Generating plugin from a README.md
llm generate-plugin "Few-shot Prompt Generator. Call it llm-few-shot-generator" \
'files/README.md' --output-dir plugins/Utilities/few-shot-generator \
--type utility -m claude-3.5-sonnet
  1. Using websites or remote files:
llm generate-plugin "Write an llm-cerebras plugin from these docs: $(curl -s https://raw.githubusercontent.com/irthomasthomas/llm-cerebras/refs/heads/main/.artefacts/cerebras-api-notes.txt)" \
--output-dir llm-cerebras  --type model -m sonnet-3.5 

This will generate a new LLM plugin based on the provided description and/or input files. The files will be saved in the specified output directory.

Features

New: Requests are now logged to the llm db.

  • Generates fully functional LLM plugins based on descriptions or input files
  • Supports different plugin types: default, model, and utility
  • Uses few-shot learning with predefined examples for better generation
  • Allows specifying custom output directory
  • Compatible with various LLM models
  • Generates main plugin file, README.md, and pyproject.toml
  • Extracts plugin name from generated pyproject.toml for consistent naming

Development

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

cd llm-plugin-generator
python -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests:

pytest

Contributing

Contributions to llm-plugin-generator are welcome! Please refer to the GitHub repository for more information on how to contribute.

License

This project is licensed under the Apache License 2.0. See the LICENSE file for details.

Metadata

Release files for llm-plugin-generator 0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llm-plugin-generator 0.6
File Size Uploaded Provenance
llm_plugin_generator-0.6.tar.gz 124.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for llm-plugin-generator 0.6
File Interpreter ABI Platform
llm_plugin_generator-0.6-py3-none-any.whl Python 3 none any Details

Total release size: 255.4 kB

Release files / llm_plugin_generator-0.6.tar.gz

Download URL llm_plugin_generator-0.6.tar.gz
Size 124.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c822b33b7872ffa7062bc85d196ac9adade2da4303b7b9a1a27dd7b69ae78ce5
BLAKE2b-256 checksum
How to use checksums
05c3741a1706c42cf6ad84a6f13cf15923c0509e8c8946ac75f6ee799483eb73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.13.1

Release files / llm_plugin_generator-0.6-py3-none-any.whl

Download URL llm_plugin_generator-0.6-py3-none-any.whl
Size 130.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
452c6914c5c87dd8a60b3e17bdb252267214e3d71a42d989be1c8749798e2f94
BLAKE2b-256 checksum
How to use checksums
02faf80e78dd53ab93a76663e3774eb2b606bac568f34e2bd24d0ff914ea036b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.13.1

Security for llm-plugin-generator 0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page