create-acf-block CLI
A command line tool for stubbing out new blocks with Advanced Custom Fields
The create-acf-block
CLI is a composer package.
composer global require joeyfarruggio/create-acf-block
If it’s your first time installing a global Composer package, ensure that the global Composer binaries directory is in your system’s PATH. This will allow you to run the create-acf-block
command globally.
To find out the path to your global composer binaries:
composer global config bin-dir --absolute
The command above will output a path. You need to add this path to your system’s PATH. Below are instructions based on your operating system:
For most folks, your global composer binaries are in ~/.composer/vendor/bin
. If that’s the case for you, add it to your .bashrc
, .bash_profile
, or .zshrc
file:
export PATH=~/.composer/vendor/bin:$PATH
(Disclaimer: I don’t use Windows, so I had GPT write this section)
After installation, you can utilize the CLI tool globally:
create-acf-block
Follow the on-screen prompts to create your ACF block.
The first tme you run the command you will be see a series of config prompts. If you ever need to reset these you can run create-acf-block set-config
.
Join over 130 other devs for free
I've been building with WordPress for almost 10 years. I create tools for developers serve clients as an contract web developer.