Skip to content

Conversation

@mo-salah1998
Copy link

This PR introduces a new plugin command to the Hexabot CLI, enabling users to quickly scaffold a new plugin within the plugins directory. The command streamlines the process of creating the necessary file structure and boilerplate code for a new plugin.

hexabot plugin <pluginName>
  • pluginName : The name of the plugin (must be in kebab-case).
plugins/
└── <pluginName>/
    ├── README.md
    ├── index.plugin.ts
    ├── package.json
    ├── settings.ts
    └── i18n/
        └── en/
            └── title.json

Validation:

Ensures the plugin name is in kebab-case (^[a-z0-9]+(-[a-z0-9]+)*$).
Prevents overwriting an existing plugin by checking if the folder already exists.

Boilerplate Files:

README.md: Basic documentation template.
index.plugin.ts: Entry point for the plugin.
package.json: Pre-filled manifest file with basic metadata.
settings.ts: Placeholder for plugin-specific settings.
i18n/en/title.json: Starter file for plugin localization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant