WP-CLI commands

KimaAI adds the wp kimaai command to WP-CLI, WordPress’s command line. With it you can test the chatbot, sync your content, run quality checks and look at the usage without opening the admin, or from a script, a deployment or a cron job.

Set it up

  1. Make sure WP-CLI works on your server: wp --info answers with its version.
  2. Go to your WordPress folder, or add --path=<folder> to each command.
  3. List the commands with wp help kimaai.
  4. Try the chatbot as a visitor would: wp kimaai chat "When are you open on Sunday?".
  5. See the options of any command with wp help kimaai <command>, for example wp help kimaai vectors sync.

How it works

The commands come in groups:

CommandWhat it is for
wp kimaai chatChat with the chatbot through the same steps as on your site: settings, knowledge base and tools.
wp kimaai runOne request to an AI environment of Connections: a chat answer, an image or an embedding.
wp kimaai vectorsThe knowledge base: sync posts, search and inspect the index, check its health and freshness, manage collections.
wp kimaai evalRun the quality checks and show their history.
wp kimaai gaps reportThe questions visitors ask, in clusters, ranked by negative feedback and volume.
wp kimaai usage reportThe tokens the chatbot used per day and in the current month.
wp kimaai mcp tokenCreate, list and revoke tokens for the MCP server.
wp kimaai dbThe state of KimaAI’s database tables, and their migrations.
  • Commands that answer with the chatbot, embed content or run quality checks send requests to your AI provider, which cost tokens as they do on the site.
  • wp kimaai mcp token create prints the token once, as the admin does. WP-CLI’s --user chooses the user the token acts as.
  • Every command, with its options and examples, is in the WP-CLI reference.

What are your feelings