webtools-cli 1.3.1__tar.gz → 1.3.3__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: webtools-cli
3
- Version: 1.3.1
3
+ Version: 1.3.3
4
4
  Summary: Advanced Web Intelligence & Scraping Toolkit with CLI and Web UI
5
5
  Author: Abhinav Adarsh
6
6
  License-Expression: MIT
@@ -98,6 +98,12 @@ pip install webtools-cli --upgrade
98
98
  - **Image Forensics**: CLI-based Error Level Analysis (ELA) and AI-likelihood detection.
99
99
  - **Honeypot Detector**: Identifies hidden traps and anti-bot measures (Cloudflare/CAPTCHAs).
100
100
 
101
+ ### AI Generation & Creative Tools
102
+ - **ComfyUI Integration**: Seamlessly launch a full Stable Diffusion interface directly from the CLI.
103
+ - **Anime Studio (Anima)**: Specialized "Make Anime" mode with automated Anima model downloads (UNET, Text Encoder, VAE) from Hugging Face.
104
+ - **Colab Optimized**: Pre-configured for Google Colab with T4 GPU support and automated environment setup.
105
+ - **Secure Tunnels**: Instant Cloudflare tunnel generation for remote UI access with live logging.
106
+
101
107
  ### Modern Experience
102
108
  - **Premium Visual Engine**: Sleek glassmorphism, fluid gradients, and premium Motion One animations.
103
109
  - **Responsive Preview**: Live rendering scaling for desktop and mobile viewpoints.
@@ -128,6 +134,7 @@ Navigate the suite using quick terminal commands:
128
134
  | `/web` | `/w` | Launch **Web UI** (Cloudflare Tunnel + QR) |
129
135
  | `/cli` | `/c` | Launch **CLI Intelligence** scan |
130
136
  | `/image` | `/i` | **Image Forensics** & AI Likelihood |
137
+ | `/cui` | - | **ComfyUI** AI Generation (GPU Required) |
131
138
  | `/history`| `/hi`| View and manage scan history |
132
139
  | `/help` | `/h` | Show full command documentation |
133
140
  | `/clear` | - | Purge all locally scraped data |
@@ -60,6 +60,12 @@ pip install webtools-cli --upgrade
60
60
  - **Image Forensics**: CLI-based Error Level Analysis (ELA) and AI-likelihood detection.
61
61
  - **Honeypot Detector**: Identifies hidden traps and anti-bot measures (Cloudflare/CAPTCHAs).
62
62
 
63
+ ### AI Generation & Creative Tools
64
+ - **ComfyUI Integration**: Seamlessly launch a full Stable Diffusion interface directly from the CLI.
65
+ - **Anime Studio (Anima)**: Specialized "Make Anime" mode with automated Anima model downloads (UNET, Text Encoder, VAE) from Hugging Face.
66
+ - **Colab Optimized**: Pre-configured for Google Colab with T4 GPU support and automated environment setup.
67
+ - **Secure Tunnels**: Instant Cloudflare tunnel generation for remote UI access with live logging.
68
+
63
69
  ### Modern Experience
64
70
  - **Premium Visual Engine**: Sleek glassmorphism, fluid gradients, and premium Motion One animations.
65
71
  - **Responsive Preview**: Live rendering scaling for desktop and mobile viewpoints.
@@ -90,6 +96,7 @@ Navigate the suite using quick terminal commands:
90
96
  | `/web` | `/w` | Launch **Web UI** (Cloudflare Tunnel + QR) |
91
97
  | `/cli` | `/c` | Launch **CLI Intelligence** scan |
92
98
  | `/image` | `/i` | **Image Forensics** & AI Likelihood |
99
+ | `/cui` | - | **ComfyUI** AI Generation (GPU Required) |
93
100
  | `/history`| `/hi`| View and manage scan history |
94
101
  | `/help` | `/h` | Show full command documentation |
95
102
  | `/clear` | - | Purge all locally scraped data |
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "webtools-cli"
7
- version = "1.3.1"
7
+ version = "1.3.3"
8
8
  description = "Advanced Web Intelligence & Scraping Toolkit with CLI and Web UI"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -1,6 +1,23 @@
