CLIProxyAPI Tray manages theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/kitephp/CLIProxyAPI-Tray/llms.txt
Use this file to discover all available pages before exploring further.
cli-proxy-api.exe process. This page explains what happens behind the scenes when you start, stop, or restart the service.
Starting the service
When you click Start in the tray menu, the tray performs the following sequence:Check for a configured password
The tray reads
config.yaml and looks for a non-empty remote-management.secret-key. If the key is missing or empty, a prompt asks you to enter a password before continuing. If you cancel, the start is aborted with a “Password not set. Start cancelled.” balloon tip.Check for an installed version
The tray verifies that a CLIProxyAPI binary exists in the
versions/ directory. If no version is installed, a dialog appears with the latest available version and asks permission to download it. If you decline and no existing version is found, the start is aborted.Stop any running instance
Before launching a fresh process, the tray kills any currently running
cli-proxy-api process and waits 200 ms to ensure it has fully stopped.Launch the process
The tray starts
cli-proxy-api.exe with the argument --config "path/to/config.yaml" in a hidden window (no console window appears).Wait for the port to become ready
The tray polls the configured port with a TCP connection check, waiting up to 12 seconds for the port to start accepting connections.
Report the result
- Port ready: Shows a “Started CLIProxyAPI” balloon tip. If Auto Open WebUI is enabled, waits 1 second then opens the WebUI in the default browser.
- Port not ready within 12 seconds: Shows a “Started, but port not ready yet” warning balloon tip. The process may still be starting — check the WebUI manually after a moment.
Stopping the service
Clicking Stop in the tray menu:- Calls
Stop-Process -Forceon any process namedcli-proxy-api. - Waits 200 ms for the process to fully terminate.
- Updates the tray icon and menu state.
- Shows a “Stopped” balloon tip.
Stop does not wait for in-flight requests to complete. It sends a forced kill signal immediately.
Restarting the service
Restart runs the exact same sequence as Start — it callsStop-CLIProxyAPI internally before launching a fresh process. All the same prerequisites apply (password check, version check), and the Auto Open WebUI setting is respected.
Single-instance enforcement
The tray application uses a Windows named mutex to prevent duplicate tray instances from running simultaneously:The single-instance mutex applies to the tray application itself, not to the CLIProxyAPI service process. The service is managed separately and can be started independently of the tray.
Process identification
The tray identifies the CLIProxyAPI process by name:.exe extension, matched via PowerShell’s Get-Process -Name cli-proxy-api. If a process with this name is found, it is treated as the running CLIProxyAPI instance.