LayZsh is an AI-powered tool that seamlessly brings multiple AI features to your terminal. It is designed to simplify and enhance your command-line experience by providing a range of AI-driven functionalities directly in your shell.
- Usage: Press
opt+i, opt+ito toggle LayZsh activation. - Functionality: When activated, LayZsh modifies the shell prompt to include an eyeball emoji for visual indication. When deactivated, it returns to the default state.
- Usage: Press
opt+i, opt+jto submit a prompt as a chat. - Functionality: Engage in a conversation with the AI, receiving responses as if chatting with an AI model.
- Usage: Press
opt+i, opt+kto convert plain English into a shell command. - Functionality: Input natural language and receive a corresponding shell command generated by AI.
- Example: Typing "list all files" could generate the command
ls -a.
To ensure the functionality of LayZsh, you can run automated tests using ZUnit.
-
ZUnit: Make sure
ZUnitis installed on your system. You can install it via Homebrew on macOS or manually from its GitHub repository.brew install zunit
-
From the root of the repository, execute the test script:
./run_tests.sh
This script will navigate to the test directory and run the tests using
ZUnit.
- AI-Driven Command Generation: Convert plain English into shell commands using AI.
- Interactive Debugging: Maintain a history of command execution and output for easier debugging.
- AI Chat Integration: Engage with AI models for assistance and inquiries directly from your terminal.
To install LayZsh, follow these steps:
-
Clone the repository to your local machine:
git clone https://github.com/yourusername/layzsh.git ~/.layzsh -
Add LayZsh to your
.zshrc:echo 'source ~/.layzsh/layzsh.plugin.zsh' >> ~/.zshrc
-
Restart your terminal or source your
.zshrcto apply the changes:source ~/.zshrc
LayZsh provides a variety of commands and options to enhance your Zsh experience. Here are the currently implemented features:
-
Toggle LayZsh Activation:
- Use the key binding
opt+i, opt+ito toggle the activation state of LayZsh.
- Use the key binding
-
Submit a Prompt as a Chat:
- Use the key binding
opt+i, opt+jto engage in a chat with the AI.
- Use the key binding
-
Generate Shell Commands:
- Use the key binding
opt+i, opt+kto convert plain English into shell commands.
- Use the key binding
We welcome contributions from the community! To contribute to LayZsh, please follow these steps:
- Fork the repository on GitHub.
- Create a new branch for your feature or bug fix.
- Make your changes and commit them with clear and descriptive messages.
- Push your changes to your fork and submit a pull request.
LayZsh is open-source software licensed under the MIT License. See the LICENSE file for more information.
If you encounter any issues or have questions, please open an issue on GitHub or contact us at [email protected].