Skip to main content

Module commands

Module commands 

Source
Expand description

Plugin commands - ported from ~/claudecode/openclaudecode/src/utils/plugins/loadPluginCommands.ts

This module provides the plugin command registry and execution functionality.

Structs§

CommandContext
Command execution context
CommandFrontmatter
Frontmatter data parsed from command markdown files
CommandRegistry
Global command registry
CommandResult
Result of command execution
ExecutablePluginCommand
Plugin command with handler
PluginCommand
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§

CommandHandler
Command handler function type