(Windows) Client is "hardcoded" to look for cli bin path in LocalAppData
- Dominant language
- Go
- Stars
- 9.2k
- Forks
- 1.3k
- Avg merge
- 12h 58m
- Merged PRs (30d)
- 56
Description
**Platform:** Windows
**Version:** `master` branch
At the moment, and taking a look at the source files, it seems that the client (which depends on the CLI binaries) is somewhat hardcoded to assume that those binaries are in `%localappdata%\Keybase`.
While for most users this is a non-issue (the installer unpacks the files to that directory anyway), it would be great if it wasn't hardcoded that way.
**Why?**
For context: I am currently writing a manifest for the Keybase app for [Scoop](https://scoop.sh), which is a command-line installer for Windows. However, it's nature of self-contained apps will lead so that the `.msi` is extracted (**not executed**) to nowhere near the expected location - `%localappdata%\Keybase` - and that is by design. The keybase executables would be in `~\scoop\apps\keybase\current\Keybase`.
And that leads to the client not finding `keybase.exe`, because it's not where it thinks it is.
# Possible Solutions
## Solution 1: Find keybase.exe on the parent directory
The extracted .msi follows the current structure:
```
Keybase
|_ keybase.exe # CLI Client
|_ etc.
|_ Gui
|_ Keybase.exe # GUI Client
|_ etc.
```
The point here is that from the gui client path, we can get the cli client path: `..\keybase.exe`.
If we cannot find it, fallback to looking in appData.
## Solution 2: Expose an environment variable for the keybase (CLI) executables
The idea is to try fetching an environment variable from the process (e.g. `KEYBASE_BIN_PATH`) that will point to where `keybase.exe` exists. The `.msi` installer can also set it to `%localappdata%\Keybase` if possible.
If we cannot find anything useful there, fallback to looking in appData.
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue does not name source files, tests, or entry points. Start by locating the Windows client code that resolves the CLI executable path, then reproduce the extracted Scoop layout and compare parent-directory and environment-variable fallback behavior. Done means the client finds keybase.exe outside %localappdata%\Keybase while preserving the existing installer path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli, desktop
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100