Improve public installation guide
This commit is contained in:
@@ -1,54 +1,104 @@
|
||||
# GESIS OpenCode Desktop Installer
|
||||
|
||||
This folder contains a Windows GUI installer for OpenCode Desktop that configures the GESIS AI Server provider.
|
||||
This repository provides a Windows installer for OpenCode Desktop configured for the GESIS AI Server.
|
||||
|
||||
Release/versioning rules are documented in `RELEASE.md`. In short: use simple tags such as `v1`, `v2`, `v3`, and only create a new tag when the distributable EXE changes and the project owner explicitly approves the bump.
|
||||
The installer is intended for GESIS colleagues who want to use OpenCode with their personal GESIS AI Server API key. It downloads the latest OpenCode Desktop for Windows, checks the API key, shows the models available to that key, and writes the OpenCode configuration automatically.
|
||||
|
||||
## Download
|
||||
|
||||
Download and run:
|
||||
|
||||
```text
|
||||
GESIS-OpenCode-Installer.exe
|
||||
```
|
||||
|
||||
Windows may show a security warning because the installer is not code-signed yet. If you downloaded it from the official GESIS GitLab project, choose **More info** and then **Run anyway**.
|
||||
|
||||
## Before You Start
|
||||
|
||||
You need:
|
||||
|
||||
- Windows 10 or Windows 11
|
||||
- internet access
|
||||
- access to the GESIS AI Server / Open WebUI
|
||||
- your personal GESIS AI Server API key
|
||||
|
||||
Do not share your API key. The installer stores it only in your own OpenCode configuration.
|
||||
|
||||
## Get Your API Key
|
||||
|
||||
Open the GESIS Open WebUI page:
|
||||
|
||||
[https://ai-openwebui.gesis.org](https://ai-openwebui.gesis.org)
|
||||
|
||||
The screenshots below are illustrative. The exact wording may differ slightly depending on the Open WebUI version.
|
||||
|
||||
1. Sign in to Open WebUI.
|
||||
2. Open your profile menu.
|
||||
3. Go to **Settings**.
|
||||
4. Open **Account**.
|
||||
|
||||

|
||||
|
||||
5. Find **API Keys**.
|
||||
6. Choose **Generate New API Key**.
|
||||
7. Copy the generated key immediately.
|
||||
|
||||

|
||||
|
||||
If you cannot see API keys, contact the GESIS AI Server / Open WebUI administrators.
|
||||
|
||||
## Install OpenCode
|
||||
|
||||
1. Run `GESIS-OpenCode-Installer.exe`.
|
||||
2. Paste your personal API key.
|
||||
3. Click **Check API key**.
|
||||
4. Select the models you want to use in OpenCode. All available models are selected by default.
|
||||
5. Click **Install selected models**.
|
||||
6. Follow any OpenCode Desktop installer prompts that appear.
|
||||
|
||||
When finished, start or restart OpenCode Desktop.
|
||||
|
||||
## What the Installer Does
|
||||
|
||||
The installer:
|
||||
|
||||
- downloads the latest Windows x64 OpenCode Desktop release from `anomalyco/opencode`
|
||||
- starts the official OpenCode Desktop installer
|
||||
- asks each user for their personal GESIS AI Server API key
|
||||
- checks the key against the GESIS AI Server before installing
|
||||
- shows all models available to that key in a checkbox grid with every model selected by default
|
||||
- writes only the selected models into the OpenCode config
|
||||
- writes the OpenCode config to `%USERPROFILE%\.config\opencode\opencode.json`
|
||||
- restricts OpenCode to the GESIS provider with `enabled_providers`
|
||||
- explicitly disables known Zen/OpenCode default provider IDs
|
||||
- backs up an existing config before replacing it
|
||||
- downloads the latest Windows x64 OpenCode Desktop release
|
||||
- checks your API key against the GESIS AI Server
|
||||
- shows only models available to your API key
|
||||
- writes the selected models to your OpenCode configuration
|
||||
- disables the default OpenCode/Zen providers so the model list stays focused on GESIS
|
||||
- backs up an existing OpenCode config before replacing it
|
||||
|
||||
## Install
|
||||
The config is written to:
|
||||
|
||||
For normal users, distribute and run:
|
||||
```text
|
||||
%USERPROFILE%\.config\opencode\opencode.json
|
||||
```
|
||||
|
||||
`GESIS-OpenCode-Installer.exe`
|
||||
## Troubleshooting
|
||||
|
||||
They paste their personal GESIS API key, click **Check API key**, choose which available models they want to use in OpenCode from the checkbox grid, and click **Install selected models**.
|
||||
If the API key is rejected, create a new API key in Open WebUI and try again.
|
||||
|
||||
The installer starts compact for API-key entry, then maximizes automatically after models are found so the model grid is visible. The main action buttons stay fixed at the bottom of the window, and only the content area scrolls as a fallback for high Windows text scaling or very large model sets.
|
||||
If no models are shown, your key may not have access to any models yet. Contact the GESIS AI Server / Open WebUI administrators.
|
||||
|
||||
## Rebuild the EXE
|
||||
If OpenCode still shows old models, close and restart OpenCode Desktop.
|
||||
|
||||
Open PowerShell in this folder and run:
|
||||
If Windows blocks the installer, make sure you downloaded it from the official GESIS GitLab project.
|
||||
|
||||
## For Maintainers
|
||||
|
||||
Build instructions and source files are included in this repository.
|
||||
|
||||
To rebuild the EXE on Windows:
|
||||
|
||||
```powershell
|
||||
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
|
||||
.\Build-GuiInstaller.ps1
|
||||
```
|
||||
|
||||
The older PowerShell installer is kept as an administrator fallback:
|
||||
Release/versioning rules are documented in `RELEASE.md`. Use simple tags such as `v1`, `v2`, `v3`, and create a new version only when the distributable EXE changes and the project owner explicitly approves the bump.
|
||||
|
||||
```powershell
|
||||
.\Install-OpenCode-GESIS.ps1
|
||||
```
|
||||
GitLab release pages should be attached to an existing approved tag. Do not create a new tag just to create or edit a release page.
|
||||
|
||||
## Files
|
||||
|
||||
- `GESIS-OpenCode-Installer.exe` is the GUI installer for distribution.
|
||||
- `GesisOpenCodeInstaller.cs` is the GUI installer source.
|
||||
- `Build-GuiInstaller.ps1` rebuilds the GUI installer.
|
||||
- `app.manifest` keeps the installer DPI-aware on Windows.
|
||||
- `GESIS Logo Blau EN.jpg` and `GESIS Signet Blau_transp.png` are embedded into the EXE when it is rebuilt.
|
||||
- `Install-OpenCode-GESIS.ps1` is the PowerShell fallback installer.
|
||||
- `opencode.gesis.template.json` is a safe template with no personal API key.
|
||||
- `opencode.json` mirrors the template and no longer contains a real API key.
|
||||
In GitLab, release pages are usually found under **Deploy > Releases** in the project sidebar. If the sidebar does not show **Releases**, open **Code > Tags**, select the existing tag such as `v2`, and create a release from that tag.
|
||||
|
||||
Reference in New Issue
Block a user