Publishing Community Plugins
Share your plugins with the AutoDeployBase community.
Getting Started
Create Your Plugin
npx autodeploybase plugin create my-awesome-plugin
Develop and Test
# Test with a local project
npx autodeploybase init test-project --plugins ./plugins/my-awesome-plugin
# Verify generation
cd test-project
npm run typecheck
npm run test
Plugin Requirements
manifest.json
Required fields:
{
"name": "my-awesome-plugin",
"version": "1.0.0",
"description": "A clear description of what this plugin does",
"author": "Your Name <email@example.com>",
"license": "MIT",
"repository": "https://github.com/username/my-awesome-plugin",
"category": "feature",
"tier": "public",
"frameworks": ["next", "nuxt", "sveltekit"],
"keywords": ["feature", "utility"],
"engines": {
"autodeploybase": ">=1.0.0"
}
}
README.md
Include:
- Description
- Installation instructions
- Configuration options
- Usage examples
- API reference
- Changelog
License
Include a LICENSE file. MIT is recommended for open-source plugins.
Publishing Options
npm
Publish to npm for easy installation:
cd plugins/my-awesome-plugin
# Login to npm
npm login
# Publish
npm publish --access public
Users install with:
npx autodeploybase add @username/my-awesome-plugin
AutoDeployBase Registry
Submit to the official registry:
npx autodeploybase plugin publish
This requires:
- Account on autodeploybase.dev
- Plugin validation passes
- Review approval
GitHub
Users can install directly from GitHub:
npx autodeploybase add github:username/my-awesome-plugin
Validation
Run validation before publishing:
npx autodeploybase plugin validate ./plugins/my-awesome-plugin
Checks:
- Valid manifest.json
- Required files exist
- No security issues
- Proper exports
- Template syntax
Best Practices
1. Clear Naming
# Good
my-plugin-name # Lowercase, kebab-case
autodeploybase-charts # Clear purpose
# Avoid
MyPlugin # PascalCase
my_plugin # Underscores
plugin123 # Non-descriptive
2. Semantic Versioning
1.0.0 # Initial release
1.0.1 # Bug fix
1.1.0 # New feature (backward compatible)
2.0.0 # Breaking change
3. Framework Support
Support multiple frameworks when possible:
export default async function generate(context) {
const { framework } = context;
// Framework-specific templates
await sdk.copyTemplates({
source: `./templates/${framework}`,
destination: context.projectPath
});
// Shared logic
await sdk.copyTemplates({
source: './templates/shared',
destination: context.projectPath
});
}
4. Configuration
Make settings configurable:
{
"settings": {
"schema": {
"feature": {
"type": "boolean",
"label": "Enable Feature",
"default": true
}
}
}
}
5. Documentation
Document everything:
## Configuration
| Option | Type | Default | Description |
| --------- | ------- | ------- | ----------------- |
| `enabled` | boolean | true | Enable the plugin |
| `apiKey` | string | - | Your API key |
6. Error Handling
Provide helpful error messages:
if (!settings.apiKey) {
throw new Error(
'API key is required. Set it in autodeploy.config.json:\n' +
'{\n' +
' "plugins": {\n' +
' "my-plugin": {\n' +
' "settings": { "apiKey": "your-key" }\n' +
' }\n' +
' }\n' +
'}'
);
}
Marketing Your Plugin
Write a Good Description
# My Awesome Plugin
Add [specific feature] to your AutoDeployBase project.
## Features
- Feature 1
- Feature 2
- Feature 3
## Quick Start
\`\`\`bash
npx autodeploybase add my-awesome-plugin
\`\`\`
Add Screenshots
Include screenshots in your README showing:
- Admin UI
- Generated pages
- Configuration
Announce
- Post on GitHub Discussions
- Tweet with #AutoDeployBase
- Write a blog post
Maintenance
Respond to Issues
Monitor GitHub issues and respond promptly.
Keep Updated
Update for new AutoDeployBase versions:
# Check compatibility
npx autodeploybase plugin validate --version 2.0.0
Changelog
Maintain a CHANGELOG.md:
# Changelog
## [1.1.0] - 2024-01-15
### Added
- New feature X
### Fixed
- Bug in Y
## [1.0.0] - 2024-01-01
- Initial release