Public | Automated Build

Last pushed: 2 years ago
Short Description
A WP-CLI based WP-API client.
Full Description

This image uses client-cli to extend WP-CLI to provide a command line WP-API client for WordPress.

client-cli uses OAuth 1.0a and requires interaction to link the client application with WordPress.


You'll need a WordPress installation with the rest-api and OAuth 1.0a Server plugins.

Add a new client application using wp api oauth1 add or Admin > Users > Applications in WordPress.

You will need the key and secret.


Simplest is to run (login to the container) interactively, optionally specify the values as convenient environment variables.

mkdir -p wp-cli
chmod +w wp-cli
docker run -it \
  -e URL= \
  -e KEY=XXXXX \
  -v ./wp-cli:/home/wp-cli \
  nickbreen/wp-api -i -l

Register the client application using the key and secret.

wpapi oauth1 connect $URL --key=$KEY --secret=$SECRET

... and use it!

wpapi post list $URL


If the client doesn't recognise the command, wp-cli issues the error: Error: This does not seem to be a WordPress install.

Docker Pull Command
Source Repository