Command-line tool for managing and inspecting TalkPipe plugins.
The talkpipe_plugins command provides utilities to list, reload, and debug TalkPipe plugins that are installed via Python entry points.
The plugin manager is included with TalkPipe:
pip install talkpipeDisplay all discovered plugins and their status:
talkpipe_plugins --listExample output:
=== TalkPipe Plugins ===
Loaded plugins (2):
✓ my-data-plugin
✓ custom-llm-plugin
Failed plugins (1):
✗ broken-plugin
Reload a specific plugin by name (useful during development):
talkpipe_plugins --reload my-data-pluginShow detailed information:
talkpipe_plugins --list --verboseThe plugin manager discovers plugins through Python entry points in the talkpipe.plugins group. Plugins are automatically loaded when TalkPipe is imported.
Plugins should define entry points in their setup.py or pyproject.toml:
setup.py:
setup(
name="my-talkpipe-plugin",
entry_points={
"talkpipe.plugins": [
"my_plugin = my_plugin.plugin",
]
}
)
pyproject.toml:
[project.entry-points."talkpipe.plugins"]
my_plugin = "my_plugin.plugin"The entry point should reference the module that contains your plugin code. Component registration happens automatically through decorators when the module is imported.
When TalkPipe discovers a plugin, it performs the following steps:
- Load the entry point: The plugin loader loads whatever the entry point references (typically a module or function)
- Automatic registration: During import, any sources and segments defined or imported by the module are automatically registered with TalkPipe's registry system through decorators like
@registry.register_segment() - Optional initialization: If the loaded object has an
initialize_pluginfunction attribute, it will be called for additional setup
The key insight is that simply importing the plugin module triggers component registration. This happens through TalkPipe's decorator-based registry system.
Important: The entry point should reference either:
- A module (e.g.,
my_plugin.plugin) that can have a module-levelinitialize_plugin()function - A function directly (e.g.,
my_plugin.plugin:setup_plugin)
Entry points pointing to classes will have the initialize_plugin called on the class itself (not an instance), so it would need to be a static method or classmethod if using a class.
Recommended: Module-level pattern
# my_plugin/plugin.py
from talkpipe.chatterlang import registry
from talkpipe.pipe.core import AbstractSource, AbstractSegment
@registry.register_source("httpGet")
class HttpGetSource(AbstractSource):
"""HTTP GET request source - registered automatically on import."""
pass
@registry.register_segment("jsonParse")
class JsonParseSegment(AbstractSegment):
"""JSON parsing segment - registered automatically on import."""
pass
def initialize_plugin():
"""Optional: Called after module import for additional setup."""
print("Network plugin initialized!")
# Additional setup if neededEntry point configuration (points to the module):
[project.entry-points."talkpipe.plugins"]
network_plugin = "my_plugin.plugin"When this module is loaded:
- The
@registry.register_source("httpGet")decorator runs, registering theHttpGetSource - The
@registry.register_segment("jsonParse")decorator runs, registering theJsonParseSegment - The module-level
initialize_plugin()function is called for any additional setup
You can also register components at the module level:
# my_plugin/__init__.py
from talkpipe.chatterlang import registry
from talkpipe.pipe.core import AbstractSource, AbstractSegment
# In a real plugin: from .sources import MySource; from .segments import MySegment
class MySource(AbstractSource):
def generate(self):
yield "example"
class MySegment(AbstractSegment):
def transform(self, items):
for item in items:
yield item
# Registration happens on import
registry.input_registry.register(MySource, "mySource")
registry.segment_registry.register(MySegment, "mySegment")
def initialize_plugin():
"""Optional additional setup."""
print("Plugin loaded!")Plugins that were successfully imported and initialized. These plugins are available for use in TalkPipe pipelines.
Plugins that encountered errors during loading. Common causes:
- Missing dependencies
- Import errors
- Registration failures
Check the plugin's documentation and requirements if loading fails.
During plugin development, you can reload plugins without restarting Python:
# Make changes to your plugin code
# Then reload it
talkpipe_plugins --reload my-plugin
# Verify it loaded successfully
talkpipe_plugins --listPlugins are automatically loaded when you import TalkPipe.
- Verify the plugin package is installed:
pip list | grep plugin-name - Check entry point configuration in plugin's setup files
- Ensure entry point group is
talkpipe.plugins
- Check plugin dependencies are installed
- Review Python import paths
- Verify component registration decorators are working
- Use
--verboseflag for detailed error information
- Use
--reloadto refresh plugin code during development - Check TalkPipe logs for detailed error messages
- Verify plugin follows TalkPipe's component interface requirements
- Extending TalkPipe - Creating custom components and plugins
- Plugin Architecture - Technical details on the plugin system
- ChatterLang Registry - Component registration system
Last Reviewed: 20250831