No description
- Pascal 97%
- PowerShell 1.6%
- Batchfile 1.4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .gitignore | ||
| build.ps1 | ||
| grok-desktop.mp4 | ||
| GrokDesktop.ico | ||
| GrokDesktop.lpi | ||
| GrokDesktop.lpr | ||
| GrokDesktop.rc | ||
| GrokDesktop.res | ||
| icon.jpg | ||
| postbuild.bat | ||
| project1.ico | ||
| project1.lpi | ||
| project1.lpr | ||
| README.md | ||
| uGrokApi.pas | ||
| uGrokAuth.pas | ||
| uGrokConfig.pas | ||
| uGrokStore.pas | ||
| unitMain.lfm | ||
| unitMain.pas | ||
| unitSettings.lfm | ||
| unitSettings.pas | ||
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
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
- Install Lazarus (you already have 4.8+).
- Open
GrokDesktop.lpi. - 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.dlllibcrypto-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
- Start the app.
- If you already use OpenCode with SuperGrok, tokens are imported automatically when possible.
- Otherwise open Settings → Login SuperGrok, approve in the browser, enter the code if asked.
- 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.