@ai-stack/payloadcms
v3.0.0-beta.104
Published
<p align="center"> <img alt="Payload AI Plugin" src="assets/payloadcms-ai.gif" width="100%" /> </p>
Downloads
247
Maintainers
Readme
Payload AI Plugin
🌟 Supercharge Your Payload CMS with AI-Powered Content Creation
The Payload AI Plugin is an advanced extension that integrates modern AI capabilities into your Payload CMS, streamlining content creation and management.
⚠️ Important: This plugin is in active development. We're doing our best to improve its features and functionality. Please be prepared for regular updates; at the moment, the plugin has only been tested with Payload version v3.0.0-beta.104.
To give it a try, we recommend using Payload's website template.
🎥 Watch the Magic in Action
✨ Supported Fields and Features
Text and RichText Field
- 📝 Text Generation
- [x] Compose masterpieces effortlessly
- [x] Proofread with precision (Beta)
- [x] Translate across languages
- [ ] Expand your ideas
- [ ] Summarize with clarity
- [ ] Simplify complex concepts
- [x] Rephrase for maximum impact (Beta)
Upload Field
- 🎙️ Voice Generation powered by ElevenLabs, OpenAI
- 🖼️ Image Generation powered by OpenAI
Other Features
- 🎛️ Field-level Prompt Customization
- 🧠 Prompt Editor (Beta)
- 📊 Document Analyzer (Coming Soon)
- ✅ Fact Checking (Coming Soon)
- 🔄 Automated Content Workflows (Coming Soon)
- 🌍 Internationalization Support (Coming Soon)
- 🌍 Editor AI suggestions (Coming Soon)
- 💬 AI Chat Support (Coming Soon)
📚 Table of Contents
📦 Installation
Rock your Payload project with a single command:
pnpm add @ai-stack/payloadcms
🛠 Usage
Config with ease:
// Add below in payload.config.ts
import { buildConfig } from 'payload/config';
import { payloadAiPlugin } from '@ai-stack/payloadcms';
export default buildConfig({
plugins: [
payloadAiPlugin({
collections: {
[Posts.slug]: true,
},
debugging: false,
}),
],
// ... your existing Payload configuration
});
// Add below in Lexical Editor field config
import { PayloadAiPluginLexicalEditorFeature } from '@ai-stack/payloadcms'
fields: [
{
name: 'content',
type: 'richText',
editor: lexicalEditor({
features: ({ rootFeatures }) => {
return [
// ... your existing features
PayloadAiPluginLexicalEditorFeature()
]
},
}),
},
]
⚙️ Configuration
The plugin uses environment variables for configuration. Create a .env file in your project root and add the following variables:
OPENAI_API_KEY=your-openai-api-key
ANTHROPIC_API_KEY=your-anthropic-api-key
ELEVENLABS_API_KEY=your-elevenlabs-api-key
Enabling AI for Custom Components
⚠️ Note: Custom fields don't fully adhere to the Payload schema, making it difficult to determine which components support injecting ComposeField as a Description. If AI enabled fields don't display Compose settings, please manually add the following component path:
@ai-stack/payloadcms/fields#ComposeField
To view AI enabled fields, enable the
debugging
flag in your plugin config or check your server startup logs.
👥 Contributing
Innovators: welcome! We're always excited to expand our community. Connect with us on Discord to get started.
Licensing
This plugin is available under dual licensing:
Open-Source License
This plugin is available under the MIT License. You can use, modify, and distribute it freely under the terms of this license.
Commercial License
For companies or individuals who wish to use the plugin in a commercial context, require additional features, or need support, please refer to the Commercial License Agreement for more details.