syntatis / howdy-open-ai
Your next WordPress plugin project with OpenAI
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 0
Forks: 0
Open Issues: 0
Type:wordpress-plugin
Requires
- php: ^8.1
- openai-php/client: ^0.10.1
- syntatis/codex: dev-main
- syntatis/codex-settings-provider: dev-main
Requires (Dev)
This package is auto-updated.
Last update: 2024-11-20 01:01:52 UTC
README
Note
The project is now in beta and ready for testing. We'd love to hear your input, so feel free to report any issues or suggest enhancements.
A WordPress plugin starter kit with OpenAI PHP Client.
Based of 👋 Howdy, which provides a boilerplate structure with pre-configured tools to help you start developing plugins using modern PHP practices like PSR-4 Autoloading with Composer, PHP Code Sniffer (PHPCS), namespaces, and Dependency Injection (DI) Containers—without the hassle of setting everything up from scratch.
Requirements
- PHP 8.1 or higher
- Node.js 18 or higher
- Composer
Usage
To start a new plugin project, simply run:
composer create-project syntatis/howdy-open-ai -s dev
This command will set up the boilerplate files in a directory named howdy-open-ai
. It will ask you a few questions to customize your project, like the plugin slug, name, and the PHP namespaces.
Once you've input all these details, it will scope the plugin dependency libraries to prevent naming conflicts with other plugins which may also be using the same libraries. You can find the scoped dependencies in the dist/autoload
directory.
Tip
Want to create the project in a different folder? Just add the directory name at the end of the command, like this:
composer create-project syntatis/howdy-open-ai -s dev awesome-plugin
This will create the project in the awesome-plugin
directory.
For more details, check out the Composer CLI documentation.
After the project setup is complete, run the following command within your plugin directory to start compiling the assets, like the stylesheets and the JavaScript files. It will also watch for the changes within the files and recompile them automatically.
npm install npm run start
Commands
Commands are available to help you with the development process. You can run these commands from the root of your plugin directory.
References
- WordPress Plugin Handbook for plugin guidelines.
- WordPress Plugin Boilerplate for inspiration.