Skip to content

brandon-fryslie/rad-plugins

Repository files navigation

LayZsh

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.

AI Features

Toggle LayZsh Activation

  • Usage: Press opt+i, opt+i to 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.

Submit a Prompt as a Chat

  • Usage: Press opt+i, opt+j to submit a prompt as a chat.
  • Functionality: Engage in a conversation with the AI, receiving responses as if chatting with an AI model.

Generate Shell Commands

  • Usage: Press opt+i, opt+k to 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.

Running Tests

To ensure the functionality of LayZsh, you can run automated tests using ZUnit.

Prerequisites

  • ZUnit: Make sure ZUnit is installed on your system. You can install it via Homebrew on macOS or manually from its GitHub repository.

    brew install zunit

Running the Tests

  1. 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.

Features

  • 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.

Installation

To install LayZsh, follow these steps:

  1. Clone the repository to your local machine:

    git clone https://github.com/yourusername/layzsh.git ~/.layzsh
  2. Add LayZsh to your .zshrc:

    echo 'source ~/.layzsh/layzsh.plugin.zsh' >> ~/.zshrc
  3. Restart your terminal or source your .zshrc to apply the changes:

    source ~/.zshrc

Usage

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+i to toggle the activation state of LayZsh.
  • Submit a Prompt as a Chat:

    • Use the key binding opt+i, opt+j to engage in a chat with the AI.
  • Generate Shell Commands:

    • Use the key binding opt+i, opt+k to convert plain English into shell commands.

Contributing

We welcome contributions from the community! To contribute to LayZsh, please follow these steps:

  1. Fork the repository on GitHub.
  2. Create a new branch for your feature or bug fix.
  3. Make your changes and commit them with clear and descriptive messages.
  4. Push your changes to your fork and submit a pull request.

License

LayZsh is open-source software licensed under the MIT License. See the LICENSE file for more information.

Support

If you encounter any issues or have questions, please open an issue on GitHub or contact us at [email protected].

About

Plugins for rad-shell zsh setup

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published