DDEV CiviCRM CLI Tools
If you’re a developer working with CiviCRM on platforms like Drupal or Backdrop, I’ve got exciting news! 🎉 Introducing the DDEV CiviCRM CLI Tools Add-on, a powerful solution to integrate essential CLI tools like civistrings, civix, coworker, and cv directly into your DDEV-managed projects. This tool is designed to streamline your development workflow, whether you're building or maintaining CiviCRM-based project
🐳 What Is DDEV?
DDEV is an open-source tool that simplifies local development environments by using Docker containers. It is widely used by developers working with content management systems like Drupal, WordPress, and Backdrop. By providing a consistent, containerized environment, DDEV eliminates setup challenges, making it easier to build, test, and deploy web projects efficiently.
Learn more about DDEV here :- https://ddev.com/about
🔍 What Is the DDEV CiviCRM CLI Tools Add-on?
The DDEV CiviCRM CLI Tools Add-on simplifies command execution for CiviCRM projects by allowing developers to run key tools seamlessly within a Docker-based DDEV environment. It bridges the gap between local development and the robust toolset offered by CiviCRM CLI utilities.
🎯 Key Features
- Streamlined Command Execution: Run CiviCRM CLI tools directly through DDEV commands.
- Multi-CMS Compatibility: Fully compatible with Drupal (9, 10, 11), Backdrop, and CiviCRM installations.
- Error Handling: Delivers actionable error messages for missing dependencies or setup issues.
- Reliable and Tested: Includes automated tests to ensure functionality and stability.
- Multi-Context Support: Operates seamlessly in both local and production-like environments.
🚀 Getting Started
Prerequisites
- DDEV: v1.19 or higher.
- PHP: v7.4 or higher.
- Composer: Installed in your environment.
- CiviCRM: Integrated with a supported CMS (Drupal or Backdrop).
Installation Steps
1. Download the Add-on:
ddev get vinugawade/ddev-civicrm-cli-tools
2. Restart Your DDEV Project (optional):
ddev restart
3. Install Required Dependencies:
ddev composer require civicrm/cli-tools
4. Verify Installation:
ddev cv --version
🛠 Commands at a Glance
Here’s a quick overview of the primary commands available with the add-on:
1. ddev civistrings
Generate and manage CiviCRM language strings.
Alias: cvstr
Examples :
ddev civistrings -o myfile.pot myfolder
ddev civistrings --version
2. ddev civix
Scaffold and maintain CiviCRM extensions.
Alias: cvx
Examples :
ddev civix build:zip
ddev civix upgrade
3. ddev coworker
Manage CiviCRM’s queue worker.
Alias: cowkr
Examples :
ddev coworker list
ddev coworker debug
4. ddev cv
Execute CiviCRM’s command-line utility.
Alias: cv
Examples :
ddev cv flush
ddev cv upgrade:db
🙌 Acknowledgments
A huge thank you to the CiviCRM and DDEV communities for their support and tools that inspired this project! Together, we can continue to improve the development experience for everyone.
👤 About the Author
I’m Vinay Gawade, a passionate developer dedicated to creating tools that simplify workflows and enhance productivity for the CiviCRM community. Feel free to connect with me on GitHub or LinkedIn.
Comments
1st CiviCRM Blog
Thanks @Vinay!