Plugin System

Extend the Deepgram CLI with community-built plugins.

The dg CLI supports plugins that add new commands and capabilities.

Install a Plugin

$dg plugin install <package-name>

Plugins are installed in an isolated virtual environment.

List Installed Plugins

$dg plugin list

Update Plugins

$dg plugin update
$dg plugin update <package-name>

Uninstall a Plugin

$dg plugin uninstall <package-name>

Example Plugins

Search for available plugins:

$dg plugin search <keyword>

Plugin Development

Plugins are Python packages that expose CLI commands:

1# my-dg-plugin/my_plugin/__init__.py
2from deepgram_cli.plugins import hookimpl
3import click
4
5@hookimpl
6def register_commands(cli_group):
7 @cli_group.command()
8 def mycommand():
9 """My custom command"""
10 click.echo("Hello from my plugin!")

Plugin Configuration

Plugins can read from your Deepgram config:

1from deepgram_cli.config import get_config
2
3config = get_config()
4api_key = config.get("api_key")

Trusted Plugins

Mark a plugin as trusted (skips confirmation prompts):

$dg plugin trust <package-name>

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