Plugin System
The dg CLI supports plugins that add new commands and capabilities.
Install a Plugin
Section titled “Install a Plugin”dg plugin install <package-name>Plugin installation follows the CLI installation method. Homebrew and system installations use an isolated plugin environment; other installations may add plugins to the CLI environment.
List Installed Plugins
Section titled “List Installed Plugins”dg plugin listUpdate Plugins
Section titled “Update Plugins”dg plugin update <package-name>Remove a Plugin
Section titled “Remove a Plugin”dg plugin remove <package-name>Example Plugins
Section titled “Example Plugins”Search for available plugins:
dg plugin search <keyword>Plugin Development
Section titled “Plugin Development”Plugins are Python packages that expose a BaseCommand class through the deepctl.plugins entry-point group:
from typing import Any
from deepctl_core import AuthManager, BaseCommand, Config, DeepgramClient
class MyCommand(BaseCommand):
name = "mycommand"
help = "My plugin command"
requires_auth = False
def handle(
self,
config: Config,
auth_manager: AuthManager,
client: DeepgramClient,
**kwargs: Any,
) -> None:
print("Hello from my plugin!")Register a Plugin
Section titled “Register a Plugin”Add the command to your package's pyproject.toml:
[project.entry-points."deepctl.plugins"]
mycommand = "my_plugin.command:MyCommand"Security
Section titled “Security”- Plugins run with your user permissions
- Plugins have access to your API key
- Only install plugins from trusted sources
- Review plugin code before installing