Skip to content

Add AI agent readiness: course sub-commands, docs, PHP 7.4#31

Open
flintfromthebasement wants to merge 1 commit intogocodebox:trunkfrom
flintfromthebasement:feature/ai-agent-readiness
Open

Add AI agent readiness: course sub-commands, docs, PHP 7.4#31
flintfromthebasement wants to merge 1 commit intogocodebox:trunkfrom
flintfromthebasement:feature/ai-agent-readiness

Conversation

@flintfromthebasement
Copy link
Copy Markdown
Collaborator

Summary

Makes the LifterLMS CLI ready for AI coding agents (Claude Code, Cursor, Codex) to use as a primary interface for managing LifterLMS sites.

  • New commands: wp llms course content <id> (get course structure in one call) and wp llms course enrollments <id> (list enrolled students) — sub-resource endpoints the Restful bridge doesn't auto-discover
  • AI agent guide: docs/ai-agents.md with JSON output patterns, chaining workflows, resource relationships, and CLI vs MCP comparison
  • README rewrite: Installation, quick start, full command reference, output format docs, remote site usage
  • PHP 7.4 minimum: Bumped from 7.3 (EOL since Nov 2021)
  • Changelog: Added v0.0.6 entry

The new commands follow the existing trait pattern (see AddOn/ commands) and dispatch internal REST requests via rest_do_request() — same mechanism the Restful bridge uses.

Context

This pairs with the new LifterLMS MCP server for remote AI access. The CLI covers the local/shell use case (Claude Code, Codex running on the server); the MCP covers the remote use case (Claude Desktop, ChatGPT connecting over HTTP). Both cover the same resources.

Test plan

  • Verify wp llms course content <id> returns sections + lessons in table and JSON formats
  • Verify wp llms course enrollments <id> returns enrolled students with pagination
  • Verify --format=json, --format=count, --fields work on both new commands
  • Verify existing auto-generated commands (wp llms course list, etc.) still work
  • Verify wp llms course --help shows the new subcommands alongside existing ones
  • Verify PHP 7.4 minimum doesn't break anything (no 7.3-only syntax used)

🤖 Generated with Claude Code

- New `wp llms course content <id>` command for course structure
- New `wp llms course enrollments <id>` command for enrollment listing
- AI agent usage guide (docs/ai-agents.md) with patterns for Claude Code, Cursor, Codex
- README rewrite with installation, quick start, command reference, output formats
- Bump minimum PHP to 7.4 (7.3 EOL Nov 2021)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Awaiting Review

Development

Successfully merging this pull request may close these issues.

2 participants