Developer tools extension for Data Machine. GitHub integration, workspace management, git operations, and code tools for WordPress AI agents.
Data Machine Code extracts developer-oriented tooling from Data Machine core into a standalone extension. Not every WordPress site needs GitHub integration or workspace management — but if you're using Data Machine as a coding agent platform, this plugin gives your agents the tools to work with code repositories directly from WordPress.
- List, view, update, close, and comment on issues
- List pull requests and repositories
- Create issues (async via Action Scheduler)
- GitHub fetch handler for pipeline workflows
- Clone and manage git repositories in a secure workspace directory
- Read, write, and edit files within workspace repos
- List directory contents with file metadata
- Status, log, diff (read-only)
- Pull, add, commit, push (policy-controlled)
- Per-repo write/push policies with path allowlists and branch restrictions
- 10 chat tools for GitHub and workspace operations
- Async GitHub issue creation via system tasks
- All tools register through Data Machine's tool system
# GitHub
wp datamachine-code github issues --repo=owner/repo
wp datamachine-code github view 123 --repo=owner/repo
wp datamachine-code github close 123 --repo=owner/repo
wp datamachine-code github comment 123 "Fixed." --repo=owner/repo
wp datamachine-code github pulls --repo=owner/repo
wp datamachine-code github repos owner
wp datamachine-code github status
# Workspace
wp datamachine-code workspace path
wp datamachine-code workspace list
wp datamachine-code workspace clone https://github.com/org/repo.git
wp datamachine-code workspace show repo-name
wp datamachine-code workspace read repo-name src/main.php
wp datamachine-code workspace ls repo-name src/
wp datamachine-code workspace write repo-name path/to/file.txt @content.txt
wp datamachine-code workspace edit repo-name path/to/file.txt --old="foo" --new="bar"
wp datamachine-code workspace remove repo-name
wp datamachine-code workspace git status repo-name
wp datamachine-code workspace git pull repo-name
wp datamachine-code workspace git add repo-name --paths=src/file.php
wp datamachine-code workspace git commit repo-name --message="fix: something"
wp datamachine-code workspace git push repo-name
wp datamachine-code workspace git log repo-name
wp datamachine-code workspace git diff repo-name- WordPress 6.9+
- PHP 8.2+
- Data Machine plugin (core)
- Install and activate Data Machine core
- Clone this repo to
wp-content/plugins/data-machine-code - Run
composer install - Activate the plugin
Set your GitHub Personal Access Token and default repository in Data Machine settings:
github_pat— GitHub Personal Access Token with repo accessgithub_default_repo— Default repository inowner/repoformat
Workspace git policies are configured via the datamachine_workspace_git_policies option for per-repo write/push controls.
data-machine (core)
├── AI engine, pipelines, jobs, agents
├── Memory system, tools framework
└── Base classes for extensions
│
├── data-machine-socials (social platforms)
├── data-machine-code (developer tools) ← this plugin
└── data-machine-business (transforms)
Data Machine Code extends core base classes (BaseTool, SystemTask, BaseCommand, FetchHandler) and registers its capabilities through standard Data Machine hooks (datamachine_tools, datamachine_tasks, Abilities API).
- Phase 1: Core extraction complete, own settings management
- Phase 2: New dev tools — grep, search, code analysis, enhanced git
- Phase 3: Full PR workflow — autonomous code changes
- Phase 4: Multi-repo orchestration, webhooks, admin UI
GPL v2 or later