{"id":328,"date":"2026-04-01T00:00:00","date_gmt":"2026-04-01T00:00:00","guid":{"rendered":"https:\/\/wordpress.securinsight.ca\/index.php\/2026\/04\/01\/ai-search-create-manage-search-ai-search-instances-with-wrangler-cli\/"},"modified":"2026-04-01T00:00:00","modified_gmt":"2026-04-01T00:00:00","slug":"ai-search-create-manage-search-ai-search-instances-with-wrangler-cli","status":"publish","type":"post","link":"https:\/\/wordpress.securinsight.ca\/index.php\/2026\/04\/01\/ai-search-create-manage-search-ai-search-instances-with-wrangler-cli\/","title":{"rendered":"AI Search &#8211; Create, manage, search AI Search instances with Wrangler CLI"},"content":{"rendered":"<p><a href=\"https:\/\/developers.cloudflare.com\/ai-search\/\">AI Search<\/a> supports a <code>wrangler ai-search<\/code> command namespace. Use it to manage instances from the command line.<\/p>\n<p>The following commands are available:<\/p>\n<table>\n<thead>\n<tr>\n<th>Command<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>wrangler ai-search create<\/code><\/td>\n<td>Create a new instance with an interactive wizard<\/td>\n<\/tr>\n<tr>\n<td><code>wrangler ai-search list<\/code><\/td>\n<td>List all instances in your account<\/td>\n<\/tr>\n<tr>\n<td><code>wrangler ai-search get<\/code><\/td>\n<td>Get details of a specific instance<\/td>\n<\/tr>\n<tr>\n<td><code>wrangler ai-search update<\/code><\/td>\n<td>Update the configuration of an instance<\/td>\n<\/tr>\n<tr>\n<td><code>wrangler ai-search delete<\/code><\/td>\n<td>Delete an instance<\/td>\n<\/tr>\n<tr>\n<td><code>wrangler ai-search search<\/code><\/td>\n<td>Run a search query against an instance<\/td>\n<\/tr>\n<tr>\n<td><code>wrangler ai-search stats<\/code><\/td>\n<td>Get usage statistics for an instance<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The <code>create<\/code> command guides you through setup, choosing a name, source type (<code>r2<\/code> or <code>web<\/code>), and data source. You can also pass all options as flags for non-interactive use:<\/p>\n<div>\n<figure>\n<pre data-language=\"sh\"><code class=\"language-sh\"><div><div><span>wrangler<\/span><span> <\/span><span>ai-search<\/span><span> <\/span><span>create<\/span><span> <\/span><span>my-instance<\/span><span> <\/span><span>--type<\/span><span> <\/span><span>r2<\/span><span> <\/span><span>--source<\/span><span> <\/span><span>my-bucket<\/span><\/div><\/div><\/code><\/pre>\n<div>\n<div><\/div>\n<\/div>\n<\/figure>\n<\/div>\n<p>Use <code>wrangler ai-search search<\/code> to query an instance directly from the CLI:<\/p>\n<div>\n<figure>\n<pre data-language=\"sh\"><code class=\"language-sh\"><div><div><span>wrangler<\/span><span> <\/span><span>ai-search<\/span><span> <\/span><span>search<\/span><span> <\/span><span>my-instance<\/span><span> <\/span><span>--query<\/span><span> <\/span><span>\"how do I configure caching?\"<\/span><\/div><\/div><\/code><\/pre>\n<div>\n<div><\/div>\n<\/div>\n<\/figure>\n<\/div>\n<p>All commands support <code>--json<\/code> for structured output that scripts and AI agents can parse directly.<\/p>\n<p>For full usage details, refer to the <a href=\"https:\/\/developers.cloudflare.com\/ai-search\/wrangler-commands\/\">Wrangler commands documentation<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>AI Search supports a wrangler ai-search command namespace. Use it to manage instances from the command line. The following commands are available: Command Description wrangler ai-search create Create a new instance with an interactive wizard wrangler ai-search list List all instances in your account wrangler ai-search get Get details of a specific instance wrangler ai-search [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-328","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/wordpress.securinsight.ca\/index.php\/wp-json\/wp\/v2\/posts\/328","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.securinsight.ca\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wordpress.securinsight.ca\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.securinsight.ca\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.securinsight.ca\/index.php\/wp-json\/wp\/v2\/comments?post=328"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.securinsight.ca\/index.php\/wp-json\/wp\/v2\/posts\/328\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.securinsight.ca\/index.php\/wp-json\/wp\/v2\/media?parent=328"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wordpress.securinsight.ca\/index.php\/wp-json\/wp\/v2\/categories?post=328"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wordpress.securinsight.ca\/index.php\/wp-json\/wp\/v2\/tags?post=328"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}