In April 2022, Warp launched a feature called AI Command Search. It allows users to type natural language search into the terminal and get back a command generated by artificial intelligence. It's one of Warp's more unique features, and an extremely powerful tool if you know how to use it. To learn more about AI Command search specifically, please check out our official documentation or read this blog here where we gave AI Command Search a pop quiz on Git commands.
But the story of how AI Command Search came to be is quite interesting. I talked with Kevin Yang, the engineer behind the feature, and gained some insight into the challenges he navigated before arriving at the product we see in Warp today.
In October 2021, Github Copilot was announced to the public. It is an artificial intelligence tool created by Github and OpenAI Codex to help software engineers work more efficiently by autocompleting their code.
Kevin realized that Codex actually has support for shell commands, and found that the suggested commands were quite accurate. He realized the potential in being able to search for hard commands using just natural language, instead of turning to Google or reading through long Stack Overflow forums.
That October, an initial prototype was built. Kevin was kind enough to pull up a screen-capture of what I call "Baby AI Command Search":
Unfortunately, AI Command Search was mostly a side-project for Kevin, who was working on other core features to Warp at the time. So, this initial prototype sat on the shelf for a few months.
In December 2021, Kevin got a nudge from one of his coworkers, Agata.
She mentioned that she used the initial prototype of AI Command Search in her day-to-day work, saying that it was especially great for re-calling specific flags for tar commands. This was encouraging - if one of our own engineers found the feature useful enough to use, it was worth building out a version that we could release to the public. Kevin scheduled a design jam with our amazing designer and cofounder, Shikhiu - and the sleek command search UI that we know and love today was born.
In Feb 2022, I learned that Kevin built out a large portion of this UI on a plane to Hawaii for Warp's annual retreat. And after a wave of iterations, bug bashes and dogfooding, AI Command Search was ready for an official release in April 2022 as part of Warp's official beta launch!!
One of the main challenges was improving the accuracy of the answers returned by Codex. What was the right way to engineer the prompt so that the AI could understand the right context and format for generating answers?
In the initial prototype, the user would simply enter the natural language search into their terminal input box and hit a keystroke to generate the AI command. It would take the output and insert it back into the shell command.
In this design, the user has no context as to what the feature does when using it. It also re-uses the terminal input box as a search bar, which can cause confusion. What if the user had already typed in a command they wanted to run, but pressed the keystroke to trigger AI Command on accident? Their command would be erased and replaced with something else.
Here is a video of AI Command Search today. The current user interface solves a lot of these design challenges.
AI Command Search is a unique feature that has not existed within a terminal before. As a result, it's hard to know how to prioritize it when compared to core terminal features like split panes, autocomplete, and session restoration.
For Kevin, it was hard to know whether this feature would have a big impact, and as a result, it was difficult to advocate for it as an official engineering work item versus keeping it as a side project. Luckily, he was encouraged by coworkers and a general engineering culture within Warp.
If you're interested in trying out AI Command Search yourself, you can!
Download Warp using the Download button in the top right corner of this site. It's free to use. If you want to hear from the people who are already using Warp, go here.
Once you have Warp downloaded, you can check out our official documentation, or simply press CTRL + ` to open up the AI Command Search panel.
And if you try out any interesting commands, we'd always love for you to tweet them and mention us @warpdotdev on Twitter, or share them on our Discord.