Skip to main content

Usage

dokrypt plugin <subcommand> [flags]

Subcommands

SubcommandDescription
installInstall a plugin
uninstallRemove a plugin
listList installed plugins
searchSearch for plugins
updateUpdate a plugin
createScaffold a new plugin
publishPublish to registry

install

Install a plugin from the registry or a local directory.
dokrypt plugin install <name> [flags]

Flags

FlagTypeDefaultDescription
--versionstringlatestPlugin version
--globalboolfalseInstall globally (~/.dokrypt/plugins/)
By default, plugins install locally to ./plugins/ in the project directory. Use --global to install to ~/.dokrypt/plugins/ for use across all projects.

Examples

dokrypt plugin install gas-reporter
dokrypt plugin install gas-reporter --version 1.0.0 --global

uninstall

Remove an installed plugin.
dokrypt plugin uninstall <name>

list

List all installed plugins with details.
dokrypt plugin list

Example Output

Name            Version   Type        Description                 Scope
gas-reporter    1.0.0     container   Gas usage reporting tool    global
my-plugin       0.1.0     binary      Custom plugin              local

Search for plugins in the registry and locally.
dokrypt plugin search <query>
Searches both the remote registry and locally installed plugins by name, description, and author.

Example Output

Name            Version   Source     Description
gas-reporter    1.0.0     registry  Gas usage reporting tool
test-helper     0.5.0     local     Test helper utilities

update

Update a plugin to a new version.
dokrypt plugin update <name> [flags]

Flags

FlagTypeDefaultDescription
--versionstringlatestTarget version
Preserves the plugin’s install scope (local or global).

Examples

dokrypt plugin update gas-reporter
dokrypt plugin update gas-reporter --version 2.0.0

create

Scaffold a new plugin directory with boilerplate.
dokrypt plugin create <name>

Created Files

FileDescription
plugin.yamlPlugin manifest
DockerfileContainer image definition (Alpine 3.19)
README.mdUsage documentation

plugin.yaml format

name: my-plugin
version: "0.1.0"
description: "My custom plugin"
author: your-name
license: MIT
type: container    # "container" or "binary"
container:
  image: my-plugin:latest
  ports: {}
  environment: {}
  depends_on: []
commands:
  - name: my-command
    description: "Does something useful"
hooks:
  on_up: true
  on_down: false

Plugin Types

TypeDescription
containerRuns as a Docker container alongside your services
binaryRuns as a native binary on the host

Plugin Hooks

Plugins can subscribe to lifecycle hooks:
HookTriggered When
on_initDokrypt initializes
on_upEnvironment starts (dokrypt up)
on_downEnvironment stops (dokrypt down)
on_transactionA transaction is executed
on_block_minedA new block is mined
on_contract_deployedA contract is deployed
on_test_endTest suite completes

Examples

dokrypt plugin create gas-reporter

publish

Publish a plugin to the registry.
dokrypt plugin publish
Requires a valid plugin.yaml in the current directory with: name, version, description, type (must be container or binary). Requires DOKRYPT_REGISTRY_TOKEN environment variable.

Examples

cd my-plugin
DOKRYPT_REGISTRY_TOKEN=your-token dokrypt plugin publish