{"id":16796976,"url":"https://github.com/johnrom/nimble-wp-cli","last_synced_at":"2026-01-02T19:58:56.035Z","repository":{"id":148551018,"uuid":"113699311","full_name":"johnrom/nimble-wp-cli","owner":"johnrom","description":"A Nimble Docker Template, for WP-CLI","archived":false,"fork":false,"pushed_at":"2017-12-11T16:03:11.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-18T23:59:07.477Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/johnrom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-09T20:32:24.000Z","updated_at":"2017-12-09T20:32:24.000Z","dependencies_parsed_at":"2023-05-20T12:00:16.344Z","dependency_job_id":null,"html_url":"https://github.com/johnrom/nimble-wp-cli","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnrom%2Fnimble-wp-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnrom%2Fnimble-wp-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnrom%2Fnimble-wp-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnrom%2Fnimble-wp-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnrom","download_url":"https://codeload.github.com/johnrom/nimble-wp-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243971156,"owners_count":20376784,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T09:20:44.222Z","updated_at":"2026-01-02T19:58:55.992Z","avatar_url":"https://github.com/johnrom.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nimble WP-CLI\n\n### A Nimble Docker Environment, for WP-CLI\n\nThis project is a proof-of-concept for a complete, distributable dev environment for [WP-CLI](http://wp-cli.org/) development. The purpose is to provide a code-first, dependencies-later approach to development, allowing anyone to download the current WP-CLI version, test it, and begin to develop it, without intimate knowledge of the WP-CLI project's dependencies or the environment in which it lives.\n\n_This is for WP-CLI development, not for developing WordPress websites. Proof-of-concept for that may follow._\n\nIt provides out-of-the-box support for developing WP-CLI in VS Code, as well as debugging within all PHP dependencies such as PHPUnit, Behat, etc, to support the creation of tests.\n\nThis project is built with [nimble](https://github.com/johnrom/nimble), a simple bash script which facilitates creating distributable Docker environments for various technologies, and may support WP websites (like developing client websites), Node and other technologies in the future. The purpose is to allow developers to dive right into the code of various technologies before learning the entire stack.\n\n### What does it need to work?\n\nIn order to use Nimble, you will need access to some common technologies like Git, Docker, and Bash. This list may not be complete, since I may already have other dependencies on my devices not listed here. If so, open an issue!\n\n- Docker for Windows (Windows 10 Professional) or Docker for Mac\n    - If using Windows, but not Windows 10 Professional or higher, try Docker Toolbox, but things may not work correctly :(\n- Git-aware Command Line (Git Bash, Terminal w/ Git installed, or Git installed within Linux or Bash for Ubuntu on Windows)\n- An editor w/ PHP debugging and Path Mapping support (supports VS Code out of the box)\n\n### What does Nimble do?\n\nNimble enables the use of `Nimble Distribution Templates` which are downloaded from GitHub. Running this project will download the following templates:\n\n- an [nginx-proxy](https://github.com/johnrom/nimble-nginx-proxy-template) that supports redirection of urls to Docker containers automagically\n- the [nimble-wp-cli-template](https://github.com/johnrom/nimble-nginx-proxy-template), which runs a list of docker containers such as databases, the WP-CLI command, a WP website, and Composer, PHPMyAdmin, and Xdebug\n\nIt then concatenates these templates' `common.yml` and `$project.yml` files into a single `docker-common.yml` and `docker-compose.yml` file, which are run using `docker-compose`.\n\n### Should I use administrative privileges?\n\nAdmin privileges are needed to fully automate this project by editing your hosts file to point `wp-cli.local` to the docker container. You can skip the admin privileges, but you'll have to edit your `hosts` file by hand.\n\n### Setting up\n\n- Share your drive with `Docker for Mac` or `Docker for Windows`\n- Add `~/bin` to your path. This is used to make the script callable via `nimble`.\n- Install a PHP Xdebug debugger for your editor of choice.\n- Clone this Repo to your desired location (e.g., `~/nimble-wp-cli`) **making sure to recurse submodules!**\n- Open your Git-Aware command line (Admin privileges, if desired) at the root of this repo (e.g., `~/nimble-wp-cli`)\n- Run `./_nimble/nimble.sh localize`. This will enable you to run the `nimble` command.\n- Run `nimble init wp-cli`.\n- Run `nimble up` and play with your new site at `http://wp-cli.local`\n\n### Debugging\n\nOpening your editor to the folder `nimble-wp-cli/sites/wp-cli` will have it ready to debug PHP and set breakpoints. If you use another editor than VS Code, you will have to configure the editor to point the following `server paths -\u003e subdirectories`\n\n- `/var/www/html` -\u003e `www`\n- `/app` -\u003e `cli`\n\nYou should be ready to hit breakpoints!\n\nTo debug database or performance, it also supports PHPMyAdmin and Webgrind at the following URLs:\n\n- `phpmyadmin.wp-cli.local`\n- `webgrind.wp-cli.local` (may need to run `nimble down \u0026\u0026 nimble up profile` in order to get profiling started)\n\n### Running and Testing WP CLI\n\nAfter running setting up, there are two ways to run WP CLI in the container:\n\n- `nimble wp wp-cli $commands` will run WP CLI from outside the container. For example, `nimble wp wp-cli core install [...]` will install the WP site at `http://wp-cli.local`\n- `nimble attach wp-cli` will enter a bash instance within the container, where you can enter commands regularly, like `wp core install [...]`\n\nThe project supports both Behat and PHPUnit testing via `nimble test wp-cli behat` and `nimble test wp-cli phpunit` respectively.\n\n### Can I use this template within other Nimble Environments?\n\nOf course! Just run `nimble create wp-cli --template johnrom/nimble-wp-cli-template` and follow the instructions for enabling debugging within the `sites/wp-cli` folder for the site `http://wp-cli.local`.\n\n### Afterthoughts\n\nSome of the Docker technologies used by this project have been deprecated after a year or so. `docker-compose` templates may need to be updated to stop using the `extends` keyword, or we should get together and ask to reimplement `extends` in v3!\n\nThis also doesn't use the latest version of WordPress right now, as I haven't had time to update the WP image on Docker Hub (I believe the entrypoint method has changed), so you should update WordPress after downloading (maybe via WP-CLI!).\n\nInstalling for the first time may take a while, because of downloading all the docker images. I'd go get some coffee.\n\nCreating a new WP CLI will always take a while because there is no cache for Composer shared between containers. More Coffee!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnrom%2Fnimble-wp-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnrom%2Fnimble-wp-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnrom%2Fnimble-wp-cli/lists"}