A lightweight Windows system tray application written in Visual Basic .NET to manage and monitor a llama.cpp server instance.
README.md

LlamaTrayApp #

A lightweight Windows system tray application written in Visual Basic .NET to manage and monitor a llama.cpp server instance.

Features #

  • System Tray Integration: Run the server in the background with a minimal presence in your system tray.
  • Simple Controls: Start, stop, and exit the server via a right-click context menu.
  • Status Monitoring: View the current status of the server directly in the menu.
  • Fully Configurable: Easily change the command, arguments, and port without recompiling.
  • Customizable Icon: Support for custom tray icons.

Prerequisites #

Installation & Setup #

  1. Clone the repository or navigate to the project folder:

    cd src/LlamaTrayApp
    
  2. Configuration: Open config.json and update the values to match your environment:

    {
      "command": "C:\\path\\to\\your\\llama-server.exe",
      "args": "--jinja -c 0 --ctx-checkpoints 0 --cache-ram 0 -np 1 --no-mmap -hf unsloth/gemma-4-12B-it-qat-GGUF:UD-Q4_K_XL --spec-type draft-mtp --spec-draft-n-max 4 -fa on",
      "port": 8080,
      "icon": "C:\\path\\to\\your\\icon.ico"
    }
    
  3. Optional - Generate a placeholder icon: If you don't have an icon ready, you can generate a default one using the included script:

    pip install Pillow
    python generate_icon.py
    

    Update config.json to point to the generated icon.ico file.

Running the App #

To run the application in development mode:

dotnet run

Project Structure #

  • TrayApplication.vb: Main application logic and UI handling.
  • Config.vb: Configuration data model and JSON deserialization.
  • Program.vb: Application entry point.
  • config.json: User configuration file.
  • LlamaTrayApp.vbproj: .NET project file.