1
1
  import sys,os,re,requests,random,subprocess,time,socket,shutil,json,zipfile,atexit,concurrent.futures,threading,qrcode,logging,queue,urllib3,base64,traceback,csv,io,mtranslate,hashlib,uuid
2
2
  sys.dont_write_bytecode = True
3
3
 
4
+ def is_colab():
5
+ """Detects if we are running in a Google Colab environment."""
6
+ return 'COLAB_GPU' in os.environ or os.path.exists('/content')
7
+
8
+ def check_gpu():
9
+ """Checks if a GPU is available on the system."""
10
+ try:
11
+ import torch
12
+ return torch.cuda.is_available()
13
+ except ImportError:
14
+ try:
15
+ # Fallback to nvidia-smi check
16
+ subprocess.check_output(['nvidia-smi'], stderr=subprocess.STDOUT)
17
+ return True
18
+ except:
19
+ return False
20
+
4
21
  # Enforce UTF-8 encoding for standard output to avoid UnicodeEncodeError on Windows (Emojis)
5
22
  if sys.stdout.encoding and sys.stdout.encoding.lower() != 'utf-8':
6
23
  try:
@@ -3480,9 +3497,78 @@ def print_image_forensics_report(data):
3480
3497
 
3481
3498
  print(f"{c_b}╚{'═'*(total_w-2)}╝{R}\n")
3482
3499
 
3500
+ def run_comfyui_mode():
3501
+ """Start ComfyUI session with GPU and Colab detection"""
3502
+ on_colab = is_colab()
3503
+ has_gpu = check_gpu()
3504
+
3505
+ if not on_colab and not has_gpu:
3506
+ print(f"\n{Fore.RED}❌ ERROR: GPU not detected! ComfyUI requires a GPU to run.{Style.RESET_ALL}")
3507
+ input("\nPress Enter to return to main menu...")
3508
+ return
3509
+
3510
+ while True:
3511
+ os.system('cls' if os.name == 'nt' else 'clear')
3512
+ print(f"\n{Fore.CYAN}--- ComfyUI Launcher ---{Style.RESET_ALL}")
3513
+ print(f" {Fore.CYAN}[1]{Style.RESET_ALL} Launch Standard ComfyUI")
3514
+ print(f" {Fore.CYAN}[2]{Style.RESET_ALL} Launch Anime ComfyUI (Anima Model)")
3515
+ print(f" {Fore.RED}[b]{Style.RESET_ALL} Back to main menu")
3516
+
3517
+ cui_choice = input(f"\n{Fore.LIGHTGREEN_EX}> {Style.RESET_ALL}").strip().lower()
3518
+
3519
+ if cui_choice == 'b':
3520
+ return
3521
+
3522
+ if cui_choice not in ['1', '2']:
3523
+ continue
3524
+
3525
+ if on_colab:
3526
+ print(f"\n{Fore.YELLOW}⚠️ Google Colab Detected!{Style.RESET_ALL}")
3527
+ print(f"{Fore.CYAN}👉 IMPORTANT: Switch to T4 GPU (Edit -> Notebook settings -> T4 GPU).{Style.RESET_ALL}")
3528
+ time.sleep(2)
3529
+
3530
+ print(f"\n{Fore.GREEN}🚀 Starting ComfyUI Setup & Session...{Style.RESET_ALL}")
3531
+
3532
+ comfy_dir = os.path.join(os.path.dirname(PACKAGE_DIR), "ComfyUI")
3533
+
3534
+ # 1. Handle Model Downloads if Anime chosen
3535
+ if cui_choice == '2':
3536
+ print(f"\n{Fore.MAGENTA}✨ Configuring Anime Model (Anima)...{Style.RESET_ALL}")
3537
+ download_env = os.environ.copy()
3538
+ download_env["UNET_DIFFUSION_URLS"] = "https://huggingface.co/circlestone-labs/Anima/resolve/main/split_files/diffusion_models/anima-preview3-base.safetensors"
3539
+ download_env["TEXT_ENCODER_URLS"] = "https://huggingface.co/circlestone-labs/Anima/resolve/main/split_files/text_encoders/qwen_3_06b_base.safetensors"
3540
+ download_env["VAE_URLS"] = "https://huggingface.co/circlestone-labs/Anima/resolve/main/split_files/vae/qwen_image_vae.safetensors"
3541
+
3542
+ # Run comfyu.py with these env vars
3543
+ downloader_script = os.path.join(comfy_dir, "comfyu.py")
3544
+ if os.path.exists(downloader_script):
3545
+ subprocess.run([sys.executable, downloader_script], env=download_env)
3546
+ else:
3547
+ print(f"{Fore.RED}Error: ComfyUI/comfyu.py not found.{Style.RESET_ALL}")
3548
+
3549
+ # 2. Launch UI
3550
+ ui_script = os.path.join(comfy_dir, "ui.py")
3551
+ if os.path.exists(ui_script):
3552
+ print(f"\n{Fore.CYAN}--- Initializing ComfyUI Interface ---{Style.RESET_ALL}")
3553
+ try:
3554
+ subprocess.run([sys.executable, ui_script])
3555
+ except Exception as e:
3556
+ print(f"{Fore.RED}Error running ComfyUI: {e}{Style.RESET_ALL}")
3557
+ else:
3558
+ print(f"{Fore.RED}Error: ComfyUI/ui.py not found at {ui_script}{Style.RESET_ALL}")
3559
+
3560
+ input("\nPress Enter to return to ComfyUI menu...")
3561
+
3483
3562
  def main_launcher():
