Always-on Usage

Copy library / What got built / Grok Bot

Packaging the Grok Bot desktop app for Linux with Nix

Subscribe

What it does
This PR packages the Grok Bot desktop app for x86_64 and aarch64 Linux as a Nix flake: it downloads the official Windows installer, unpacks it, runs it on Electron 42 from nixpkgs, drops the Windows native addons and rebuilds tree-sitter. On x86_64 under Xvfb the sign-in screen renders and the sign-in link opens, but it was not tested while signed in; aarch64 has not been run on hardware yet.
Scenarios
Watch PRs / repos Code & ship
What the source covers
  • Author & original linkYes
  • What it doesYes
  • Verbatim source excerptYes
  • Screenshots / mediaNot in source
  • Steps / chaptersYes
  • Verbatim prompt / configNot in source
  • Results / numbersNot in source
  • Risk notesYes
  • Related entriesYes

— means the source doesn't say; we don't fill it in.

Verbatim source excerpt
Package Grok Bot for Linux (x86_64 and aarch64) with Nix
Packages the Grok Bot desktop app for Linux as a Nix flake, for x86_64 and aarch64.

## How it works

- Downloads the official Windows installer (version and hash pinned in `sources.json`), unpacks it with 7-Zip, and unpacks `app.asar` into a plain `resources/app` directory.
- Runs it on the matching Electron from nixpkgs (`electron_42-bin`, upstream ships 42.11.16). The binary is copied as `grok-bot` so `app.isPackaged` is true.
- Deletes all Windows native addons. The app loads each one behind a `try`/`catch` and turns the feature
Show full post off.
- Rebuilds `tree-sitter` and `tree-sitter-bash` from npm sources, because the local exec daemon needs them at load time and npm has no linux-arm64 prebuilds.
- Leaves out `cursor-proclist` on purpose: it only feeds process-usage telemetry.
- `update.sh` refreshes `sources.json` from Cursor's update service. The build fails if upstream moves to a different Electron major.

The flake allows only `grok-bot` (unfree) and Electron 42 (marked insecure by nixpkgs), so `nix run` works as is.

## Tested

- x86_64 under Xvfb: the sign-in screen renders, **Sign in** opens `cursor.com/loginDeepControl…` through `xdg-open`, a second launch with a `grokbot://` link hands off to the running instance and exits, and both tree-sitter addons load and parse inside Electron 42's runtime. Not tested while signed in.
- aarch64: the flake evaluates. An aarch64 build only compiles the two small addons, and everything else comes from cache or is downloaded. Both addons cross-compile to aarch64 ELF. **Not yet run on aarch64 hardware.**

Try it before merging:

```
nix run github:portal-wheatley/Grok-Bot-for-Linux/initial-port
```

Approach credit: [jakob-bu/grok-bot-linux-unofficial](https://github.com/jakob-bu/grok-bot-linux-unofficial).

🤖 Generated with [Clau
portal-wheatley · · Open original ↗

From the project README, verbatim and untranslated.

Steps / points from the source
  1. Unfree: Grok Bot is proprietary. The package is marked that way.
  2. Insecure: Grok Bot 0.79.4 is built for Electron 42. nixpkgs marks
  3. Download the official Windows installer from Cursor's CDN. Its version
  4. Unpack it with 7-Zip and unpack the app archive (app.asar) into a plain
  5. Delete every Windows native addon (.node, .exe, .dll).
  6. Rebuild the two addons the app cannot run without, tree-sitter and
  7. Put the app next to the matching Electron from nixpkgs (electron_42-bin).
  8. Wrap it with xdg-open on the PATH (for sign-in) and the usual Wayland

Verbatim from the source, untranslated.

Prompt

The source does not include a prompt you can copy verbatim.

How to copy
  1. Open the repo: github.com/portal-wheatley/Grok-Bot-for-Linux/pull/1 ↗
  2. Read the README, send the repo link to your Bot and have it reproduce it
  3. Get it working small first, then add a routine
Risks and limits
  • Deletes, unsubscribes or cancels things: get a list first and confirm each item
  • Uses a browser or website login: the costliest kind of step, so prefer a connector where one exists
  • The author's result may not reproduce for you; the original post is the reference
Usage estimate
Estimate with the metal calculator