Desktop Application
Hollama can be run as a native desktop application for macOS, Windows, and Linux, providing a more integrated experience.
Using the Pre-built Application
The easiest way to use the desktop version is to download a pre-built binary.
- Go to the GitHub Releases page.
- Find the latest release and download the appropriate installer for your operating system:
- macOS:
.dmgfile - Windows:
.exeinstaller - Linux:
.tar.gzarchive
- macOS:
- Install and run the application.
Building from Source
If you are a developer and wish to build the desktop application from the source code, you can do so using the provided scripts.
Prerequisites
- Node.js (version specified in
.nvmrc) npm
Build Steps
-
Clone the repository:
git clone https://github.com/fmaclen/hollama.git cd hollama -
Install dependencies:
npm install -
Run the build command:
npm run electron:build
This script performs two main actions:
vite build: It builds the SvelteKit web application with thePUBLIC_ADAPTERenvironment variable set toelectron-node.electron-builder: It then takes the web app build and packages it into a native desktop application using the configuration inelectron-builder.yml.
The final application packages will be created in the dist/ directory.
How It Works
The desktop application is powered by Electron. The main process is defined in electron/main.js. Its primary responsibilities are:
- Creating a
BrowserWindowto render the user interface. - In a packaged app, it forks a child process to run the built-in Node.js server that serves the SvelteKit application.
- In development, it loads the URL from the Vite development server.
- It handles window lifecycle events, like closing the app or activating it on macOS.