Whiz: A Terminal Copilot
Whiz is a tool designed to enhance the experiences of users working in terminal environments by acting as a copilot. This utility helps streamline tasks that can be performed via the command line with the assistance of cutting-edge AI models.
Installation
To start using Whiz, installation is straightforward. It requires Node.js and can be installed globally using npm with the command:
npm install -g whiz_cli
After installation, users must configure their environment by setting the OPENAI_API_KEY
. This step involves adding a line to either the .bashrc
or .zshrc
file for Unix-based systems, or setting it as an environment variable on Windows. This key is essential for integrating Whiz with OpenAI's language models.
For those interested in experimenting with models other than the default gpt-3.5-turbo
, a built-in flexibility allows for changing the language model by setting the WHIZ_LLM_MODEL
environment variable, such as using gpt-4
.
export OPENAI_API_KEY=<your key>
Usage
Using Whiz is simple and revolves around its command-line interface. Users can issue requests directly through the terminal with the prefix wz
, followed by their desired operation. For example, users can utilize it to:
- Fetch a webpage using
curl
and save the response. - Open a website in a specific browser.
- List recent GitHub branches sorted by their activity.
# Example commands:
wz curl google and store response in google.html
wz open google.com in chrome
wz list recent github branches sorted by activity
Privacy Considerations
Whiz handles user privacy with care. It transmits select data pieces to OpenAI, such as:
- The platform on which the user's operating system is running (e.g., 'android', 'darwin', 'linux', 'openbsd', or 'win32').
- The architecture of the CPU (e.g., 'x32', 'x64', 'arm', 'arm64').
- The shell path being used.
Importantly, no file names or file content from the user's environment are shared. Users are advised to avoid sending sensitive information in requests.
Contributing to Whiz
Whiz welcomes contributions from the community. Those interested should review the CONTRIBUTING.md file for detailed instructions.
License
Whiz is open-source software, licensed under the MIT License. Users can access the specifics of this license in the LICENSE file included with the project.
In summary, Whiz offers a versatile and privacy-conscious tool that enhances productivity for terminal users by pairing terminal commands with the intelligence of AI, making complex tasks more manageable.