Historically, command line interfaces (CLI) were invented to enable communication between humans and computers.
These days, computers offer graphical user interfaces (often called UIs) that streamline interaction. Yet CLIs persist, because they allow developers to express very specific instructions that can be otherwise tedious or repetitive to do on the UI. This is why many popular software applications offer a CLI in addition to a UI.
And Coveo is no stranger to this trend. To build a great developer experience, we launched our very own CLI over a year ago. We still get questions about what the tool is about and why one should use it. So, let’s dig a little deeper!
Why do I need the Coveo CLI?
The Coveo CLI interacts with the Coveo platform to ease implementation and build automation with Coveo products.
While line of business users love Coveo for its drag-and-drop functionality, developers love the fact that we include developer tools on our platform.
Over the last year, we’ve added several features, including:
- Quickly create Coveo Headless-powered search pages with the framework of your choice, like Angular, React, and Vue.js.
- Quickly create a Coveo Atomic-powered search page for your Coveo organization.
- Create and manage Coveo organizations and sources.
- Automate deployments between organizations.
- And much more!
You’ll notice that all of the features that we integrated into the Coveo CLI can be done either through our Coveo REST APIs or directly on our Coveo Administration Console.
So, why exactly did we need to include it in our CLI? Well, a lot of these tasks are, as described above, tedious and repetitive. If you ask any developer, a key target they’re always trying to hit is optimization. If you’re a developer looking to optimize and automate your workflow, I recommend you use the Coveo CLI!
Let’s go through two specific scenarios where the Coveo CLI can help improve automation.
Your content is indexed! Now you want to build a Coveo powered search page. You evaluate the UI frameworks and libraries available to you, and decide to create your search page with the Atomic library.
However, to build it from scratch, you’ll need to not only familiarize yourself with the available components, but you also need to spend time setting up your environment and installing all the necessary packages in order to code your search page.
But who has time for that? You want to build something quickly to see the value of Coveo. (And calm an anxious customer down!)
This is where Coveo CLI comes in handy, because it allows you to quickly scaffold your search page with the input of a single command! Think about it: would you rather spend a few minutes setting up a basic Atomic search results page, or a few hours?
Here’s a concrete example:
Using your indexed content, you want to build a search page with a search bar and five different facets. If you build it from scratch, it could take you approximately three hours. This would include installation time, setting up your environment, familiarizing yourself with the components, and much more.
With the Coveo CLI, you can input one command to have a basic search page up and running in a matter of 5 to 10 minutes. That’s the power of the Coveo CLI tool!
Before deploying to your production environment, you deploy and test in your sandbox environment. Of course you leverage the resource snapshots feature to migrate your resources from your sandbox environment to your production one.
However, there’s several repetitive tasks you may need to do. For instance: Let’s say you want to apply your sandbox organization’s changes to your production one, every week, due to new changes and on-going tests in your environment. In order to do so, you will need to manually create the snapshot and apply those’changes on the administration console.
So, you think to yourself: I have a developer on hand, I don’t want to have to go to the admin console every time, and I’d really like to reduce the overall human effort? Say no more — use the Coveo CLI!
With the CLI, you can use this process in your CI/CD pipeline and automate pulling your organization’s resources, validating them, and then pushing it to your destination organization. The resource snapshots feature integration with the Coveo CLI can be done with just a few commands. By automating your system you save time and effort!
Ready to Get Started?
I hope I was able to convince you about the power of using the Coveo CLI. It’s a great option for both beginner and seasoned developers who want access to quick scaffolding options as well as to optimize their workflow.
Therefore, if the words automation, fast, and optimization come to mind, then think about the CLI next time.
For further information, check out these resources!
- Coveo CLI: For How You Want to Develop
- Public documentation on Coveo CLI
- Level Up tutorial Resource Snapshots with Coveo CLI
Learn how the Coveo CLI can streamline your work and make your implementations faster and more robust, including using it for the Push API, Snapshots, and more.
In just 20 minutes, you can learn all about the Coveo CLI. Check out our Developer Hours!