3484
3563
  """Mode selection menu on startup"""
3485
3564
  menu_commands = ['/web', '/cli', '/image', '/adb', '/help', '/clear', '/quit', '/history', '/w', '/c', '/i', '/a', '/h', '/q', '/hi', '--help']
3565
+
3566
+ # Conditional ComfyUI visibility
3567
+ has_gpu = check_gpu()
3568
+ on_colab = is_colab()
3569
+ if has_gpu or on_colab:
3570
+ menu_commands.extend(['/cui'])
3571
+
3486
3572
  setup_autocomplete(menu_commands)
3487
3573
 
3488
3574
  while True:
@@ -3509,11 +3595,19 @@ def main_launcher():
3509
3595
  run_cli_mode()
3510
3596
  elif choice in ['/image', '/i']:
3511
3597
  run_image_forensics_mode()
3598
+ elif choice in ['/cui']:
3599
+ if has_gpu or on_colab:
3600
+ run_comfyui_mode()
3601
+ else:
3602
+ print(f"\n{Fore.RED}⚠️ Unknown Command: {choice}")
3603
+ time.sleep(1.5)
3512
3604
  elif choice in ['/help', '/h', '--help']:
3513
3605
  print(f"\n{Fore.CYAN if COLOR_SUPPORT else ''}Available Commands:")
3514
3606
  print(f" {Fore.CYAN}/web{Style.RESET_ALL} - Launches the web engine for browser-based auditing. (Alias: /w)")
3515
3607
  print(f" {Fore.CYAN}/cli{Style.RESET_ALL} - Runs a deep-scan intelligence report in the terminal. (Alias: /c)")
3516
3608
  print(f" {Fore.CYAN}/image{Style.RESET_ALL} - Local/Remote Image Forensics & AI detection. (Alias: /i)")
3609
+ if has_gpu or on_colab:
3610
+ print(f" {Fore.CYAN}/cui{Style.RESET_ALL} - Start ComfyUI session for AI generation.")
3517
3611
  print(f" {Fore.CYAN}/adb{Style.RESET_ALL} - ADB Bloatware Remover for Android devices. (Alias: /a)")
3518
3612
  print(f" {Fore.CYAN}/clear{Style.RESET_ALL} - Purges the 'webfiles/scraped' directory and clears screen.")
3519
3613
  print(f" {Fore.CYAN}/history{Style.RESET_ALL} - Shows command history. (Alias: /hi)")
@@ -733,6 +733,13 @@
733
733
  </svg>
734
734
  <span class="hidden md:inline">Videos</span>
735
735
  </button>
736
+ <button onclick="switchTab('seo')" id="tab-seo"
737
+ class="tab-btn flex items-center gap-2 px-3 md:px-4 py-2 text-sm font-semibold text-slate-300 hover:text-white transition-all whitespace-nowrap">
738
+ <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
739
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"></path>
740
+ </svg>
741
+ <span class="hidden md:inline">Analytics</span>
742
+ </button>
736
743
  </div>
737
744
  <div id="main-content-container"
