wp-content.io CLI¶
Manage your wp-content.io account from CLI.
Installation¶
Download wpc.phar using wget or curl. For example:
curl -O https://downloads.wp-content.io/wpc-cli/latest/wpc.phar
To be able to type just wpc, instead of php wpc.phar, you need to make the file executable and move it to somewhere in your PATH. For example:
chmod +x wpc.phar
sudo mv wpc.phar /usr/local/bin/wpc
Note
The CLI needs at least PHP 8.2 and zip extension installed to works.
Usage¶
Check version
wpc --version
Get available commands
wpc
API Key¶
Most actions require a valid API key. You can provide an API Key by using the global option or by defining an environment variable. How to manage API Keys.
Global options¶
Option | Default value | Description |
---|---|---|
--repository=URL |
https://registry.wp-content.io | Provide custom repository API url |
--api-key=KEY |
API Key to use | |
--output=FORMAT |
human |
Response format. Could be json or human |
Environment variables¶
You can provide environment variables to override some global options.
export WPC_REPO_URL=https://registry.wp-content.io
export WPC_API_KEY=00000000-0000-0000-0000-000000000000