Expand description
Plugin commands - ported from ~/claudecode/openclaudecode/src/utils/plugins/loadPluginCommands.ts
This module provides the plugin command registry and execution functionality.
Structs§
- Command
Context - Command execution context
- Command
Frontmatter - Frontmatter data parsed from command markdown files
- Command
Registry - Global command registry
- Command
Result - Result of command execution
- Executable
Plugin Command - Plugin command with handler
- Plugin
Command - A plugin command definition
Functions§
- clear_
commands - Clear all registered commands (useful for testing)
- get_
all_ plugin_ commands - Get all registered plugin commands
- get_
command - Get a command by name (matches TypeScript getCommand)
- get_
skill_ tool_ commands - Get all skill tool commands (matches TypeScript getSkillToolCommands) Returns commands that are marked as skills
- has_
command - Check if a command exists (matches TypeScript hasCommand)
- load_
command_ from_ file - Load a single plugin command from a markdown file
- load_
commands_ from_ directory - Load commands from a directory
- load_
plugin_ commands - Load commands from a plugin
- parse_
allowed_ tools - Parse allowed tools from frontmatter
- parse_
argument_ names - Parse argument names from arguments field
- parse_
effort_ value - Parse effort value from string
- parse_
frontmatter - Parse simple YAML-like frontmatter from markdown content
- register_
command - Register a command directly (convenience function)
- register_
plugin_ commands - Register all commands from a plugin
- substitute_
arguments - Substitute arguments in command content
Type Aliases§
- Command
Handler - Command handler function type