| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
中文 | English
A powerful CLI tool for creating and managing plugins for the Apache Answer project. This tool provides scaffolding for both Backend Plugins and Standard UI Plugins, along with plugin lifecycle management.
npm install -g create-answer-plugin
# or
pnpm add -g create-answer-pluginNote: The package name is create-answer-plugin, but the command is answer-plugin. You can also use create-answer-plugin as an alias.
# Both commands work:
npx create-answer-plugin <command>
npx answer-plugin <command>Create a new plugin with an interactive wizard:
answer-plugin create [pluginName]
# or
answer-plugin [pluginName]Options:
Example:
answer-plugin create my-pluginList all plugins in the Answer project:
answer-plugin list [path]Options:
Example:
answer-plugin list
answer-plugin list /path/to/answerInstall plugins to the Answer project:
answer-plugin install [plugins...] [--path <path>]Options:
Example:
# Install all not installed plugins
answer-plugin install
# Install specific plugins
answer-plugin install my-plugin another-pluginUninstall plugins from the Answer project:
answer-plugin uninstall [plugins...] [--path <path>]Options:
Example:
# Uninstall all installed plugins
answer-plugin uninstall
# Uninstall specific plugins
answer-plugin uninstall my-plugin another-pluginBackend plugins extend Answer's backend functionality:
Standard UI plugins extend Answer's frontend UI:
answer-plugin create github-connectorThe tool will guide you through:
answer-plugin create my-custom-routeFor Route plugins, you'll also be prompted for the route path.
# List all plugins
answer-plugin list
# Install all plugins
answer-plugin install
# Install specific plugins
answer-plugin install plugin1 plugin2
# Uninstall plugins
answer-plugin uninstall plugin1The tool supports configuration through environment variables:
ui/src/plugins/my-plugin/ ├── my_plugin.go # Main plugin implementation ├── info.yaml # Plugin metadata ├── go.mod # Go module definition ├── i18n/ # Internationalization files │ ├── en_US.yaml │ ├── zh_CN.yaml │ └── translation.go └── README.md # Plugin documentation
ui/src/plugins/my-plugin/ ├── my_plugin.go # Go wrapper ├── info.yaml # Plugin metadata ├── Component.tsx # React component ├── index.ts # Plugin entry point ├── package.json # npm dependencies ├── tsconfig.json # TypeScript config ├── vite.config.ts # Vite config ├── i18n/ # Internationalization files │ ├── en_US.yaml │ ├── zh_CN.yaml │ └── index.ts └── README.md # Plugin documentation
# Clone the repository
git clone https://github.com/answerdev/create-answer-plugin.git
cd create-answer-plugin
# Install dependencies
pnpm install
# Run in development mode
pnpm dev
# Build
pnpm build# Verify a single plugin
pnpm verify <plugin-name>
# Verify all plugins
pnpm verify:all
# Create all plugin types for testing
pnpm create:allPlugin Creation: The tool generates plugin scaffolding based on the selected type, including:
Plugin Installation: When you run install:
Plugin Uninstallation: When you run uninstall:
The tool is built with:
MIT
Contributions are welcome! Please feel free to submit a Pull Request.
| Back | FazBrowse Home | New Git URL |