cms
WordPress CLI for CI
Use the WordPress CLI for CI with headless JSON commands, schema discovery, credentials, and permission controls.
8 functions 6 read 2 write API key auth
WordPress CLI for CI
Run integration calls from CI jobs with JSON output, explicit credentials, and predictable exit status.
Use this shape when a pipeline needs to read or update an external service. The WordPress CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# WordPress CLI for CI
kosmokrator integrations:configure wordpress --set url="$WORDPRESS_URL" --set username="$WORDPRESS_USERNAME" --set application_password="$WORDPRESS_APPLICATION_PASSWORD" --enable --read allow --write ask --json
kosmo integrations:call wordpress.wordpress_create_post '{"title":"example_title","content":"example_content","status":"example_status","excerpt":"example_excerpt","author":1,"categories":"example_categories","tags":"example_tags","featured_media":1}' --json Discovery Before Execution
Agents and scripts can inspect WordPress docs and schemas before choosing a function.
kosmo integrations:docs wordpress --json
kosmo integrations:docs wordpress.wordpress_create_post --json
kosmo integrations:schema wordpress.wordpress_create_post --json
kosmo integrations:search "WordPress" --json
kosmo integrations:list --json Useful WordPress CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
wordpress.wordpress_create_post | Write | title, content, status, excerpt, author, categories, tags, featured_media, slug | Create a new post on the WordPress site. Requires a title. Content, status, categories, and tags can be specified. Defaults to draft status for safety. |
wordpress.wordpress_get_current_user | Read | none | Get the currently authenticated WordPress user profile. Returns user ID, name, email, roles, and capabilities. |
wordpress.wordpress_get_post | Read | id | Get a single WordPress post by its ID. Returns the full post object including title, content, excerpt, author, categories, tags, and metadata. |
wordpress.wordpress_list_comments | Read | per_page, page, post, search, status, author, order, orderby | List comments from the WordPress site. Supports filtering by post, status, author, and search. Returns comment IDs, content, author info, and dates. |
wordpress.wordpress_list_pages | Read | per_page, page, search, status, author, parent, order, orderby | List pages from the WordPress site. Supports filtering by status, author, search, and parent. Returns page IDs, titles, dates, and statuses. |
wordpress.wordpress_list_posts | Read | per_page, page, search, status, author, categories, tags, order, orderby | List posts from the WordPress site. Supports filtering by status, author, category, tag, and search. Returns post IDs, titles, dates, and statuses. |
wordpress.wordpress_list_users | Read | per_page, page, search, roles, order, orderby | List users registered on the WordPress site. Supports filtering by role and search. Returns user IDs, names, and email addresses. |
wordpress.wordpress_update_post | Write | id, title, content, status, excerpt, author, categories, tags, featured_media, slug | Update an existing WordPress post. Provide the post ID and any fields to change: title, content, status, categories, tags, etc. |
Automation Notes
- Use
--jsonfor machine-readable output. - Keep credentials out of argv by using environment variables or stored KosmoKrator configuration.
- Configure read/write policy before unattended runs; use
--forceonly for trusted automation. - Use the MCP gateway instead when the agent needs dynamic tool discovery inside a conversation.