muralipala1504 commited on
Commit
79b2d21
·
1 Parent(s): ef3975d

docs: refresh README for ModUI; Groq-focused, quick start, and scope

Browse files
Files changed (1) hide show
  1. README.md +110 -64
README.md CHANGED
@@ -1,142 +1,188 @@
1
 
2
- ---
3
-
4
- # 💻 Deepshell UI
5
 
6
  ![Python](https://img.shields.io/badge/python-3.9+-blue.svg)
7
  ![FastAPI](https://img.shields.io/badge/FastAPI-async-green.svg)
8
  ![License](https://img.shields.io/badge/license-MIT-purple.svg)
9
- [![Release](https://img.shields.io/github/v/release/muralipala1504/deepshell-ui)](https://github.com/muralipala1504/deepshell-ui/releases)
10
 
11
- _A lightweight web UI for the **Deepshell** AI Shell Assistant._
 
 
12
 
13
  ---
14
 
15
- ## 🚀 What is Deepshell UI?
16
 
17
- Deepshell‑UI is a **domain‑focused Infra & DevOps AI assistant**, built for
18
- **Linux Sysadmins, DevOps Engineers, Cloud Engineers, and IaC Specialists**.
 
19
 
20
- Unlike generic chatbots or wrappers, **it rejects out‑of‑domain queries** (trivia, poems, recipes, etc.) and focuses only on delivering **copyready Linux, Cloud, and IaC commands/scripts**.
21
 
22
  ---
23
 
24
  ## ✨ Features
25
 
26
- - Intuitive **chatstyle interface**
27
- - Syntax‑highlighted outputs with **Copy‑to‑Clipboard**
28
- - Rejects irrelevant/non‑infra prompts → **no nonsense answers**
29
- - Clean & responsive layout with scrollable responses
30
- - Seamless integration with the **Deepshell backend API**
 
31
 
32
  ---
33
 
34
  ## 🛠️ Tech Stack
35
 
36
- - **Frontend**: HTML, CSS, Vanilla JS, Prism.js
37
- - **Backend**: FastAPI, Uvicorn, Typer, OpenAI (LiteLLM), psutil, Rich
38
- - **Other**: YAML for config, Python 3.9+
 
39
 
40
  ---
41
 
42
  ## 🖼️ Preview
43
 
44
- ![Deepshell UI Screenshot](docs/screenshot.png)
45
- *Example: Infra‑only assistant → rejects capital‑cities, delivers `df -h` instantly*
 
46
 
47
  ---
48
 
49
- ## ⚡ Getting Started
50
 
51
- ### Prerequisites
52
- - Python **3.9+**
53
  - Git
54
- - OpenAI API Key (required for backend AI calls)
55
-
56
- ### Installation
57
 
58
- ```bash
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
- Windows PowerShell
79
 
80
- ```pshell
81
 
82
- $env:OPENAI_API_KEY="your_openai_api_key_here"
83
 
84
- ```
 
85
 
86
- Firewall Config (Linux only):
87
 
88
  ```bash
 
89
  sudo firewall-cmd --add-port=8001/tcp --permanent
90
  sudo firewall-cmd --reload
91
 
92
  ```
93
 
94
- Run the backend:
 
 
 
 
 
 
 
 
 
 
 
 
95
 
96
  ```bash
97
 
98
- python run_deepshell.py > deepshell.log 2>&1 &
99
 
100
  ```
101
 
102
- Now open in browser:
103
 
104
- ```bash
105
 
106
- http://localhost:8001
107
 
108
  ```
109
 
110
- 👉 If remote, replace localhost with your server IP.
111
 
112
- 🛑 To stop server: hit Ctrl + C in terminal.
 
 
 
113
 
 
114
 
115
- 🤝 Contributing
116
 
117
- Open issues, submit PRs — contributions welcome!
118
- Help shape the future of Deepshell 🚀
119
 
 
120
 
121
- 🤖 AI Assistance
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
122
 
123
- This project was developed with help from AI models (OpenAI GPT, Gemini 2.5 Flash) for code, debugging, and docs.
124
- 🛠️ All code has been reviewed, hardened, and validated by the maintainer.
125
 
 
 
 
 
126
 
127
- 📜 License
128
 
129
- MIT Licensed. See LICENSE for details.
 
 
 
 
 
 
 
 
 
 
 
130
 
131
  🛣️ Roadmap
132
 
133
- 🌙 Dark mode theme
134
- 💾 Persistent chat history
135
- 📂 Save/export responses to file
136
- Multi‑LLM backend (OpenAI, Anthropic, Local LLMs)
137
- 🔄 Clear/reset chat sessions
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
  ![Python](https://img.shields.io/badge/python-3.9+-blue.svg)
5
  ![FastAPI](https://img.shields.io/badge/FastAPI-async-green.svg)
6
  ![License](https://img.shields.io/badge/license-MIT-purple.svg)
 
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 reenable LLM calls later with a one‑line change in deepshell-backend/deepshell/main.py.
21
 
22
  ---
23
 
24
  ## ✨ Features
25
 
26
+ - Simple, singlepage 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
+ ![DeepShell UI Screenshot](docs/screenshot.png)
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.