Repository navigation
Keep reai.json in Ghidra's user settings directory - #212
Open
felipe-dos-santos81 wants to merge 1 commit into
Open
felipe-dos-santos81 wants to merge 1 commit into
felipe-dos-santos81 wants to merge 1 commit into
Conversation
The API key config went to ~/.reai/reai.json. It now defaults to <Ghidra user settings>/reai/reai.json, so portable Ghidra installs (application.settingsdir) keep it with the rest of their settings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
ReaiPluginPackage.DEFAULT_CONFIG_PATHis~/.reai/reai.json. The setup wizard writes the API key and hostnames there, outside Ghidra's settings directory.Portable Ghidra installs (
-Dapplication.settingsdir=...inlaunch.properties) expect every per-user file under that directory. With the current default, separate installs share one key file in the home directory.Change
DEFAULT_CONFIG_PATHis nowApplication.getUserSettingsDirectory()/reai/reai.json.SetupWizardManageralready creates the parent directory, and a config file override passed to the wizard still works.Notes for review
~/.reai/reai.jsonis neither read nor migrated, so users enter their API key once more in the setup wizard. A fallback that reads the old file would be easy to add if you prefer that.Testing
gradle buildExtensionagainst Ghidra 12.1.4, on Linux arm64.DEFAULT_CONFIG_PATHresolves underApplication.getUserSettingsDirectory(), which was set to a portable directory.🤖 Generated with Claude Code