Skip to main content

Overview

WezTerm’s plugin system allows you to extend functionality by loading Lua modules from external sources. Plugins can provide color schemes, custom key bindings, status bar widgets, and more.

Installing Plugins

Plugins are loaded using wezterm.plugin.require():

Plugin Sources

Plugins can be loaded from:
  • GitHub repositories: https://github.com/username/repo
  • Git URLs: https://gitlab.com/username/repo.git
  • Local paths: file:///home/user/my-plugin

Example: Loading from GitHub

Plugin Cache

Plugins are cached locally to avoid repeated downloads:
  • Linux/macOS: ~/.cache/wezterm/plugins/
  • Windows: %LOCALAPPDATA%\wezterm\plugins\

Clearing Plugin Cache

Creating Plugins

A basic plugin structure:

plugin/init.lua

Using the Plugin

Example Plugins

Status Bar Plugin

Color Scheme Plugin

Plugin Best Practices

Version Your Plugins: Use Git tags to version your plugins for stability.
Document Configuration: Provide clear documentation for plugin configuration options.
Plugins execute arbitrary Lua code. Only install plugins from trusted sources.

Plugin Documentation Template

Configuration

Options

  • option1 - Description
  • option2 - Description

Debugging Plugins

Enable debug logging:
Check the WezTerm log for plugin errors:

Advanced Plugin Features

Event Handlers

Custom Key Bindings

See Also