AI Search - Create, manage, search AI Search instances with Wrangler CLI
Key Points
- Manage AI Search instances via Wrangler CLI
- Create instances interactively or with flags
- Commands support --json for automation
Summary
Cloudflare AI Search adds a new wrangler ai-search command namespace to manage AI Search instances from the command line. Engineers can create, list, inspect, update, delete, query, and retrieve usage stats for instances. Commands support an interactive wizard, full flag-based non-interactive mode, and --json for machine-readable output suitable for scripts and automation.
Key Points
- Available commands:
wrangler ai-search create,list,get,update,delete,search,stats. createlaunches an interactive wizard (choose name, source typer2orweb, and data source) or accept flags for non-interactive use:wrangler ai-search create my-instance --type r2 --source my-bucket.- Query an instance directly from the CLI:
wrangler ai-search search my-instance --query 'how do I configure caching?'. - All commands support
--jsonfor structured output that scripts and AI agents can parse. - Use
list/getto discover instances andstatsto retrieve usage metrics for monitoring and automation.