No description
  • Pascal 97%
  • PowerShell 1.6%
  • Batchfile 1.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Krzysztof Krystian Jankowski a0c3705675 icon fix
2026-08-06 23:10:45 +02:00
.gitignore icon, video 2026-08-06 23:06:13 +02:00
build.ps1 upd 2026-08-06 22:17:04 +02:00
grok-desktop.mp4 icon, video 2026-08-06 23:06:13 +02:00
GrokDesktop.ico icon fix 2026-08-06 23:10:45 +02:00
GrokDesktop.lpi mvp 2026-08-06 22:13:43 +02:00
GrokDesktop.lpr mvp 2026-08-06 22:13:43 +02:00
GrokDesktop.rc icon, video 2026-08-06 23:06:13 +02:00
GrokDesktop.res icon fix 2026-08-06 23:10:45 +02:00
icon.jpg icon, video 2026-08-06 23:06:13 +02:00
postbuild.bat icon, video 2026-08-06 23:06:13 +02:00
project1.ico mvp 2026-08-06 22:13:43 +02:00
project1.lpi mvp 2026-08-06 22:13:43 +02:00
project1.lpr mvp 2026-08-06 22:13:43 +02:00
README.md upd 2026-08-06 23:07:26 +02:00
uGrokApi.pas bugfixes 2026-08-06 22:47:13 +02:00
uGrokAuth.pas working MVP 2026-08-06 22:26:14 +02:00
uGrokConfig.pas mvp 2026-08-06 22:13:43 +02:00
uGrokStore.pas mvp 2026-08-06 22:13:43 +02:00
unitMain.lfm bugfixes 2026-08-06 22:47:13 +02:00
unitMain.pas icon, video 2026-08-06 23:06:13 +02:00
unitSettings.lfm upd 2026-08-06 22:50:07 +02:00
unitSettings.pas upd 2026-08-06 22:50:07 +02:00

Grok Desktop

Native Windows chat client for Grok, built with Lazarus / Free Pascal.

Uses the same SuperGrok OAuth device-code flow as OpenCode (not grok.com scraping).

Demo

Watch demo video

Features

  • SuperGrok login (RFC 8628 device code) via auth.x.ai
  • Import existing OpenCode xAI tokens from %USERPROFILE%\.local\share\opencode\auth.json
  • Optional xAI API key
  • Multi-conversation sidebar
  • Streaming chat (/v1/chat/completions) with non-stream fallback
  • Model picker + web search toggle
  • Dark theme

Open in Lazarus

  1. Install Lazarus (you already have 4.8+).
  2. Open GrokDesktop.lpi.
  3. Run → Build or press F9.

After a successful build, Lazarus runs UPX on the exe
(..\upx\upx.exe --best --lzma).

CLI build + UPX

.\build.ps1

Requires C:\lazarus\lazbuild.exe and Documents\upx\upx.exe.

HTTPS / OpenSSL (Windows)

FPC needs 64-bit OpenSSL 1.1 DLLs next to GrokDesktop.exe:

  • libssl-1_1-x64.dll
  • libcrypto-1_1-x64.dll

These are shipped in the project folder. If you get Could not initialize OpenSSL library, copy those two DLLs beside the exe again.

First run

  1. Start the app.
  2. If you already use OpenCode with SuperGrok, tokens are imported automatically when possible.
  3. Otherwise open Settings → Login SuperGrok, approve in the browser, enter the code if asked.
  4. Pick a model (default grok-4.5) and chat.

Data locations

What Path
Auth tokens %APPDATA%\GrokDesktop\auth.json
Settings %APPDATA%\GrokDesktop\config.json
Conversations %APPDATA%\GrokDesktop\conversations\

Project layout

GrokDesktop.lpi / .lpr   project
unitMain.*               main chat UI
unitSettings.*           login & options
uGrokAuth.pas            SuperGrok OAuth + API key
uGrokApi.pas             xAI chat HTTP client
uGrokStore.pas           conversation persistence
uGrokConfig.pas          app config

Notes

  • SuperGrok subscription access follows xAI’s OAuth product rules (same client OpenCode uses).
  • A separate console API key still works if you prefer pay-as-you-go.
  • Image / voice / full grok.com UI are not in v1.