Skip to main content
Deepgram's Docs

Search documentation

Type to search this documentation.

On this pageOverview

Plugin System

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

Shell
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.

Shell
dg plugin list
Shell
dg plugin update <package-name>
Shell
dg plugin remove <package-name>

Search for available plugins:

Shell
dg plugin search <keyword>

Plugins are Python packages that expose a BaseCommand class through the deepctl.plugins entry-point group:

Python
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!")

Add the command to your package's pyproject.toml:

TOML
[project.entry-points."deepctl.plugins"]
mycommand = "my_plugin.command:MyCommand"
  • Plugins run with your user permissions
  • Plugins have access to your API key
  • Only install plugins from trusted sources
  • Review plugin code before installing
Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu