Plugins Overview
What are plugins?
Plugins define the patterns and code generation for a target framework. Each plugin is a single TOML file containing:
- Plugin metadata: name, version, target language, file extension
- Type definitions: types like
browser,element,api,http_response - Action patterns: pattern strings with typed slots (e.g.,
"go to <url:quoted>") - Jinja templates: inline templates for code generation
Built-in plugins
Vanya ships with these built-in plugins (embedded at compile time):
| Plugin | Target | Types | Use case |
|---|---|---|---|
playwright-python | Playwright + Python | browser, element, failure_block | Browser automation |
python-requests | Requests + Python | api, http_response, failure_block | HTTP API testing |
Using a plugin
Specify the plugin and type in your root Within block:
Within the Browser (plugin: playwright-python, type: browser) go to "https://example.com"The plugin: modifier selects which plugin to use, and type: selects a type defined within that plugin. The plugin is inherited by nested Within blocks.
Plugin resolution
Currently, vanya loads built-in plugins that are embedded at compile time. Project-level plugin loading via vanya.config.toml is planned:
# vanya.config.toml (future)[project]plugins = [ "./plugins/custom-plugin.toml",]Custom plugins can be created by copying and modifying the built-in plugin TOML files from the plugins/ directory in the vanya repository.