-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Add autorun & sync scripts #7242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds utility scripts for automating local webui maintenance and repository synchronization. The changes introduce PowerShell scripts and batch files to handle automatic startup of a text-generation-webui server and synchronization of MerwelLabs GitHub repositories.
- Autorun functionality for text-generation-webui with minimized startup
- Repository synchronization scripts with logging and error handling
- Installation script for Windows startup integration
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| sync_merwel_repos.ps1 | Enhanced repo sync script with comprehensive logging and log rotation |
| start_webui_minimized.ps1 | PowerShell script to launch webui server minimized using venv |
| install_autostart.bat | Batch script to create Windows startup shortcut |
| clone_merwel_repos.ps1 | Basic repository cloning/updating script without logging |
| AUTORUN_README.md | Documentation for autorun setup and usage |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| @echo off | ||
| REM Creates a shortcut in the current user's Startup folder to run the web UI minimized at login. | ||
| set SCRIPT_PATH=%~dp0start_webui_minimized.ps1 | ||
| necho Creating startup shortcut... |
Copilot
AI
Sep 28, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a typo in the echo command - 'necho' should be 'echo'.
| necho Creating startup shortcut... | |
| echo Creating startup shortcut... |
| #> | ||
|
|
||
| $dest = 'D:\OneDrive_Merwel\OneDrive\Github' | ||
| $gh = 'C:\Program Files\GitHub CLI\gh.exe' |
Copilot
AI
Sep 28, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hard-coded paths reduce portability. Consider using environment variables or configuration parameters to make these paths configurable.
| $gh = 'C:\Program Files\GitHub CLI\gh.exe' | |
| # Allow override of GitHub CLI path via environment variable GH_PATH | |
| $gh = if ($env:GH_PATH) { $env:GH_PATH } else { 'C:\Program Files\GitHub CLI\gh.exe' } |
| $dest = 'D:\OneDrive_Merwel\OneDrive\Github' | ||
| $gh = 'C:\Program Files\GitHub CLI\gh.exe' |
Copilot
AI
Sep 28, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hard-coded paths are duplicated across scripts. Consider centralizing these configuration values in a shared configuration file or variables to avoid maintenance issues.
| # Start text-generation-webui in the project's venv, minimized. | ||
| # Created by automation. To edit, update this file in the project folder. | ||
|
|
||
| $ProjectPath = 'D:\AI_ML_Development\text-generation-webui' |
Copilot
AI
Sep 28, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hard-coded project path reduces portability. Consider making this configurable through environment variables or command-line parameters.
| $ProjectPath = 'D:\AI_ML_Development\text-generation-webui' | |
| # Allow project path to be set via environment variable or command-line argument. | |
| if ($env:TEXTGEN_PROJECT_PATH) { | |
| $ProjectPath = $env:TEXTGEN_PROJECT_PATH | |
| } elseif ($args.Count -ge 1) { | |
| $ProjectPath = $args[0] | |
| } else { | |
| $ProjectPath = 'D:\AI_ML_Development\text-generation-webui' | |
| } |
Adds autorun and sync helper scripts for local webui maintenance and repo sync. Small utility files only.