Skip to content

PrShivashish/Synapse-AI-Terminal

Repository files navigation

🧠 Synapse - An AI Powered Terminal

Python Version License: MIT Pull Requests Welcome

A modern, feature-rich terminal emulator built in Python, featuring a sleek web interface and integrated AI for natural language command execution.


✨ Live Demo

A live demo of this project is hosted on Render. Try it out here!

➡️ Launch Web Terminal


Synapse Web Interface

🚀 What This Project Does

Synapse provides a fully functional terminal environment that runs in two modes: a classic Command-Line Interface (CLI) and a modern Web Interface accessible from your browser. The standout feature is its AI integration with Google's Gemini, allowing you to execute commands by typing in plain English.

🌟 Features

  • Dual Interface: Seamlessly switch between a traditional CLI and a user-friendly web UI.
  • Core Commands: All the essential terminal commands are built-in, including ls, cd, cat, mkdir, rm, echo, and more.
  • AI Command Parsing: Type what you want to do in natural language (e.g., "show me all python files") and the AI will translate it into the correct command.
  • System Monitoring: Get real-time stats on your system's CPU, memory, and running processes with the cpu, mem, and ps commands.
  • Python Execution: Write and run Python scripts directly from the terminal.
  • Advanced Utilities: Includes powerful tools like a directory tree view and a file search command with wildcard support.
  • Web UI Enhancements: The web interface features clickable command suggestions, a clean design, and real-time status updates.

🛠️ Getting Started

Follow these steps to get the project running on your local machine.

Prerequisites

  • Python 3.8+
  • pip (Python package installer)

Installation

  1. Clone the repository:

    git clone [https://github.com/PrShivashish/Synapse.git](https://github.com/PrShivashish/Synapse.git)
    cd Synapse
  2. Install the required dependencies:

    pip install -r requirements.txt
  3. Set up the AI (Optional but Recommended):

    • Get a free API key from Google AI Studio.
    • Create a file named .env in the root of the project.
    • Add your API key to the .env file:
      GEMINI_API_KEY=your_key_here
      

🖥️ Usage

You can run the application in two different modes.

Web Interface Mode

This is the recommended way to use the terminal.

  • Start the server:
    python main.py --mode web
  • Open your browser and navigate to http://localhost:5000.

Command-Line Mode

For a classic terminal experience.

  • Run the CLI:
    python main.py --mode cli

☁️ Deployment

You can easily deploy this application to the cloud to create a shareable live demo.

  • Render (Recommended):

    • Connect your GitHub repository to Render.
    • Use the following settings:
      • Build Command: pip install -r requirements.txt
      • Start Command: gunicorn main:app
    • Add your GEMINI_API_KEY as an environment variable in the Render dashboard.
  • Heroku:

    • Create a Procfile in your root directory with the content: web: gunicorn main:app.
    • Push to Heroku and set the GEMINI_API_KEY in the "Config Vars" section.

🤝 Contributing

Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📜 License

This project is distributed under the MIT License. See LICENSE for more information.

My Journey with This Project

I took on this project to dive deep into how terminals work under the hood. It has been a fantastic learning experience—from setting up the environment and fixing bugs to exploring the power of a web-based interface and AI integration. I'm excited to continue building on this foundation and adding new features!

Hope you find it useful or at least interesting! 🚀


About

Synapse is a modern, feature-rich terminal emulator built in Python, featuring a sleek web interface and integrated AI for natural language command execution.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors