Documentation Index
Fetch the complete documentation index at: https://mintlify.com/techjarves/Hermes-USB-Portable/llms.txt
Use this file to discover all available pages before exploring further.
launch.bat is a Windows Batch script that bootstraps the entire portable environment and launches the Hermes terminal menu — or, when arguments are provided, passes them directly to the hermes CLI without opening the menu. Double-clicking it in Explorer is all that is required on first run; the script detects whether the runtime is ready and, if not, invokes the PowerShell setup script automatically before continuing.
Usage
hermes prefix is accepted purely for ergonomics — launch.bat hermes setup and launch.bat setup are identical.
On first run, the launcher downloads approximately 600 MB of runtime files (Python, Node.js, uv, Playwright, and the Hermes source tree) into
.cache\runtimes\windows-x64\. Subsequent launches skip this step entirely.Commands
| Command | What it does |
|---|---|
launch.bat | Start Hermes TUI (interactive chat interface) |
launch.bat hermes | Same as above |
launch.bat setup | Run the setup wizard |
launch.bat hermes setup | Same as above |
launch.bat gateway | Start the messaging gateway (Telegram, etc.) |
launch.bat hermes gateway | Same as above |
launch.bat hermes gateway restart | Restart the running gateway |
launch.bat hermes gateway stop | Stop the running gateway |
launch.bat hermes doctor | Check the environment for issues |
launch.bat hermes status | Show current Hermes status |
launch.bat hermes config | View the current configuration |
launch.bat hermes config edit | Open the config file in the default editor |
launch.bat hermes chat | Start chat mode |
launch.bat hermes update | Update Hermes to the latest version |
Environment Variables
The launcher sets the following environment variables in the process scope of the launched session. Nothing is written to the Windows registry or the user’s system environment — all changes are local to the running process.| Variable | Value | Purpose |
|---|---|---|
PORTABLE_ROOT | Absolute path to the folder containing launch.bat | Anchor for all other paths |
HERMES_HOME | %PORTABLE_ROOT%\data | Overrides the default Hermes data directory so all configs and sessions stay on the drive |
CACHE_DIR | %PORTABLE_ROOT%\.cache | Root of all cached runtime files |
RUNTIME_DIR | %PORTABLE_ROOT%\.cache\runtimes\windows-x64 | Platform-specific runtime directory for Python, Node.js, uv, and Playwright |
VIRTUAL_ENV | %RUNTIME_DIR%\venv | Points to the portable Python virtual environment |
PATH | %VIRTUAL_ENV%\Scripts;%RUNTIME_DIR%\python;%RUNTIME_DIR%\python\Scripts;%RUNTIME_DIR%\node;%RUNTIME_DIR%\uv;%RUNTIME_DIR%\bin;… | Prepends portable runtime binaries so they take precedence over any host-installed tools |
PYTHONNOUSERSITE | 1 | Prevents Python from loading packages from the host user’s site-packages |
PYTHONHOME | (cleared) | Cleared to prevent host Python installations from interfering |
PYTHONPATH | (cleared) | Cleared to prevent host Python paths from leaking into the isolated environment |
UV_NO_CONFIG | 1 | Prevents uv from reading any config file on the host machine |
UV_PYTHON | %RUNTIME_DIR%\python\python.exe | Pins uv to the portable Python binary |
PLAYWRIGHT_BROWSERS_PATH | %RUNTIME_DIR%\playwright | Redirects Playwright browser binaries to the local cache instead of the host AppData |
NODE_PATH | %RUNTIME_DIR%\node\node_modules | Points Node.js module resolution to the portable node_modules directory |
NPM_CONFIG_PREFIX | %RUNTIME_DIR%\node | Redirects npm global installs to the portable runtime directory |
APPDATA | %PORTABLE_ROOT%\.cache\windows-appdata | Prevents Node.js and other tools from writing into the host user’s AppData |
LOCALAPPDATA | %PORTABLE_ROOT%\.cache\windows-localappdata | Same isolation applied to LocalAppData |
Behavior Notes
First-run setup check
Before any launch action, the script tests for the presence of.cache\runtimes\windows-x64\ready.flag. If that file does not exist, it immediately calls:
exit /b 1. The ready.flag is only written at the very end of a successful setup, so an interrupted download will always re-trigger setup on the next launch.
pyvenv.cfg portability fix
On every launch — not just the first — the launcher rewrites %VIRTUAL_ENV%\pyvenv.cfg with the current absolute path to the portable Python interpreter:
pyvenv.cfg contains a hard-coded home = path. When the drive is moved to a different machine or mounted on a different drive letter, the path changes and Python would fail to activate the venv correctly. Rewriting the file on every launch ensures the venv always points to the correct location regardless of where the drive is plugged in.
hermes prefix stripping
When the first argument equals hermes (case-insensitive), it is stripped before the remaining arguments are forwarded. This means the two forms below are exactly equivalent:
Direct execution vs. interactive menu
| Scenario | Behavior |
|---|---|
| No arguments | The ANSI terminal menu is displayed, showing setup status, provider, model, gateway state, and version. The user navigates with number keys. |
| Arguments present | Hermes runs in the foreground with those arguments and exits when done. The menu is never shown. |
Interactive menu overview
When launched with no arguments, the launcher renders a color dashboard and offers:- [1] Start Hermes Chat — opens the TUI chat interface
- [2] Setup / Reconfigure Hermes — runs
hermes setup - [3] Start / Stop Gateway — toggles the messaging gateway; label reflects live state
- [4] Advanced Options — sub-menu with Doctor, View Logs, Edit Config, Restart Gateway, and Update Hermes
- [5] Exit