docs/docs/en/ai-dev/index.md
AI plugin development is an AI-assisted plugin development capability provided by NocoBase -- you can describe your requirements in natural language, and AI will automatically generate complete frontend and backend code, including collections, APIs, frontend blocks, permissions, and i18n. It offers a more modern and efficient plugin development experience.
The AI plugin development capability is powered by the nocobase-plugin-development Skill. If you have already initialized via the NocoBase CLI (nb init), this Skill is automatically installed.
If you have already installed the NocoBase CLI, you can skip this step.
Copy the following prompt to your AI assistant (Claude Code, Codex, Cursor, Trae, etc.) to automatically complete the installation and configuration:
Help me install NocoBase CLI and complete initialization: https://docs.nocobase.com/ai/ai-quick-start.md (please read the linked content directly)
npm install -g @nocobase/cli@beta
nb init --ui
Your browser will automatically open the visual configuration page, guiding you through installing NocoBase Skills, configuring the database, and starting the application. For detailed steps, refer to the Quick Start.
:::warning Note
client (v1) to client-v2, and client-v2 is still under development. The client code generated by AI development is based on client-v2 and can only be used under the /v/ path. It is available for early access and experimentation, but is not recommended for production use.:::
After installation, you can directly tell AI in natural language what plugin you want to develop. Here are a few real-world scenarios to give you a feel for the capabilities of AI plugin development.
With a single prompt, AI can help you generate a complete watermark plugin -- including frontend rendering logic, tamper detection, backend settings storage API, and a plugin settings page.
Help me use nocobase-plugin-development skill to develop a NocoBase watermark plugin.
Requirements: overlay a semi-transparent watermark on the page showing the currently logged-in username to prevent data leaks via screenshots.
Periodically check if the watermark DOM has been removed and regenerate it if so.
Support configuring watermark text, opacity, and font size in the plugin settings page.
The plugin name is @my-project/plugin-watermark
Throughout the process, you only need to describe your requirements and make decisions -- AI handles the rest. Want to see the full process? -> Tutorial: Building a Watermark Plugin
Want to display an integer field as star ratings? Tell AI the display effect you want, and it will generate a custom FieldModel to replace the default field rendering component.
Help me use nocobase-plugin-development skill to develop a NocoBase plugin called @my-scope/plugin-rating.
Create a custom field display component (FieldModel) that renders integer type fields as star icons,
supporting 1-5 ratings. Clicking a star should directly modify the rating value and save it to the database.
To learn more about available capabilities, see Supported Capabilities.
| I want to... | AI can help you |
|---|---|
| Create a new plugin | Generate a complete scaffold, including frontend and backend directory structure |
| Define collections | Generate Collection definitions, supporting all field types and relationships |
| Build a custom block | Generate BlockModel + settings panel + register it in the "Add Block" menu |
| Build a custom field | Generate FieldModel + bind it to a field interface |
| Add a custom action button | Generate ActionModel + popup/drawer/confirmation dialog |
| Build a plugin settings page | Generate frontend form + backend API + storage |
| Write a custom API | Generate Resource Action + route registration + ACL configuration |
| Configure permissions | Generate ACL rules to control access by role |
| Support multiple languages | Automatically generate Chinese and English language packs |
| Write a migration script | Generate Migration, supporting DDL and data migration |
Detailed descriptions and sample prompts for each capability -> Supported Capabilities