738
745
  class="glass-dark rounded-2xl p-3 border border-white/5 transition-all duration-300 tab-gradient-border">
@@ -1460,6 +1467,66 @@
1460
1467
  </button>
1461
1468
  </div>
1462
1469
  </dialog>
1470
+
1471
+ <!-- About Floating Button -->
1472
+ <button onclick="document.getElementById('about-modal').showModal()"
1473
+ class="fixed bottom-6 right-6 p-3 bg-white/10 backdrop-blur-md border border-white/10 hover:bg-white/20 hover:border-white/20 text-indigo-300 hover:text-indigo-200 rounded-full shadow-lg hover:shadow-[0_0_15px_rgba(255,255,255,0.1)] hover:scale-110 transition-all z-50 group flex items-center justify-center">
1474
+ <svg class="w-5 h-5" fill="currentColor" stroke="none" viewBox="0 0 24 24">
1475
+ <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"/>
1476
+ </svg>
1477
+ <span class="absolute right-full mr-3 bg-slate-900/80 backdrop-blur-md text-slate-200 text-xs px-2.5 py-1 rounded-md opacity-0 group-hover:opacity-100 transition-opacity whitespace-nowrap border border-white/10 pointer-events-none shadow-xl">About</span>
1478
+ </button>
1479
+
1480
+ <!-- About Modal -->
1481
+ <dialog id="about-modal"
1482
+ class="backdrop:bg-black/60 bg-transparent glass-dark border border-white/10 rounded-2xl p-0 w-[90vw] max-w-md shadow-[0_0_50px_rgba(0,0,0,0.5)] focus:outline-none m-auto"
1483
+ onclick="if(event.target === this) this.close()">
1484
+ <div class="relative overflow-hidden rounded-2xl">
1485
+ <!-- Header -->
1486
+ <div class="bg-white/5 p-6 pb-8 text-center border-b border-white/10 relative overflow-hidden">
1487
+ <div class="absolute inset-0 bg-gradient-to-b from-indigo-500/15 to-transparent"></div>
1488
+ <div class="relative z-10 flex justify-center mb-3">
1489
+ <img src="https://i.postimg.cc/Gh7Gnn18/Web-Tools.png" alt="WebTools Logo" class="w-16 h-16 object-contain drop-shadow-[0_0_15px_rgba(79,70,229,0.4)] hover:scale-110 transition-transform">
1490
+ </div>
1491
+ <h2 class="relative z-10 text-xl font-bold text-white mb-1">WebTools CLI</h2>
1492
+
1493
+ <button onclick="document.getElementById('about-modal').close()"
1494
+ class="absolute top-4 right-4 p-2 bg-white/5 hover:bg-white/10 text-slate-400 hover:text-white rounded-full transition-all z-20">
1495
+ <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
1496
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>
1497
+ </svg>
1498
+ </button>
1499
+ </div>
1500
+
1501
+ <!-- Content -->
1502
+ <div class="p-6">
1503
+ <p class="text-slate-300 text-sm leading-relaxed mb-6 text-center drop-shadow-md">
1504
+ An advanced, self-hosted web intelligence suite for researchers and developers. OSINT, SEO, AI Analysis, and Forensics—all from your terminal.
1505
+ </p>
1506
+
1507
+ <div class="grid grid-cols-2 gap-3 mb-6">
1508
+ <div class="bg-white/5 p-3 rounded-xl border border-white/10 text-center flex flex-col items-center shadow-lg">
1509
+ <div class="text-indigo-400 mb-1"><svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4"></path></svg></div>
1510
+ <h4 class="text-[10px] font-bold text-white uppercase tracking-wider mb-0.5">Author</h4>
1511
+ <p class="text-xs text-slate-300 font-medium whitespace-nowrap overflow-hidden text-ellipsis w-full drop-shadow-md">Abhinav Adarsh</p>
1512
+ </div>
1513
+ <div class="bg-white/5 p-3 rounded-xl border border-white/10 text-center flex flex-col items-center shadow-lg">
1514
+ <div class="text-indigo-400 mb-1"><svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"></path></svg></div>
1515
+ <h4 class="text-[10px] font-bold text-white uppercase tracking-wider mb-0.5">License</h4>
1516
+ <p class="text-xs text-slate-300 font-medium drop-shadow-md">MIT Open Source</p>
1517
+ </div>
1518
+ </div>
1519
+
1520
+ <div class="flex justify-center mt-2">
1521
+ <a href="https://webtoolscli.pages.dev/" target="_blank"
1522
+ class="w-full py-2.5 bg-white/5 hover:bg-white/10 text-indigo-400 border border-white/10 rounded-xl transition-all font-semibold text-sm flex items-center justify-center gap-2">
1523
+ Visit Official Website
1524
+ <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>
1525
+ </a>
1526
+ </div>
1527
+ </div>
1528
+ </div>
1529
+ </dialog>
1463
1530
  </body>
