Skip to content

Extensions bundle commands, skills, agents, MCP servers, hooks, policies, and themes into a reusable unit. Extension management is implemented in packages/cli/src/config/extension-manager.ts.

CLI commands ​

bash
m31a extensions install <source>
m31a extensions uninstall <name>
m31a extensions list
m31a extensions update [name]
m31a extensions disable <name>
m31a extensions enable <name>
m31a extensions link <path>
m31a extensions new <name>
m31a extensions validate <path>
m31a extensions config <name>

extension is an alias for extensions. A -e/--extensions CLI flag selects which extensions to load for one invocation; -l/--list-extensions lists them and exits.

In the TUI, /extensions supports list, update, disable, enable, install, link, uninstall, explore, reload, and config.

Installation sources ​

  • Git repositories, cloned and tracked in an extension lockfile.
  • Local directories via link, useful during development.
  • Registry entries when experimental.extensionRegistry is enabled.

security.blockGitExtensions blocks Git-based installation entirely, and security.allowedExtensions restricts sources by regular expression.

Bundled examples ​

The repository includes example extensions under packages/cli/src/commands/extensions/examples/ and bundle/examples/:

ExampleDemonstrates
custom-commandsDefining custom slash commands.
exclude-toolsRestricting the tool set.
hooksEvent hooks.
mcp-serverBundling an MCP server.
policiesPolicy rules.
skillsBundled agent skills.
themes-exampleCustom themes.

Settings ​

json
{
  "extensions": {"disabled": []},
  "experimental": {
    "extensionManagement": true,
    "extensionConfig": true,
    "extensionRegistry": false,
    "extensionReloading": false
  },
  "admin": {"extensions": {}}
}

Enable extensionReloading to load and unload extensions without restarting the CLI. Admin settings can restrict extension installation and use.

Development tips ​

  • Run m31a extensions validate <path> before sharing an extension.
  • Use link during development so changes are picked up without reinstalling.
  • Keep credentials out of extension configuration; prompt for them instead.
  • Review extension hook and MCP definitions as you would review executable code.

Next steps ​

See MCP, Skills, and Hooks for the individual extension points.

Built with VitePress. Powered by NVIDIA NIM.