Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat : create a new plugin command #4

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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