Spaces:
Running
Running
muralipala1504 commited on
Commit ·
79b2d21
1
Parent(s): ef3975d
docs: refresh README for ModUI; Groq-focused, quick start, and scope
Browse files
README.md
CHANGED
|
@@ -1,142 +1,188 @@
|
|
| 1 |
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
# 💻 Deepshell UI
|
| 5 |
|
| 6 |

|
| 7 |

|
| 8 |

|
| 9 |
-
[](https://github.com/muralipala1504/deepshell-ui/releases)
|
| 10 |
|
| 11 |
-
|
|
|
|
|
|
|
| 12 |
|
| 13 |
---
|
| 14 |
|
| 15 |
-
## 🚀 What is
|
| 16 |
|
| 17 |
-
|
| 18 |
-
|
|
|
|
| 19 |
|
| 20 |
-
|
| 21 |
|
| 22 |
---
|
| 23 |
|
| 24 |
## ✨ Features
|
| 25 |
|
| 26 |
-
-
|
| 27 |
-
-
|
| 28 |
-
-
|
| 29 |
-
-
|
| 30 |
-
-
|
|
|
|
| 31 |
|
| 32 |
---
|
| 33 |
|
| 34 |
## 🛠️ Tech Stack
|
| 35 |
|
| 36 |
-
-
|
| 37 |
-
-
|
| 38 |
-
-
|
|
|
|
| 39 |
|
| 40 |
---
|
| 41 |
|
| 42 |
## 🖼️ Preview
|
| 43 |
|
| 44 |
-
|
| 45 |
-
|
|
|
|
| 46 |
|
| 47 |
---
|
| 48 |
|
| 49 |
-
## ⚡
|
| 50 |
|
| 51 |
-
|
| 52 |
-
- Python
|
| 53 |
- Git
|
| 54 |
-
-
|
| 55 |
-
|
| 56 |
-
### Installation
|
| 57 |
|
| 58 |
-
|
| 59 |
-
git clone https://github.com/muralipala1504/deepshell-ui.git
|
| 60 |
-
cd deepshell-ui
|
| 61 |
-
```
|
| 62 |
|
| 63 |
```bash
|
|
|
|
|
|
|
| 64 |
|
|
|
|
| 65 |
pip install -r deepshell-backend/requirements.txt
|
| 66 |
pip install -e deepshell-backend/
|
| 67 |
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
Set your OpenAI API key:
|
| 71 |
-
|
| 72 |
-
Linux/macOS
|
| 73 |
|
| 74 |
```bash
|
| 75 |
-
export OPENAI_API_KEY="your_openai_api_key_here"
|
| 76 |
-
```
|
| 77 |
|
| 78 |
-
|
| 79 |
|
| 80 |
-
```
|
| 81 |
|
| 82 |
-
|
| 83 |
|
| 84 |
-
|
|
|
|
| 85 |
|
| 86 |
-
|
| 87 |
|
| 88 |
```bash
|
|
|
|
| 89 |
sudo firewall-cmd --add-port=8001/tcp --permanent
|
| 90 |
sudo firewall-cmd --reload
|
| 91 |
|
| 92 |
```
|
| 93 |
|
| 94 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 95 |
|
| 96 |
```bash
|
| 97 |
|
| 98 |
-
|
| 99 |
|
| 100 |
```
|
| 101 |
|
| 102 |
-
|
| 103 |
|
| 104 |
-
```
|
| 105 |
|
| 106 |
-
|
| 107 |
|
| 108 |
```
|
| 109 |
|
| 110 |
-
|
| 111 |
|
| 112 |
-
|
|
|
|
|
|
|
|
|
|
| 113 |
|
|
|
|
| 114 |
|
| 115 |
-
|
| 116 |
|
| 117 |
-
Open issues, submit PRs — contributions welcome!
|
| 118 |
-
Help shape the future of Deepshell 🚀
|
| 119 |
|
|
|
|
| 120 |
|
| 121 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 122 |
|
| 123 |
-
|
| 124 |
-
🛠️ All code has been reviewed, hardened, and validated by the maintainer.
|
| 125 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 126 |
|
| 127 |
-
📜 License
|
| 128 |
|
| 129 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 130 |
|
| 131 |
🛣️ Roadmap
|
| 132 |
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
🛠️ More infra helpers (Cloud CLI, Ansible, Terraform, etc.)
|
| 139 |
|
| 140 |
-
⭐ Star this repo if you find it useful!
|
| 141 |
|
| 142 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
|
| 2 |
+
# 💻 DeepShell ModUI
|
|
|
|
|
|
|
| 3 |
|
| 4 |

|
| 5 |

|
| 6 |

|
|
|
|
| 7 |
|
| 8 |
+
A lightweight web UI + backend for DeepShell — an infra‑only assistant for Linux SysAdmin, DevOps, IaC, Cloud, and Linux scripting tasks.
|
| 9 |
+
|
| 10 |
+
DeepShell intentionally rejects out‑of‑domain queries. It focuses on actionable commands, troubleshooting steps, automation snippets, and config examples for real‑world ops.
|
| 11 |
|
| 12 |
---
|
| 13 |
|
| 14 |
+
## 🚀 What is DeepShell ModUI?
|
| 15 |
|
| 16 |
+
DeepShell ModUI is a minimal, fast web application:
|
| 17 |
+
- Frontend: a clean chat interface served by the backend itself
|
| 18 |
+
- Backend: FastAPI service with pluggable LLM client (default: Groq) and guardrails
|
| 19 |
|
| 20 |
+
Current default mode is “hard‑block” (demo/safe mode): any prompt returns an admin‑only scope message. This keeps the UI responsive while preventing unintended LLM usage. You can re‑enable LLM calls later with a one‑line change in deepshell-backend/deepshell/main.py.
|
| 21 |
|
| 22 |
---
|
| 23 |
|
| 24 |
## ✨ Features
|
| 25 |
|
| 26 |
+
- Simple, single‑page chat UI
|
| 27 |
+
- FastAPI backend serves UI assets (index.html, app.js, CSS)
|
| 28 |
+
- Health/readiness endpoint
|
| 29 |
+
- Polite block message for non‑admin use cases
|
| 30 |
+
- Ready to wire Groq LLM for infra answers (opt‑in)
|
| 31 |
+
- Works locally or over LAN
|
| 32 |
|
| 33 |
---
|
| 34 |
|
| 35 |
## 🛠️ Tech Stack
|
| 36 |
|
| 37 |
+
- Frontend: HTML, CSS, Vanilla JS
|
| 38 |
+
- Backend: FastAPI, Uvicorn
|
| 39 |
+
- LLM Client: Groq (via deepshell-backend/deepshell/llm.py)
|
| 40 |
+
- Python: 3.9+
|
| 41 |
|
| 42 |
---
|
| 43 |
|
| 44 |
## 🖼️ Preview
|
| 45 |
|
| 46 |
+
Example screen (demo mode blocks general trivia; encourages admin/DevOps prompts).
|
| 47 |
+
|
| 48 |
+

|
| 49 |
|
| 50 |
---
|
| 51 |
|
| 52 |
+
## ⚡ Quick Start
|
| 53 |
|
| 54 |
+
Prerequisites
|
| 55 |
+
- Python 3.9+
|
| 56 |
- Git
|
| 57 |
+
- Network: open TCP 8001 if accessing from another machine
|
|
|
|
|
|
|
| 58 |
|
| 59 |
+
Clone and install
|
|
|
|
|
|
|
|
|
|
| 60 |
|
| 61 |
```bash
|
| 62 |
+
git clone https://github.com/muralipala1504/deepshell_modui.git
|
| 63 |
+
cd deepshell_modui
|
| 64 |
|
| 65 |
+
# Install backend deps and package
|
| 66 |
pip install -r deepshell-backend/requirements.txt
|
| 67 |
pip install -e deepshell-backend/
|
| 68 |
|
| 69 |
+
Run the app
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
|
| 71 |
```bash
|
|
|
|
|
|
|
| 72 |
|
| 73 |
+
python run_deepshell.py
|
| 74 |
|
| 75 |
+
```
|
| 76 |
|
| 77 |
+
Open in your browser
|
| 78 |
|
| 79 |
+
Local: http://localhost:8001
|
| 80 |
+
Remote/LAN: http://:8001
|
| 81 |
|
| 82 |
+
Linux firewall (if remote access needed)
|
| 83 |
|
| 84 |
```bash
|
| 85 |
+
|
| 86 |
sudo firewall-cmd --add-port=8001/tcp --permanent
|
| 87 |
sudo firewall-cmd --reload
|
| 88 |
|
| 89 |
```
|
| 90 |
|
| 91 |
+
Stop
|
| 92 |
+
|
| 93 |
+
Ctrl + C in the terminal that’s running the server.
|
| 94 |
+
|
| 95 |
+
|
| 96 |
+
🔌 LLM Provider: Groq (optional)
|
| 97 |
+
|
| 98 |
+
By default, the app is in “hard‑block” mode and does not call any LLM. When you’re ready to enable responses:
|
| 99 |
+
|
| 100 |
+
Set your Groq API key in the environment
|
| 101 |
+
|
| 102 |
+
Linux/macOS:
|
| 103 |
+
|
| 104 |
|
| 105 |
```bash
|
| 106 |
|
| 107 |
+
export GROQ_API_KEY="your_groq_api_key"
|
| 108 |
|
| 109 |
```
|
| 110 |
|
| 111 |
+
Windows PowerShell
|
| 112 |
|
| 113 |
+
```pshell
|
| 114 |
|
| 115 |
+
$env:GROQ_API_KEY="your_groq_api_key"
|
| 116 |
|
| 117 |
```
|
| 118 |
|
| 119 |
+
Enable LLM in the backend
|
| 120 |
|
| 121 |
+
Edit deepshell-backend/deepshell/main.py
|
| 122 |
+
In run_agent(), replace the hard‑block return with the provided LLM call (commented in the file).
|
| 123 |
+
|
| 124 |
+
Restart the server.
|
| 125 |
|
| 126 |
+
The LLM client code lives in:
|
| 127 |
|
| 128 |
+
deepshell-backend/deepshell/llm.py (get_global_client / provider wiring)
|
| 129 |
|
|
|
|
|
|
|
| 130 |
|
| 131 |
+
🔧 Project Layout
|
| 132 |
|
| 133 |
+
deepshell_modui/
|
| 134 |
+
├── app.js # Frontend script
|
| 135 |
+
├── index.html # Frontend page
|
| 136 |
+
├── services.css # Styling
|
| 137 |
+
├── run_deepshell.py # Convenience launcher
|
| 138 |
+
├── deepshell-backend/
|
| 139 |
+
│ ├── deepshell/
|
| 140 |
+
│ │ ├── __init__.py
|
| 141 |
+
│ │ ├── main.py # FastAPI app (entrypoint)
|
| 142 |
+
│ │ ├── __main__.py # Shim: python -m deepshell → main.main()
|
| 143 |
+
│ │ ├── llm.py # LLM provider wiring (Groq)
|
| 144 |
+
│ │ ├── handlers/ # Routers/handlers (extensible)
|
| 145 |
+
│ │ └── utils.py # Helpers
|
| 146 |
+
│ ├── requirements.txt
|
| 147 |
+
│ └── setup.py
|
| 148 |
+
└── docs/
|
| 149 |
+
└── screenshot.png
|
| 150 |
|
| 151 |
+
How to run (alternatives)
|
|
|
|
| 152 |
|
| 153 |
+
python run_deepshell.py
|
| 154 |
+
python -m deepshell # via main shim
|
| 155 |
+
python -m deepshell.main
|
| 156 |
+
uvicorn deepshell.main:app --host 0.0.0.0 --port 8001
|
| 157 |
|
|
|
|
| 158 |
|
| 159 |
+
🔒 Scope and Guardrails
|
| 160 |
+
|
| 161 |
+
DeepShell is for:
|
| 162 |
+
|
| 163 |
+
Linux SysAdmin commands and troubleshooting
|
| 164 |
+
DevOps tooling (Docker, Kubernetes, Helm, etc.)
|
| 165 |
+
IaC (Terraform, Ansible, CloudFormation)
|
| 166 |
+
Cloud CLIs and services (AWS/GCP/Azure)
|
| 167 |
+
Bash/Python scripting for ops
|
| 168 |
+
|
| 169 |
+
Out‑of‑scope prompts are politely declined.
|
| 170 |
+
|
| 171 |
|
| 172 |
🛣️ Roadmap
|
| 173 |
|
| 174 |
+
Optional “allow‑list” mode for infra keywords
|
| 175 |
+
Persistent chat history
|
| 176 |
+
Export responses
|
| 177 |
+
More helper modules (cloud/infra recipes)
|
| 178 |
+
Multi‑LLM support via provider switch
|
|
|
|
| 179 |
|
|
|
|
| 180 |
|
| 181 |
+
🤝 Contributing
|
| 182 |
+
|
| 183 |
+
Issues and PRs are welcome. Please keep contributions focused on infra/DevOps/IaC use cases and simple, maintainable code.
|
| 184 |
+
|
| 185 |
+
|
| 186 |
+
📜 License
|
| 187 |
+
|
| 188 |
+
MIT. See LICENSE for details.
|