WordPress plugin that replaces the default dashboard with an RPG-style admin overworld (map, avatar, districts) and an optional Posts Tavern view on the posts list screen.
| Path | Role |
|---|---|
wp-admin-rpg.php |
Bootstrap, menus, enqueues, overworld + posts tavern markup |
assets/admin-rpg.css |
Overworld UI, zones, avatar |
assets/admin-rpg.js |
Avatar movement, zones, arrival transitions |
assets/posts-map.css |
Posts tavern layout + fullscreen chrome hiding |
scripts/zip-plugin.mjs |
Builds wp-admin-rpg.zip for distribution |
- UI: Floating “Dolly” button on the overworld and Posts tavern maps opens a chat panel; messages go to
POST /wp-json/wp-admin-rpg/v1/dolly-chat(cookie +X-WP-Nonce). Permission defaults toread(same as the RPG admin menu); tighten withwp_admin_rpg_dolly_chat_capability. Jetpack’sjetpack/v4/jetpack-ai-jwtroute still requiresedit_posts+ a user-connected site to attachAuthorizationautomatically. - Backend: By default the plugin **
wp_remote_post**s tohttps://public-api.wordpress.com/wpcom/v2/ai/agent/dolly(override withWP_ADMIN_RPG_DOLLY_CHAT_URLorwp_admin_rpg_dolly_chat_url; return an empty string from that filter for demo-only sheep replies). For URLs under/wpcom/v2/ai/agent/, the body is agenttic-stylemessage/sendJSON-RPC; other URLs get{ "message": "..." }. If Jetpack is connected, the plugin tries to attach the Jetpack AI JWT fromPOST /jetpack/v4/jetpack-ai-jwt(Authorization); override or add headers withwp_admin_rpg_dolly_chat_request_args. Responses: JSON-RPCresult.status.messagetext parts, orreply/message. Filterswp_admin_rpg_dolly_agent_api_baseandwp_admin_rpg_dolly_agent_idbuild the default URL. - Hooks:
wp_admin_rpg_dolly_dispatchcan short-circuit the whole handler (return['reply' => '…']or aWP_REST_Response).wp_admin_rpg_dolly_chat_request_argsreceives a fourth argument: the resolved chat URL.
This repo includes WordPress wp-env so you can run WordPress in Docker with the plugin mounted from the project directory.
- Node.js (LTS recommended)
- Docker Desktop (or another Docker engine
wp-envcan use)
cd /path/to/wp-admin-rpg
npm installnpm run wp-env
# or: npm run env:startFirst start can take a few minutes while images download and WordPress is installed.
/.wp-env.json sets port 8890 (tests 8891) and JETPACK_DEV_DEBUG: false for Jurassic Tube / Jetpack.
Why wp-env prints https://…jurassic.tube:8890: @wordpress/env merges your configured port into WP_HOME / WP_SITEURL (see appendPortToWPConfigs in the package). That is correct for http://localhost:8888-style URLs and wrong for Jurassic Tube: the public site is https://SUBDOMAIN.jurassic.tube (HTTPS on 443, no :8890). The tunnel forwards 443 → localhost:8890.
This repo runs scripts/wp-env-after-start-jurassic.sh on lifecycleScripts.afterStart: it removes wp-env’s WP_HOME / WP_SITEURL constants (with the bad :8890) and sets home / siteurl to your public URL. That URL is not hardcoded: you must supply it.
JT_PUBLIC_URL=https://YOUR-SUBDOMAIN.jurassic.tube wp-env startJT_PUBLIC_URL is also accepted as the first argument if you run the script by hand. If it is missing, wp-env start fails at afterStart with a short message from the script.
Localhost-only: run JT_PUBLIC_URL=http://localhost:8890 wp-env start (or any URL you want in the DB), or remove lifecycleScripts.afterStart from .wp-env.json.
For Jurassic Tube + Jetpack, follow the same idea as big-sky-plugin README.md (Manual Setup): install the Jurassic Tube CLI, point the tunnel at localhost:8890, then browse https://YOUR-SUBDOMAIN.jurassic.tube (HTTPS on 443, no :8890) for wp-admin and Jetpack connect.
Tunnel: from the project root (npm run jt exports JT_PUBLIC_URL as https://${JT_DOMAIN}.jurassic.tube when JT_PUBLIC_URL is not already set):
JT_DOMAIN=YOUR-SUBDOMAIN WPCOM_USERNAME=yourwpcomusername WP_ENV_PORT=8890 npm run jtYou can set JT_PUBLIC_URL explicitly instead if your public URL is not https://$JT_DOMAIN.jurassic.tube.
(npm run jt = wp-env start + wp-env update + jurassictube … -h localhost:8890.) Or only the tunnel if wp-env is already up:
jurassictube -u yourwpcomusername -s YOUR-SUBDOMAIN -h localhost:8890Ignore the “started at …:8890” line in wp-env’s banner for the Jurassic hostname case; use https://YOUR-SUBDOMAIN.jurassic.tube/wp-admin/ only. Jetpack connect should be done on the .jurassic.tube URL, not through a proxy, per Big Sky’s README.
To tear the tunnel down later: jurassictube -b -s YOUR-SUBDOMAIN (see Big Sky README).
Default admin credentials are the usual wp-env defaults (see wp-env docs; typically admin / password unless you overrode them).
- With Jurassic Tube running as above, open
https://YOUR-SUBDOMAIN.jurassic.tube/wp-admin/and log in. - Activate WP Admin RPG under Plugins (the plugin is symlinked/mounted from this repo).
- Overworld: visiting Dashboard redirects to Admin Adventure unless you add
?skip_admin_rpg=1to the dashboard URL. - Posts tavern: go to Posts → All Posts. The tavern UI replaces the list unless you use
?classic_posts=1onedit.phpfor the standard list table. - Live asset edits: changes to files under
assets/are picked up from disk; hard-refresh the browser if a CSS/JS update does not appear (caching).
npm run env:stop # stop containers
npm run env:destroy # remove volumes (fresh DB next start)If Docker reports port already in use, change port / testsPort in .wp-env.json, then run env:destroy and wp-env start again.
npm run zipCreates wp-admin-rpg.zip in the project root with the plugin files listed in scripts/zip-plugin.mjs.
- Copy this folder into
wp-content/plugins/wp-admin-rpg/(or install the zip fromnpm run zip). - Activate WP Admin RPG on the Plugins screen.
- Visit
/wp-admin/— the dashboard redirects to the RPG overworld (unless?skip_admin_rpg=1).
- Top-level admin page Admin Adventure (overworld map).
- Dashboard redirect to that page (skippable via
?skip_admin_rpg=1). - Map districts link to core admin screens (Posts, Pages, Media, etc.).
- Posts list can use the tavern experience;
?classic_posts=1restores the default posts list.
- Surface live counts (drafts, comments, updates) on the map or quest copy.
- Quest markers / NPC copy tied to real admin tasks.
- Settings to enable the RPG shell per role or per user.