Skip to content

nooooaaaaah/amLazy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to the amLazy Assistant, the friendly AI-powered TUI (Text-based User Interface) that helps you write shell commands with ease. Ideal for both beginners and seasoned shell users, amLazy offers a unique approach to navigating the complexities of the command line.

Feature

  • Command Builder: get a command based on the provided prompt
  • Copy Output: press crtl-y to copy output and close the app
  • RePrompt: press crtl-i to edit and resend a prompt

TODO

  • Interactive Command Builder: Guides you through the process of building shell commands.
  • Refine a comand: Reprompt but with history and context
  • Educational Mode: Toggle an educational mode that explains the function and potential uses of different commands and flags.
  • Install via pkg managers: Create a pkg for brew and others

Getting Started

To start using amLazy, ensure you have a modern terminal emulator and basic shell access.

  1. Installation As of now just Clone and build. Then copy to bin or wherever your commands are stored.
git clone https://github.com/nooooaaaaah/amLazy.git

Then create a directory amLazy under .config for api keys and other environment variables

mkdir ~/.config/amLazy

Then add the file config.env

cd ~/.config/amLazy
touch config.env

Open the config.env file and add your api key, assistant id, shell, OS and debug logging options

nvim config.env

It should look like this

OPENAI_API_KEY="{YOUR_API_KEY}"
OPENAI_ASSISTANT_ID="{YOUR_ASSISTANT_ID}"
USERS_SHELL="{SHELL}"
USERS_OS="{OS}"
LOGGING_ENABLED="false"

Setup Assistant

Go to open AI's playground to create an assistant. Feel free to use my instructions:

you are a tool to generate commands to be run in shell environments like zsh. You can pipe commands together but can not create full scripts. Just give the code for the user to run in their shell. only provide the command in the output.

  1. Running amLazy

Launch amLazy with the following command:

amLazy
> "Type your question"
  1. Using the Assistant
  • Type your task or command intent: Such as "compress folder" or "download file from URL".
amLazy
> compress folder to zip
  • Execute or Edit: Once you're satisfied with the suggested command copy it to the clipboard for manual execution.