Assistant Launcher is a Windows system tray application that provides instant access to Python scripts (.py/.pyw) within a designated project directory. It dynamically builds a hierarchical menu from your file structure, excludes common development folders (like node_modules, venv, .git), tracks recently launched scripts, and offers configuration management—all from a lightweight tray icon.
- Dynamic Tray Menu: Automatically scans and lists all Python scripts in your target directory, preserving folder hierarchy.
- Smart Exclusions: Ignores common non-script directories (
node_modules,venv,.git, etc.) with an editable ignore list. - Recent Files: Quick access to the 10 most recently launched scripts.
- Configuration GUI: Change target directory, edit
config.json, manage ignored folders, and refresh the menu without leaving the tray. - Auto-start: Optional Windows autostart when run as a frozen executable.
- Lightweight: Minimal resource usage; runs silently in the background.
- Windows OS
- Python 3.8+ (if running from source)
- Dependencies:
pystray,Pillow
- Clone or download this repository.
- Install dependencies:
pip install pystray pillow- Run the app:
python assistant.py- Install PyInstaller:
pip install pyinstaller- Build the executable (adjust icon path as needed):
pyinstaller --onefile --windowed --icon=assistant.ico assistant.py- Use the generated
.exein thedist/folder.
- Launch Scripts: Left-click the tray icon → navigate the menu → click a script to run.
.pywfiles launch withpythonw(no console)..pyfiles launch in a new console window.
- Settings:
- Choose Target Directory: Select a different root folder to scan.
- Open Config File: Edit
config.json(target, ignore list) manually. - Ignored Folders: Remove entries from the ignore list via submenu.
- Refresh: Reload files and menu immediately.
- Recent: Access recently launched scripts (if they still exist).
- Open Root: Open the target directory in File Explorer.
- Exit: Quit the application.
Configurations are stored in %APPDATA%\AssistantLauncher\:
config.json: Setstarget_dirandignore_dirs.assistant_stats.json: Tracks recent file history.assistant.log: Runtime logs.
Example config.json:
{
"target_dir": "F:/projects/assistant",
"ignore_dirs": ["node_modules", "__pycache__", "venv", ".git", ".venv", "dist", "build"]
}- Paths in
ignore_dirsare lowered folder names (not full paths). - The app updates the menu automatically when config changes or on manual refresh.
- Auto-start registry key (
HKEY_CURRENT_USER\...\Run) is set only when running as a compiled.exe(not frompython.exe).
- Menu not updating: Use "⚙️ Settings → 🔄 Reload Config" or restart the app.
- Scripts not appearing: Check
target_dirin config and ensure files have.py/.pywextensions. - Permission issues: Ensure
%APPDATA%\AssistantLauncher\is writable. - Logs: Check
assistant.login the config directory for errors.
Improvements and bug fixes are welcome! Open an issue or submit a pull request.