inside-cli 0.1.0__tar.gz → 0.1.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. {inside_cli-0.1.0 → inside_cli-0.1.1}/PKG-INFO +1 -1
  2. inside_cli-0.1.1/inside_cli/__init__.py +0 -0
  3. inside_cli-0.1.1/inside_cli/ai_engine.py +266 -0
  4. inside_cli-0.1.1/inside_cli/animations.py +288 -0
  5. inside_cli-0.1.1/inside_cli/anomaly.py +707 -0
  6. inside_cli-0.1.1/inside_cli/anomaly1.py +128 -0
  7. inside_cli-0.1.1/inside_cli/bar.py +47 -0
  8. inside_cli-0.1.1/inside_cli/base_window.py +252 -0
  9. inside_cli-0.1.1/inside_cli/ctk.py +139 -0
  10. inside_cli-0.1.1/inside_cli/fluid.py +184 -0
  11. inside_cli-0.1.1/inside_cli/fluid2.py +402 -0
  12. inside_cli-0.1.1/inside_cli/fluid_plot.py +169 -0
  13. inside_cli-0.1.1/inside_cli/inside_cli_ascii.py +96 -0
  14. inside_cli-0.1.1/inside_cli/main.py +583 -0
  15. inside_cli-0.1.1/inside_cli/mon.py +545 -0
  16. inside_cli-0.1.1/inside_cli/monitor.py +158 -0
  17. inside_cli-0.1.1/inside_cli/scatter_details.py +192 -0
  18. inside_cli-0.1.1/inside_cli/scatter_plot.py +739 -0
  19. inside_cli-0.1.1/inside_cli/system_monitor.py +1181 -0
  20. inside_cli-0.1.1/inside_cli/tempCodeRunnerFile.py +96 -0
  21. {inside_cli-0.1.0 → inside_cli-0.1.1}/inside_cli.egg-info/PKG-INFO +1 -1
  22. inside_cli-0.1.1/inside_cli.egg-info/SOURCES.txt +27 -0
  23. inside_cli-0.1.1/inside_cli.egg-info/entry_points.txt +2 -0
  24. inside_cli-0.1.1/inside_cli.egg-info/top_level.txt +1 -0
  25. {inside_cli-0.1.0 → inside_cli-0.1.1}/pyproject.toml +6 -7
  26. inside_cli-0.1.0/animations_old/colour.py +0 -63
  27. inside_cli-0.1.0/animations_old/ooh_yeahh.py +0 -139
  28. inside_cli-0.1.0/animations_old/test.py +0 -220
  29. inside_cli-0.1.0/inside_cli.egg-info/SOURCES.txt +0 -11
  30. inside_cli-0.1.0/inside_cli.egg-info/entry_points.txt +0 -2
  31. inside_cli-0.1.0/inside_cli.egg-info/top_level.txt +0 -4
  32. {inside_cli-0.1.0 → inside_cli-0.1.1}/README.md +0 -0
  33. {inside_cli-0.1.0 → inside_cli-0.1.1}/inside_cli.egg-info/dependency_links.txt +0 -0
  34. {inside_cli-0.1.0 → inside_cli-0.1.1}/inside_cli.egg-info/requires.txt +0 -0
  35. {inside_cli-0.1.0 → inside_cli-0.1.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: inside-cli
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: Your project description
5
5
  Requires-Python: >=3.8
6
6
  Requires-Dist: annotated-types==0.7.0
File without changes
@@ -0,0 +1,266 @@
1
+ import platform
2
+ import ollama
3
+
4
+ # Configuration
5
+ MODEL_NAME = "Qwen2.5-1.5B-Instruct:latest"
6
+ CURRENT_OS = platform.system() # 'Windows', 'Darwin' (Mac), or 'Linux'
7
+
8
+ # Initialize Client
9
+ client = None
10
+ try:
11
+ client = ollama.Client(host="http://localhost:11434")
12
+ except Exception as e:
13
+ print(f"Critique-CLI Warning: Could not connect to Ollama. {e}")
14
+
15
+
16
+ # ─── Lookup Tables ────────────────────────────────────────────────────────────
17
+ # Simple everyday commands that the model was never trained on.
18
+ # Keyed by normalized phrase → command string.
19
+ # The model is only called if no match is found here.
20
+
21
+ WINDOWS_COMMANDS = {
22
+ # directory navigation
23
+ "current directory" : "cd",
24
+ "show current directory" : "cd",
25
+ "show me the current directory" : "cd",
26
+ "what is the current directory" : "cd",
27
+ "where am i" : "cd",
28
+ "print working directory" : "cd",
29
+ "pwd" : "cd",
30
+ "go up" : "cd ..",
31
+ "go back" : "cd ..",
32
+ "go up one directory" : "cd ..",
33
+ "go home" : "cd %USERPROFILE%",
34
+ "go to home" : "cd %USERPROFILE%",
35
+ "go to documents" : "cd %USERPROFILE%\\Documents",
36
+ "go to desktop" : "cd %USERPROFILE%\\Desktop",
37
+ "go to downloads" : "cd %USERPROFILE%\\Downloads",
38
+ # listing files
39
+ "list files" : "dir",
40
+ "list all files" : "dir /a",
41
+ "show files" : "dir",
42
+ "show all files" : "dir /a",
43
+ "show hidden files" : "dir /a",
44
+ "list hidden files" : "dir /a",
45
+ "ls" : "dir",
46
+ "ls -a" : "dir /a",
47
+ "ls -la" : "dir /a",
48
+ # screen
49
+ "clear" : "cls",
50
+ "clear screen" : "cls",
51
+ "clear the screen" : "cls",
52
+ "clear terminal" : "cls",
53
+ # processes
54
+ "show processes" : "tasklist",
55
+ "list processes" : "tasklist",
56
+ "show running processes" : "tasklist",
57
+ "list running processes" : "tasklist",
58
+ "what processes are running" : "tasklist",
59
+ "running processes" : "tasklist",
60
+ # network
61
+ "show ip" : "ipconfig",
62
+ "show ip address" : "ipconfig",
63
+ "what is my ip" : "ipconfig",
64
+ "ip address" : "ipconfig",
65
+ "network info" : "ipconfig",
66
+ "show network" : "ipconfig",
67
+ # system info
68
+ "computer name" : "hostname",
69
+ "show computer name" : "hostname",
70
+ "hostname" : "hostname",
71
+ "current user" : "whoami",
72
+ "show current user" : "whoami",
73
+ "who am i" : "whoami",
74
+ "logged in user" : "whoami",
75
+ "system info" : "systeminfo",
76
+ "show system info" : "systeminfo",
77
+ "environment variables" : "set",
78
+ "show environment variables" : "set",
79
+ "show env" : "set",
80
+ # date/time
81
+ "show date" : "date /t",
82
+ "show time" : "time /t",
83
+ "date" : "date /t",
84
+ "time" : "time /t",
85
+ "show date and time" : "date /t && time /t",
86
+ # disk
87
+ "disk space" : "wmic logicaldisk get size,freespace,caption",
88
+ "show disk space" : "wmic logicaldisk get size,freespace,caption",
89
+ "check disk space" : "wmic logicaldisk get size,freespace,caption",
90
+ "free space" : "wmic logicaldisk get size,freespace,caption",
91
+ }
92
+
93
+ MAC_COMMANDS = {
94
+ # directory navigation
95
+ "current directory" : "pwd",
96
+ "show current directory" : "pwd",
97
+ "show me the current directory" : "pwd",
98
+ "what is the current directory" : "pwd",
99
+ "where am i" : "pwd",
100
+ "print working directory" : "pwd",
101
+ "pwd" : "pwd",
102
+ "go up" : "cd ..",
103
+ "go back" : "cd ..",
104
+ "go up one directory" : "cd ..",
105
+ "go home" : "cd ~",
106
+ "go to home" : "cd ~",
107
+ "go to documents" : "cd ~/Documents",
108
+ "go to desktop" : "cd ~/Desktop",
109
+ "go to downloads" : "cd ~/Downloads",
110
+ # listing files
111
+ "list files" : "ls",
112
+ "list all files" : "ls -la",
113
+ "show files" : "ls",
114
+ "show all files" : "ls -la",
115
+ "show hidden files" : "ls -a",
116
+ "list hidden files" : "ls -a",
117
+ "ls" : "ls",
118
+ # screen
119
+ "clear" : "clear",
120
+ "clear screen" : "clear",
121
+ "clear the screen" : "clear",
122
+ "clear terminal" : "clear",
123
+ # processes
124
+ "show processes" : "ps aux",
125
+ "list processes" : "ps aux",
126
+ "show running processes" : "ps aux",
127
+ "list running processes" : "ps aux",
128
+ "what processes are running" : "ps aux",
129
+ "running processes" : "ps aux",
130
+ # network
131
+ "show ip" : "ifconfig",
132
+ "show ip address" : "ifconfig",
133
+ "what is my ip" : "ifconfig",
134
+ "ip address" : "ifconfig",
135
+ "network info" : "ifconfig",
136
+ "show network" : "ifconfig",
137
+ # system info
138
+ "computer name" : "hostname",
139
+ "show computer name" : "hostname",
140
+ "hostname" : "hostname",
141
+ "current user" : "whoami",
142
+ "show current user" : "whoami",
143
+ "who am i" : "whoami",
144
+ "logged in user" : "whoami",
145
+ "system info" : "uname -a",
146
+ "show system info" : "uname -a",
147
+ "environment variables" : "env",
148
+ "show environment variables" : "env",
149
+ "show env" : "env",
150
+ # date/time
151
+ "show date" : "date",
152
+ "show time" : "date",
153
+ "date" : "date",
154
+ "time" : "date",
155
+ "show date and time" : "date",
156
+ # disk
157
+ "disk space" : "df -h",
158
+ "show disk space" : "df -h",
159
+ "check disk space" : "df -h",
160
+ "free space" : "df -h",
161
+ }
162
+
163
+
164
+ def _lookup(user_query: str) -> str | None:
165
+ """
166
+ Normalize the query and check against the lookup table.
167
+ Returns the command if found, None if not.
168
+ Two strategies:
169
+ 1. Exact match after normalization
170
+ 2. Partial match — query contains a known phrase or vice versa
171
+ """
172
+ table = WINDOWS_COMMANDS if CURRENT_OS == "Windows" else MAC_COMMANDS
173
+ q = user_query.lower().strip()
174
+
175
+ # Strategy 1: exact match
176
+ if q in table:
177
+ return table[q]
178
+
179
+ # Strategy 2: partial match
180
+ for phrase, cmd in table.items():
181
+ if phrase in q or q in phrase:
182
+ return cmd
183
+
184
+ return None
185
+
186
+
187
+ # ─── Main functions ───────────────────────────────────────────────────────────
188
+
189
+ def get_command_from_text(user_query):
190
+ """
191
+ 1. Check lookup table first — instant and reliable for everyday commands.
192
+ 2. Fall back to model only for complex queries it was trained on
193
+ (git operations, find pipelines, bulk renames, etc.)
194
+ """
195
+ # Fast path — lookup table
196
+ quick = _lookup(user_query)
197
+ if quick:
198
+ return quick
199
+
200
+ # Slow path — model (for complex queries)
201
+ try:
202
+ response = client.generate(
203
+ model=MODEL_NAME,
204
+ prompt=f"Instruct: {user_query}\nOutput:",
205
+ options={
206
+ "temperature": 0.1,
207
+ "stop": ["Instruct:", "Output:", "<|endoftext|>"]
208
+ }
209
+ )
210
+ cmd = response['response'].strip()
211
+ cmd = cmd.replace("```", "").replace("`", "").strip()
212
+ cmd = cmd.splitlines()[0].strip()
213
+ return cmd
214
+ except Exception as e:
215
+ return f"Error: {e}"
216
+
217
+
218
+ def classify_process_importance(pid: int, process_name: str) -> str:
219
+ """
220
+ Asks the LLM whether a process is safe to kill or critical to the system.
221
+ Used as Layer 3 fallback in anomaly.py when Layers 1 & 2 are inconclusive.
222
+
223
+ Returns:
224
+ 'safe' — process can be safely terminated
225
+ 'critical' — process is important, should not be killed
226
+ """
227
+ try:
228
+ response = client.generate(
229
+ model=MODEL_NAME,
230
+ prompt=(
231
+ f"Instruct: Is the process '{process_name}' (PID: {pid}) "
232
+ f"safe to terminate on a running system, or is it a critical "
233
+ f"system/OS process that should not be killed? "
234
+ f"Reply with exactly one word: safe or critical.\nOutput:"
235
+ ),
236
+ options={
237
+ "temperature": 0.1,
238
+ "stop": ["Instruct:", "Output:", "<|endoftext|>"]
239
+ }
240
+ )
241
+ result = response['response'].strip().lower().split()[0]
242
+ if result in ('safe', 'critical'):
243
+ return result
244
+ # If the model returns something unexpected, fall back conservatively
245
+ return 'critical'
246
+ except Exception:
247
+ return 'critical'
248
+
249
+
250
+ def explain_process_by_pid(pid, process_name):
251
+ """
252
+ Explains what a process does.
253
+ Uses the exact Instruct/Output format the model was trained on.
254
+ """
255
+ try:
256
+ response = client.generate(
257
+ model=MODEL_NAME,
258
+ prompt=f"Instruct: Explain what the process '{process_name}' (PID: {pid}) does in 2-3 simple sentences.\nOutput:",
259
+ options={
260
+ "temperature": 0.6,
261
+ "stop": ["Instruct:", "Output:", "<|endoftext|>"]
262
+ }
263
+ )
264
+ return response['response'].strip()
265
+ except Exception as e:
266
+ return f"Could not generate explanation: {e}"
@@ -0,0 +1,288 @@
1
+ # ------------------------------------Progress bar-------------------------------------
2
+ # from rich.progress import track
3
+ # import time
4
+ # for step in track(range(10), description="Processing..."):
5
+ # time.sleep(0.2)
6
+
7
+ # import curses, time
8
+
9
+ # def bounce(stdscr):
10
+ # stdscr.clear()
11
+ # msg = "Hello!"
12
+ # x = y = 0
13
+ # dx = dy = 1
14
+ # while time.time() < time.time() + 1: # Run for 10 seconds
15
+ # stdscr.clear()
16
+ # stdscr.addstr(y, x, msg)
17
+ # stdscr.refresh()
18
+ # y, x = y + dy, x + dx
19
+ # if y == 0 or y == curses.LINES - 1:
20
+ # dy *= -1
21
+ # if x == 0 or x == curses.COLS - len(msg):
22
+ # dx *= -1
23
+ # time.sleep(0.05)
24
+
25
+ # curses.wrapper(bounce)
26
+
27
+ # from rich.console import Console
28
+ # import time
29
+
30
+ # console = Console()
31
+ # with console.status("[bold green]Processing..."):
32
+ # time.sleep(5) # Simulated work
33
+
34
+ # console.print("[bold cyan]All done![/bold cyan]")
35
+
36
+ # ------------------------------------Loading-------------------------------------
37
+ # import itertools
38
+ # import time
39
+ # import sys
40
+
41
+ # spinner = itertools.cycle(['.', '..', '...', '....'])
42
+ # end_time = time.time() + 5 # run for 5 seconds
43
+
44
+ # while time.time() < end_time:
45
+ # sys.stdout.write('\rLoading' + next(spinner))
46
+ # sys.stdout.flush()
47
+ # time.sleep(0.5)
48
+
49
+ # print('\rDone! ') # clear the line
50
+
51
+ #--------------------------------------------------------------I am CLI--------------------------------------------------------------
52
+ # from rich.console import Console
53
+ # from rich.panel import Panel
54
+ # from rich.text import Text
55
+
56
+ # console = Console()
57
+
58
+ # # ASCII Art representing "I AM CLI" (edit as you like for shape/size)
59
+ # ascii_text1 = """
60
+ # ██╗  ░█████╗░███╗░░░███╗  ░█████╗░██╗ ██╗
61
+ # ██║  ██╔══██╗████╗░████║  ██╔══██╗██║ ██║
62
+ # ██║  ███████║██╔████╔██║  ██║░░╚═╝██║░░░░░██║
63
+ # ██║  ██╔══██║██║╚██╔╝██║  ██║░░██╗██║░░░░░██║
64
+ # ██║  ██║░░██║██║░╚═╝░██║  ╚█████╔╝███████╗██║
65
+ # ╚═╝  ╚═╝░░╚═╝╚═╝░░░░░╚═╝  ░╚════╝░╚══════╝╚═╝
66
+ # """
67
+ # ascii_text = """
68
+ # ██╗   █████╗ ███╗ ███╗   █████╗ ██╗ ██╗
69
+ # ██║  ██╔══██╗ ████╗ ████║  ██╔══██╗ ██║ ██║
70
+ # ██║  ███████║ ██╔████╔██║  ██║ ╚═╝ ██║ ██║
71
+ # ██║  ██╔══██║ ██║╚██╔╝██║  ██║ ██╗ ██║ ██║
72
+ # ██║  ██║ ██║ ██║ ╚═╝ ██║  ╚█████╔╝ ███████╗ ██║
73
+ # ╚═╝  ╚═╝ ╚═╝ ╚═╝ ╚═╝   ╚════╝ ╚══════╝ ╚═╝
74
+ # """
75
+
76
+ # ascii_text2 = """
77
+
78
+ # ░▒▓█▓▒░ ░▒▓██████▓▒░░▒▓██████████████▓▒░ ░▒▓██████▓▒░░▒▓█▓▒░ ░▒▓█▓▒░
79
+ # ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░
80
+ # ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░
81
+ # ░▒▓█▓▒░ ░▒▓████████▓▒░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░
82
+ # ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░
83
+ # ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░
84
+ # ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░ ░▒▓██████▓▒░░▒▓████████▓▒░▒▓█▓▒░
85
+
86
+
87
+ # """
88
+
89
+ # # Define gradient colors (start: blue, end: pink)
90
+ # start_color = (173, 216, 230) # lightBlue
91
+ # end_color = (255, 105, 180) # Pink
92
+
93
+ # def interpolate_color(start, end, t):
94
+ # return tuple(
95
+ # int(start[i] + (end[i] - start[i]) * t) for i in range(3)
96
+ # )
97
+
98
+ # # Build the banner with per-character gradient
99
+ # lines = ascii_text.splitlines()
100
+ # banner_text = Text()
101
+ # for line in lines:
102
+ # for i, char in enumerate(line):
103
+ # total_chars = len(line)
104
+ # t = i / max(total_chars - 1, 1)
105
+ # r, g, b = interpolate_color(start_color, end_color, t)
106
+ # color_hex = f"#{r:02x}{g:02x}{b:02x}"
107
+ # banner_text.append(char, style=color_hex)
108
+ # banner_text.append("\n")
109
+
110
+ # console.print(banner_text)
111
+
112
+ # Print with a panel border
113
+ # console.print(Panel.fit(banner_text, border_style="cyan", padding=(1, 4)))
114
+
115
+ # console.print("\n[bold green]Welcome to My Custom CLI!\n")
116
+
117
+
118
+ # mybanner.py
119
+ from rich.console import Console
120
+ from rich.text import Text
121
+
122
+ class Animations:
123
+ def __init__(self):
124
+ """Initialize the animation settings."""
125
+ self.console = Console()
126
+
127
+ # Default ASCII art for the banner
128
+ self.ascii_text1 = """
129
+ ██╗   █████╗ ███╗ ███╗   █████╗ ██╗ ██╗
130
+ ██║  ██╔══██╗ ████╗ ████║  ██╔══██╗ ██║ ██║
131
+ ██║  ███████║ ██╔████╔██║  ██║ ╚═╝ ██║ ██║
132
+ ██║  ██╔══██║ ██║╚██╔╝██║  ██║ ██╗ ██║ ██║
133
+ ██║  ██║ ██║ ██║ ╚═╝ ██║  ╚█████╔╝ ███████╗ ██║
134
+ ╚═╝  ╚═╝ ╚═╝ ╚═╝ ╚═╝   ╚════╝ ╚══════╝ ╚═╝
135
+ """
136
+ self.ascii_text2 = """
137
+
138
+ ░▒▓█▓▒░ ░▒▓██████▓▒░░▒▓██████████████▓▒░ ░▒▓██████▓▒░░▒▓█▓▒░ ░▒▓█▓▒░
139
+ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░
140
+ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░
141
+ ░▒▓█▓▒░ ░▒▓████████▓▒░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░
142
+ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░
143
+ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░
144
+ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░ ░▒▓██████▓▒░░▒▓████████▓▒░▒▓█▓▒░
145
+
146
+ """
147
+ self.ascii_text3 = """
148
+
149
+ ██╗███╗░░██╗░██████╗██╗██████╗░███████╗  ░█████╗░██╗░░░░░██╗
150
+ ██║████╗░██║██╔════╝██║██╔══██╗██╔════╝  ██╔══██╗██║░░░░░██║
151
+ ██║██╔██╗██║╚█████╗░██║██║░░██║█████╗░░  ██║░░╚═╝██║░░░░░██║
152
+ ██║██║╚████║░╚═══██╗██║██║░░██║██╔══╝░░  ██║░░██╗██║░░░░░██║
153
+ ██║██║░╚███║██████╔╝██║██████╔╝███████╗  ╚█████╔╝███████╗██║
154
+ ╚═╝╚═╝░░╚══╝╚═════╝░╚═╝╚═════╝░╚══════╝  ░╚════╝░╚══════╝╚═╝
155
+
156
+ """
157
+ self.ascii_text4 = r'''
158
+ /$$$$$$ /$$ /$$ /$$$$$$ /$$ /$$$$$$
159
+ |_ $$_/ |__/ | $$ /$$__ $$| $$ |_ $$_/
160
+ | $$ /$$$$$$$ /$$$$$$$ /$$ /$$$$$$$ /$$$$$$ | $$ \__/| $$ | $$
161
+ | $$ | $$__ $$ /$$_____/| $$ /$$__ $$ /$$__ $$ | $$ | $$ | $$
162
+ | $$ | $$ \ $$| $$$$$$ | $$| $$ | $$| $$$$$$$$ | $$ | $$ | $$
163
+ | $$ | $$ | $$ \____ $$| $$| $$ | $$| $$_____/ | $$ $$| $$ | $$
164
+ /$$$$$$| $$ | $$ /$$$$$$$/| $$| $$$$$$$| $$$$$$$ | $$$$$$/| $$$$$$$$ /$$$$$$
165
+ |______/|__/ |__/|_______/ |__/ \_______/ \_______/ \______/ |________/|______/
166
+
167
+ '''
168
+
169
+ self.ascii_text5 = r"""
170
+ .-./`) ,---. .--. .-'''-. .-./`) ______ .-''-. _______ .---. .-./`)
171
+ \ .-.')| \ | | / _ \\ .-.')| _ `''. .'_ _ \ / __ \ | ,_| \ .-.')
172
+ / `-' \| , \ | | (`' )/`--'/ `-' \| _ | ) _ \ / ( ` ) ' | ,_/ \__),-./ ) / `-' \
173
+ `-'`"`| |\_ \| |(_ o _). `-'`"`|( ''_' ) |. (_ o _) | ,-./ ) \ '_ '`) `-'`"`
174
+ .---. | _( )_\ | (_,_). '. .---. | . (_) `. || (_,_)___| \ '_ '`) > (_) ) .---.
175
+ | | | (_ o _) |.---. \ : | | |(_ ._) '' \ .---. > (_) ) __( . .-' | |
176
+ | | | (_,_)\ |\ `-' | | | | (_.\.' / \ `-' / ( . .-'_/ )`-'`-'|___ | |
177
+ | | | | | | \ / | | | .' \ / `-'`-' / | \| |
178
+ '---' '--' '--' `-...-' '---' '-----'` `'-..-' `._____.' `--------`'---'
179
+ """
180
+ self.ascii_text6 = r"""
181
+ .-') _ .-') _ .-') _ ('-.
182
+ ( OO ) ) ( OO ). ( ( OO) ) _( OO)
183
+ ,-.-') ,--./ ,--,' (_)---\_) ,-.-') \ .'_ (,------. .-----. ,--. ,-.-')
184
+ | |OO)| \ | |\ / _ | | |OO),`'--..._) | .---' ' .--./ | |.-') | |OO)
185
+ | | \| \| | )\ :` `. | | \| | \ ' | | | |('-. | | OO ) | | \
186
+ | |(_/| . |/ '..`''.) | |(_/| | ' |(| '--. /_) |OO )| |`-' | | |(_/
187
+ ,| |_.'| |\ | .-._) \ ,| |_.'| | / : | .--' || |`-'|(| '---.',| |_.'
188
+ (_| | | | \ | \ /(_| | | '--' / | `---. (_' '--'\ | |(_| |
189
+ `--' `--' `--' `-----' `--' `-------' `------' `-----' `------' `--'
190
+
191
+ """
192
+
193
+ self.ascii_text7 = r"""
194
+ __/\\\\\\\\\\\__________________________________________/\\\__________________________________/\\\\\\\\\__/\\\______________/\\\\\\\\\\\_
195
+ _\/////\\\///__________________________________________\/\\\_______________________________/\\\////////__\/\\\_____________\/////\\\///__
196
+ _____\/\\\_________________________________/\\\________\/\\\_____________________________/\\\/___________\/\\\_________________\/\\\_____
197
+ _____\/\\\______/\\/\\\\\\____/\\\\\\\\\\_\///_________\/\\\______/\\\\\\\\_____________/\\\_____________\/\\\_________________\/\\\_____
198
+ _____\/\\\_____\/\\\////\\\__\/\\\//////___/\\\___/\\\\\\\\\____/\\\/////\\\___________\/\\\_____________\/\\\_________________\/\\\_____
199
+ _____\/\\\_____\/\\\__\//\\\_\/\\\\\\\\\\_\/\\\__/\\\////\\\___/\\\\\\\\\\\____________\//\\\____________\/\\\_________________\/\\\_____
200
+ _____\/\\\_____\/\\\___\/\\\_\////////\\\_\/\\\_\/\\\__\/\\\__\//\\///////______________\///\\\__________\/\\\_________________\/\\\_____
201
+ __/\\\\\\\\\\\_\/\\\___\/\\\__/\\\\\\\\\\_\/\\\_\//\\\\\\\/\\__\//\\\\\\\\\\______________\////\\\\\\\\\_\/\\\\\\\\\\\\\\\__/\\\\\\\\\\\_
202
+ _\///////////__\///____\///__\//////////__\///___\///////\//____\//////////__________________\/////////__\///////////////__\///////////__
203
+
204
+ """
205
+
206
+ self.ascii_text8 = r"""
207
+ ___ ___
208
+ .-. .-. ( ) ( ) .-.
209
+ ( __) ___ .-. .--. ( __) .-.| | .--. .--. | | ( __)
210
+ (''") ( ) \ / _ \ (''") / \ | / \ / \ | | (''")
211
+ | | | .-. . . .' `. ; | | | .-. | | .-. ; | .-. ; | | | |
212
+ | | | | | | | ' | | | | | | | | | | | | | |(___) | | | |
213
+ | | | | | | _\_`.(___) | | | | | | | |/ | | | | | | |
214
+ | | | | | | ( ). '. | | | | | | | ' _.' | | ___ | | | |
215
+ | | | | | | | | `\ | | | | ' | | | .'.-. | '( ) | | | |
216
+ | | | | | | ; '._,' ' | | ' `-' / ' `-' / ' `-' | | | | |
217
+ (___) (___)(___) '.___.' (___) `.__,' `.__.' `.__,' (___) (___)
218
+
219
+ """
220
+
221
+ self.ascii_text9 = r'''
222
+ ___ _ _ ___ _ ___
223
+ |_ _| _ _ ___ (_) __| | ___ o O O / __| | | |_ _|
224
+ | | | ' \ (_-< | | / _` | / -_) o | (__ | |__ | |
225
+ |___| |_||_| /__/_ _|_|_ \__,_| \___| TS__[O] \___| |____| |___|
226
+ _|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""| {======|_|"""""|_|"""""|_|"""""|
227
+ "`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'./o--000'"`-0-0-'"`-0-0-'"`-0-0-'
228
+ '''
229
+
230
+ self.ascii_text10 = r"""
231
+ ██▓ ███▄ █ ██████ ██▓▓█████▄ ▓█████ ▄████▄ ██▓ ██▓
232
+ ▓██▒ ██ ▀█ █ ▒██ ▒ ▓██▒▒██▀ ██▌▓█ ▀ ▒██▀ ▀█ ▓██▒ ▓██▒
233
+ ▒██▒▓██ ▀█ ██▒░ ▓██▄ ▒██▒░██ █▌▒███ ▒▓█ ▄ ▒██░ ▒██▒
234
+ ░██░▓██▒ ▐▌██▒ ▒ ██▒░██░░▓█▄ ▌▒▓█ ▄ ▒▓▓▄ ▄██▒▒██░ ░██░
235
+ ░██░▒██░ ▓██░▒██████▒▒░██░░▒████▓ ░▒████▒ ▒ ▓███▀ ░░██████▒░██░
236
+ ░▓ ░ ▒░ ▒ ▒ ▒ ▒▓▒ ▒ ░░▓ ▒▒▓ ▒ ░░ ▒░ ░ ░ ░▒ ▒ ░░ ▒░▓ ░░▓
237
+ ▒ ░░ ░░ ░ ▒░░ ░▒ ░ ░ ▒ ░ ░ ▒ ▒ ░ ░ ░ ░ ▒ ░ ░ ▒ ░ ▒ ░
238
+ ▒ ░ ░ ░ ░ ░ ░ ░ ▒ ░ ░ ░ ░ ░ ░ ░ ░ ▒ ░
239
+ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░
240
+ ░ ░
241
+ """
242
+
243
+ self.ascii_text11 = '''
244
+ ,, ,,
245
+ `7MMF' db `7MM .g8"""bgd `7MMF' `7MMF'
246
+ MM MM .dP' `M MM MM
247
+ MM `7MMpMMMb. ,pP"Ybd `7MM ,M""bMM .gP"Ya dM' ` MM MM
248
+ MM MM MM 8I `" MM ,AP MM ,M' Yb MM MM MM
249
+ MM MM MM `YMMMa. MM 8MI MM 8M"""""" MM. MM , MM
250
+ MM MM MM L. I8 MM `Mb MM YM. , `Mb. ,' MM ,M MM
251
+ .JMML..JMML JMML.M9mmmP' .JMML.`Wbmd"MML.`Mbmmd' `"bmmmd' .JMMmmmmMMM .JMML.
252
+ '''
253
+ # Gradient colors (start: blue, end: pink)
254
+ self.start_color = (173, 216, 230) # Light blue
255
+ self.end_color = (255, 105, 180) # Pink
256
+
257
+ def banner(self):
258
+ """Print the gradient ASCII banner."""
259
+
260
+ def interpolate_color(start, end, t):
261
+ """Linearly interpolate between two RGB colors."""
262
+ return tuple(
263
+ int(start[j] + (end[j] - start[j]) * t) for j in range(3)
264
+ )
265
+ for i in range(1, 12):
266
+ ascii_text = getattr(self, f"ascii_text{i}")
267
+ lines = ascii_text.splitlines()
268
+ banner_text = Text()
269
+
270
+ for line in lines:
271
+ for char_idx, char in enumerate(line):
272
+ total_chars = len(line)
273
+ t = char_idx / max(total_chars - 1, 1)
274
+ r, g, b = interpolate_color(self.start_color, self.end_color, t)
275
+ color_hex = f"#{r:02x}{g:02x}{b:02x}"
276
+ banner_text.append(char, style=color_hex)
277
+ banner_text.append("\n")
278
+
279
+ self.console.print(banner_text)
280
+ # self.console.print("\n[bold green]Welcome to my CLI Baby!\n")
281
+
282
+
283
+ # -------- Example usage --------
284
+ if __name__ == "__main__":
285
+ anim = Animations()
286
+ anim.banner()
287
+ # print("Welcome to My CLI!")
288
+