Skip to content

nitindahiya-dev/terminalAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TerminalAI: AI-Powered Terminal Assistant

TerminalAI is an AI-driven terminal assistant that combines a sleek, dark-themed interface with natural language processing to transform plain English instructions into executable bash commands. Built with Rust for performance and Python for AI integration, it offers a modern workflow enhancement for developers.

✨ Features

  • Natural Language Processing
    Convert phrases like "create a folder" to mkdir folder
  • Dark Futuristic GUI
    Responsive interface built with Rust's eframe featuring real-time typing
  • Smart Autocomplete
    Tab-complete files/directories with Tab
  • Direct Command Execution
    Run native bash commands (pwd, ls --color, clear, cd)
  • GPT-4 Integration
    Powered by Dockerized FreeGPT4-WEB-API
  • Robust Error Handling
    Clear diagnostics for API issues and invalid commands

🚀 Getting Started

Prerequisites

  • Rust:

    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  • Python 3.13+::

    sudo apt-get install python3 python3-pip python3-venv
  • Install Docker

Installation

  • Clome repo:

    git clone https://github.com/nitindahiya-dev/terminalAI.git
    cd terminalAI
  • Set Up Python Environment:

    python3 -m venv venv
    source venv/bin/activate
    pip install requests
  • Launch GPT-4 API:

    docker run -p 5500:5500 d0ckmg/free-gpt4-web-api
  • Build Rust Project:

    cargo build
  • Launching the Application:

    # Ensure Docker API is running in background
    source venv/bin/activate
    cargo run -- --interactive

📚 Examples

  • Create Directory:

    user@host $ create a logs folder
    → Executed: mkdir logs_folder
  • List Files with Colors:

    user@host $ list files in detail
    → Executed: ls --color -l
  • System Command:

    user@host $ clear
    → Terminal cleared

🔧 Troubleshooting

  • Verify AI agent path::

    /projects/terminalAI/venv/bin/python3 ai_agent.py "create folder"

    Expected output: {"command":"mkdir folder"}

  • ❌ API Connection Issues:

    docker ps
    netstat -tuln | grep 5500
  • 🔄 UI Rendering Problems:

    desired_width = 600.0,
    window_size = (800.0, 600.0)

About

TerminalAI is an AI-driven terminal assistant

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published