Quix: A Lightning-Fast VTEX IO CLI Experiment
Are you a developer seeking to optimize your experience with the VTEX IO platform? Never thought about it? Well, I did—too much, even.
Enter Quix, an experimental CLI project designed to explore the possibilities and potentially enhance your VTEX IO workflow. Join me on this exciting journey as we dive into the world of Quix.
#Contents
#Getting Started ⚡️
As a developer myself, I do value a fast and reliable developer experience. Quix aims to make our development experience with VTEX IO as smooth as possible.
IMPORTANT:
Quix is an experimental project and is not officially supported by VTEX. Please use it with caution and provide feedback as you explore its capabilities.
#Commands ⚙️
Quix offers a limited set of commands at the moment, as it is still a work in progress.
One notable command is link
, which enables you to synchronize your local project with the remote VTEX account you are logged into.
However, keep in mind that functionalities such as login
and use
are not yet implemented in Quix. For those features, fallback to the VTEX IO CLI.
#Improvements and API Reverse Engineering 🧪
Quix is an ongoing experiment focused on improving performance and exploring the VTEX IO API. I implemented various optimizations and even ventured into reverse engineering the API to uncover its hidden potential. Here are some of the things we've been working on:
-
Minifier Benchmark 🛑: I have compared the performance of the
minifier
crate and the VTEX IO Link endpoint, analyzing the speed and efficiency of raw files versus minified files during thequix link
command. The results were surprising, and can be read here. -
Release + Compression ⚖️: I'm dedicated to arriving at a lean and efficient binary. The release script utilizes common
cargo
commands to build the binary and then compresses it using UPX. This results in a significantly reduced binary size, making it lighter and faster to download.
- With this, we finish with a binary that weighs ~750K, which is a great improvement from the original ~1.2M. It's a known fact that the Rust compiler generates binaries with a bigger size, but with this, we can reduce the size of the binary to a more reasonable size.
#Results 📊
Curious to see how Quix performs compared to the original VTEX CLI?
I've conducted tests using the time
utility on a MacBook Air M1. While these results provide insights, please keep in mind that Quix is an experiment and may have limitations:
The image above showcases a comparison between the original VTEX CLI (on the left) and the Quix CLI (on the right).
I did clear the cache and unlink all of the apps between tests to ensure a fair evaluation.
#License 📝
Quix is distributed under the Apache 2.0 license, granting you the freedom to experiment, explore, and contribute to its development.