-
Notifications
You must be signed in to change notification settings - Fork 3.1k
feat: add NSIS installer and classroom admin checklist #2045
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ZhulongNT
wants to merge
2
commits into
Hmbown:main
Choose a base branch
from
ZhulongNT:feat/windows-nsis-installer
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+415
−0
Open
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,178 @@ | ||
| # CodeWhale Classroom / Lab Install Checklist | ||
|
|
||
| A step-by-step checklist for IT admins deploying CodeWhale on lab or classroom | ||
| machines running Windows. | ||
|
|
||
| > **Audience**: IT staff, teaching assistants, lab managers. | ||
| > **Prereq**: Each target machine runs Windows 10 (1809+) or Windows 11. | ||
|
|
||
| --- | ||
|
|
||
| ## Pre-install checklist (run once per machine) | ||
|
|
||
| | # | Task | Done? | | ||
| |---|------|-------| | ||
| | 1 | Confirm Windows version: `winver` → 10 build 17763+ or 11 | ☐ | | ||
| | 2 | Ensure the user account is a **standard user** (not a local admin). The installer does not require elevation. | ☐ | | ||
| | 3 | Verify outbound HTTPS (port 443) is open to `api.openai.com` (or whichever LLM provider the course uses). | ☐ | | ||
| | 4 | Obtain the installer: download `CodeWhaleSetup.exe` from the [latest release](https://github.com/Hmbown/CodeWhale/releases/latest) or from your department mirror. | ☐ | | ||
| | 5 | (Optional) Verify SHA-256 hash matches the published manifest. | ☐ | | ||
|
|
||
| --- | ||
|
|
||
| ## Installation | ||
|
|
||
| ### Option A — Silent install (recommended for imaging / SCCM / Intune) | ||
|
|
||
| ```powershell | ||
| # Run as admin or via deployment tool | ||
| CodeWhaleSetup.exe /S | ||
| ``` | ||
|
|
||
| The silent installer: | ||
| - Installs to `%LOCALAPPDATA%\Programs\CodeWhale\bin` | ||
| - Adds the bin directory to the **current user** PATH | ||
| - Registers in Windows "Apps & Features" for uninstall | ||
|
|
||
| ### Option B — Interactive install | ||
|
|
||
| 1. Double-click `CodeWhaleSetup.exe`. | ||
| 2. Accept the license. | ||
| 3. Choose the install directory (default is fine for most setups). | ||
| 4. Click **Install**. | ||
|
|
||
| ### Option C — Manual fallback (no installer) | ||
|
|
||
| If the NSIS installer is blocked by group policy, install manually: | ||
|
|
||
| ```powershell | ||
| # 1. Create directory | ||
| $binDir = "$env:LOCALAPPDATA\Programs\CodeWhale\bin" | ||
| New-Item -ItemType Directory -Force -Path $binDir | ||
|
|
||
| # 2. Download binaries (adjust URL to your mirror or release tag) | ||
| $tag = "v0.9.0" # replace with desired version | ||
| Invoke-WebRequest -Uri "https://github.com/Hmbown/CodeWhale/releases/download/$tag/codewhale-x64.exe" -OutFile "$binDir\codewhale.exe" | ||
| Invoke-WebRequest -Uri "https://github.com/Hmbown/CodeWhale/releases/download/$tag/codewhale-tui-x64.exe" -OutFile "$binDir\codewhale-tui.exe" | ||
|
|
||
| # 3. Add to user PATH (persistent) | ||
| $currentPath = [Environment]::GetEnvironmentVariable("Path", "User") | ||
| if ($currentPath -notlike "*$binDir*") { | ||
| [Environment]::SetEnvironmentVariable("Path", "$currentPath;$binDir", "User") | ||
| } | ||
|
|
||
| # 4. Refresh current session PATH | ||
| $env:Path = [Environment]::GetEnvironmentVariable("Path", "User") + ";" + [Environment]::GetEnvironmentVariable("Path", "Machine") | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## Post-install verification | ||
|
|
||
| Run these on **each machine** (or spot-check a sample): | ||
|
|
||
| | # | Command | Expected output | Done? | | ||
| |---|---------|-----------------|-------| | ||
| | 1 | `codewhale --version` | Prints version string | ☐ | | ||
| | 2 | `codewhale doctor` | All checks pass | ☐ | | ||
| | 3 | `codewhale-tui --version` | Prints version string | ☐ | | ||
|
|
||
| If `codewhale` is not found, the user may need to open a **new** terminal window for PATH changes to take effect. | ||
|
|
||
| --- | ||
|
|
||
| ## API key provisioning | ||
|
|
||
| Each student needs an API key. Options: | ||
|
|
||
| | Method | Pros | Cons | | ||
| |--------|------|------| | ||
| | **Per-student key** | Individual usage tracking | More key management | | ||
| | **Shared lab key** | Simple to deploy | Harder to audit; rate limits shared | | ||
|
|
||
| ### Deploying a shared key via environment variable | ||
|
|
||
| ```powershell | ||
| # Set for current user (persists across reboots) | ||
| [Environment]::SetEnvironmentVariable("OPENAI_API_KEY", "sk-...", "User") | ||
| ``` | ||
|
|
||
| Or create a `config.toml` in `%APPDATA%\codewhale\`: | ||
|
|
||
| ```toml | ||
| [provider] | ||
| api_key = "sk-..." | ||
| base_url = "https://api.openai.com/v1" | ||
| ``` | ||
|
|
||
| ### Deploying per-student keys with Intune / GPO | ||
|
|
||
| Use a Group Policy Preference or Intune PowerShell script to set the | ||
| `OPENAI_API_KEY` environment variable per user. The variable name depends on | ||
| your LLM provider — see [CONFIGURATION.md](CONFIGURATION.md). | ||
|
|
||
| --- | ||
|
|
||
| ## Uninstall | ||
|
|
||
| ### Silent uninstall | ||
|
|
||
| ```powershell | ||
| & "$env:LOCALAPPDATA\Programs\CodeWhale\Uninstall.exe" /S | ||
| ``` | ||
|
|
||
| ### Manual uninstall (if installer was not used) | ||
|
|
||
| ```powershell | ||
| $binDir = "$env:LOCALAPPDATA\Programs\CodeWhale\bin" | ||
| Remove-Item -Recurse -Force (Split-Path $binDir) | ||
|
|
||
| # Remove from PATH | ||
| $currentPath = [Environment]::GetEnvironmentVariable("Path", "User") | ||
| $newPath = ($currentPath -split ";" | Where-Object { $_ -ne $binDir }) -join ";" | ||
| [Environment]::SetEnvironmentVariable("Path", $newPath, "User") | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| | Symptom | Fix | | ||
| |---------|-----| | ||
| | `codewhale` not found after install | Open a **new** terminal. If still missing, check PATH: `echo $env:Path` | | ||
| | `MISSING_COMPANION_BINARY` | Ensure both `codewhale.exe` and `codewhale-tui.exe` are in the same directory | | ||
| | `TLS handshake` errors | Check proxy settings or use the CNB mirror (see [INSTALL.md](INSTALL.md)) | | ||
| | Antivirus quarantines binaries | Add the install directory to AV exclusions | | ||
| | `codewhale doctor` fails API check | Verify `OPENAI_API_KEY` is set or `config.toml` exists | | ||
|
|
||
| --- | ||
|
|
||
| ## Imaging / Golden Image Notes | ||
|
|
||
| If building a golden image (WIM/FFU): | ||
|
|
||
| 1. Install CodeWhale using Option A (silent) or Option C (manual). | ||
| 2. Do **not** set API keys in the image — these are per-user/per-student. | ||
| 3. The install directory (`%LOCALAPPDATA%\Programs\CodeWhale\bin`) is per-user, | ||
| so it will be present for the user who installed it. For other users on the | ||
| same machine, run the installer again or use Option C. | ||
| 4. Alternatively, install to a shared location like `C:\Tools\CodeWhale\bin` | ||
| and add it to the **machine** PATH: | ||
| ```powershell | ||
| [Environment]::SetEnvironmentVariable("Path", "$env:Path;C:\Tools\CodeWhale\bin", "Machine") | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## Quick Reference: All file paths | ||
|
|
||
| | Item | Default location | | ||
| |------|-----------------| | ||
| | Binaries | `%LOCALAPPDATA%\Programs\CodeWhale\bin\` | | ||
| | User config | `%APPDATA%\codewhale\config.toml` | | ||
| | Uninstaller | `%LOCALAPPDATA%\Programs\CodeWhale\Uninstall.exe` | | ||
| | PATH entry | `HKCU\Environment\Path` (current user) | | ||
|
|
||
| --- | ||
|
|
||
| *Last updated: 2026-05-25* | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hardcoding the version string in a deployment checklist will lead to outdated documentation as new releases are published. It is better to provide a command that dynamically fetches the latest version tag from the GitHub API.