# AI Search Comes to Your Terminal: the New wrangler ai-search Commands!

Hey everyone, it's me, Shii-chan! Today I found a nice little update that makes Wrangler even handier, so let me share it with you.

## What was announced?

Over on the Cloudflare Changelog, [AI Search](https://developers.cloudflare.com/ai-search/) got a brand-new `wrangler ai-search` command namespace. Now you can manage your instances straight from the command line, from creating them all the way to running searches.

## The story so far

Until now, creating AI Search instances or tweaking their config mostly happened in the dashboard. Popping open a browser every time you wanted to check something or run a quick search was a little tedious if you like to drive your workflow from the CLI.

## What changes

From now on you can manage AI Search without leaving your terminal. There are seven commands to work with:

- `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 update`: update an instance's configuration
- `wrangler ai-search delete`: delete an instance
- `wrangler ai-search search`: run a search query against an instance
- `wrangler ai-search stats`: get usage statistics for an instance

## Dive Deep

The `create` command walks you through picking a name, a source type (`r2` or `web`), and a data source. You can also pass everything as flags for non-interactive use:

```sh
wrangler ai-search create my-instance --type r2 --source my-bucket
```

You can also fire off a search right from the CLI:

```sh
wrangler ai-search search my-instance --query "how do I configure caching?"
```

The best part: every command supports `--json`, returning structured output that scripts and AI agents can parse directly, which is perfect for automation. For the full details, check out the [Wrangler commands documentation](https://developers.cloudflare.com/ai-search/wrangler-commands/).

## Wrap-up

- `wrangler ai-search` lets you create, manage, and search AI Search instances from the CLI
- Seven commands are available: create, list, get, update, delete, search, and stats
- `--json` output makes automation from scripts and AI agents a breeze

If you'd rather not bounce between dashboard tabs, or you want to wire AI Search into your CI and automation, this update is right up your alley!
