webtools-cli 1.3.2__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.2
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.2"
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)")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: webtools-cli
3
- Version: 1.3.2
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