1464
1531
 
1465
1532
  </html>
@@ -918,12 +918,11 @@ async function scrapeWebsite() {
918
918
  <span class="hidden sm:inline">Play</span>
919
919
  </button>
920
920
  <button onclick="event.stopPropagation(); saveToCloud('video', '${vid.url}', '${data.title || 'WEB Tools'}')"
921
- class="px-3 py-2 bg-red-600 hover:bg-red-500 text-white rounded-lg transition-all" title="Save to Mega Cloud">
921
+ class="p-2 bg-red-600 hover:bg-red-500 text-white rounded-lg transition-all flex items-center justify-center" title="Save to Mega Cloud">
922
922
  <svg class="w-4 h-4" fill="currentColor" viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm4.5 14h-2v-4.5l-2.5 3-2.5-3V16h-2V8h2.5l2 2.5 2-2.5H16v8z"/></svg>
923
923
  </button>
924
- <a href="${vid.url}" download class="px-3 py-2 bg-slate-700 hover:bg-slate-600 text-white rounded-lg text-xs font-semibold transition-all flex items-center gap-1">
925
- <svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"></path></svg>
926
- <span class="hidden sm:inline">Download</span>
924
+ <a href="${vid.url}" download class="p-2 bg-slate-700 hover:bg-slate-600 text-white rounded-lg transition-all flex items-center justify-center" title="Download">
925
+ <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"></path></svg>
927
926
  </a>
928
927
  </div>
929
928
  </div>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: webtools-cli
3
- Version: 1.3.1
3
+ Version: 1.3.3
4
4
  Summary: Advanced Web Intelligence & Scraping Toolkit with CLI and Web UI
5
5
  Author: Abhinav Adarsh
6
6
  License-Expression: MIT
@@ -98,6 +98,12 @@ pip install webtools-cli --upgrade
98
98
  - **Image Forensics**: CLI-based Error Level Analysis (ELA) and AI-likelihood detection.
99
99
  - **Honeypot Detector**: Identifies hidden traps and anti-bot measures (Cloudflare/CAPTCHAs).
100
100
 
101
+ ### AI Generation & Creative Tools
102
+ - **ComfyUI Integration**: Seamlessly launch a full Stable Diffusion interface directly from the CLI.
103
+ - **Anime Studio (Anima)**: Specialized "Make Anime" mode with automated Anima model downloads (UNET, Text Encoder, VAE) from Hugging Face.
104
+ - **Colab Optimized**: Pre-configured for Google Colab with T4 GPU support and automated environment setup.
105
+ - **Secure Tunnels**: Instant Cloudflare tunnel generation for remote UI access with live logging.
106
+
101
107
  ### Modern Experience
102
108
  - **Premium Visual Engine**: Sleek glassmorphism, fluid gradients, and premium Motion One animations.
103
109
  - **Responsive Preview**: Live rendering scaling for desktop and mobile viewpoints.
@@ -128,6 +134,7 @@ Navigate the suite using quick terminal commands:
128
134
  | `/web` | `/w` | Launch **Web UI** (Cloudflare Tunnel + QR) |
129
135
  | `/cli` | `/c` | Launch **CLI Intelligence** scan |
130
136
  | `/image` | `/i` | **Image Forensics** & AI Likelihood |
137
+ | `/cui` | - | **ComfyUI** AI Generation (GPU Required) |
131
138
  | `/history`| `/hi`| View and manage scan history |
132
139
  | `/help` | `/h` | Show full command documentation |
133
140
  | `/clear` | - | Purge all locally scraped data |
File without changes
File without changes