TECH

ShellSpeak : AI-Powered Terminal Enhancement

ShellSpeak is an interactive command-line interface that enhances the terminal experience by integrating AI-driven command translation and execution.

The core functionality of ShellSpeak revolves around capturing user input, translating it to actionable shell commands through an AI model, and executing these commands while displaying the output in a styled and user-friendly manner.

Notice

  • This can and will delete files if you are not careful, I suggest you use this on a system you do not care about, or a emulator.
  • I only have developed and tested on windows, “should” work with other consoles, and on windows, OpenAI loves using *nix comments.
  • Feel free to look at what I have done, and please check back in a day or two.

Highlights

ShellSpeak Demo

  • Now with the expanded space, and GPT JSON response reliability added.
  • Works just like the console. (With pretty colors.)
  • Embed files into you commands by using “file: /filepath/” (where “/filepath/” is the path to your file, allows for multiple files.)
  • Uses past conversation history.
  • Checks your PATH for all available commands, and implies default OS commands.
  • Use plain text for commands i.e. “Go to folder Test”
  • The modules/llm.py file has our LLM class, that allows for offline (huggingface.co transformers) and OpenAI (gpt3/gpt4), and can be easily expanded on.

(Files/History/PATH commands, are set to token limits that can be adjusted, check modules/shellSpeak.py)

Information

The above diagram illustrates the architecture of ShellSpeak. It provides an in-depth look into how the program captures and processes user input to execute commands.

We have recently added the capability to handle file inputs and to manage command history, enhancing the overall user experience.

ShellSpeak Commands

  • ‘exit’: to close ShellSpeak
  • ‘user: /command/’: pass a raw command to execute then reply threw the AI
  • ‘file: /filepath/’: adds file data to the command prompt. (can use multiple files, but will use the set token size for all files, files are also limited to 1,000,000 characters, due to calculating tokens. When trimming files we use Vector Matching, hopping to get relevant data from large data files.)
  • ‘clm’: Clear command Memory
  • ‘about’: Shows the About Information
  • ‘help’: Shows this Help information.

Setup

  1. Clone the repository:
git clone https://github.com/TheCompAce/ShellSpeak
cd ShellSpeak

2. Install the required dependencies:

pip install -r requirements.txt

3. Configure your settings in settings.json to match your preferences and system setup.

Usage

Running The Script

Run the ShellSpeak script from the command line:

python main.py

This uses a menu to Setup and Run ShellSpeak.

Auto Run the ShellSpeak script from the command line:

python main.py /start

Runs with using the start menu, base on the settings.json that already exist.

(We have a run.bat, and ai_cmd.bat (auto run), that builds a environment, and runs “pip install -r requirements.txt”)

Notes On Settings.json

  • the “prompt” values can be a string or a file path, if it is a file path then we use the file’s data, this way we can have long prompts.
  • the llm.py has a cache system, but it is mainly for debugging, and seems not to work well, as commands tend to be the same, but do different things.
Tamil S

Tamil has a great interest in the fields of Cyber Security, OSINT, and CTF projects. Currently, he is deeply involved in researching and publishing various security tools with Kali Linux Tutorials, which is quite fascinating.

Recent Posts

Tookie-osint : A Powerful Tool For OSINT Enthusiasts

Tookie-osint has a simple-to-use UI and is really straightforward. The main idea of Tookie-osint is…

17 hours ago

Roop : Empowering AI-Generated Media Responsibly

Be aware, the installation needs technical skills and is not for beginners. Please do not…

17 hours ago

Linux For OSINT. 21-Day : Mastering The Command Line For Beginners

The course is primarily intended for those who are professionally involved in or simply interested…

17 hours ago

Python For OSINT : A 21-Day Journey To Mastering Open Source Intelligence

Embark on a 21-day journey to harness the power of Python for Open Source Intelligence…

18 hours ago

Prying Deep – Unveiling The Depths Of The Web

I've seen multiple projects out there in GitHub, that are crawlers for the deep web,…

18 hours ago

OSINTk.o – Kali Linux Based ISO For OSINT Investigations.

OSINTk.o is a customized Kali Linux-based ISO image with pre-installed packages and scripts. The idea…

3 days ago