Repository navigation
BetterDecompiler v2: bring-your-own-key, multi-provider, cross-platform rewrite - #2
Merged
Merged
Conversation
Replace the Python/Flask + g4f proxy with a single dependency-free Go binary for Windows, macOS and Linux: - Bring your own key: Anthropic, OpenAI, Gemini, OpenRouter, Groq, DeepSeek, Mistral, xAI, any OpenAI/Anthropic/Gemini-compatible endpoint, plus local Ollama and LM Studio. Offline renamer when no key is configured. - Rename mode (default): the AI returns a compact JSON name map that a scope-resolving Luau parser applies and verifies, so behavior cannot change. Rewrite and offline modes also available. - Caching (memory + disk), request de-duplication, parallel chunking, retries with backoff and a provider fallback chain. - Local HTTP server with web UI, JSON API and the v1 /fix_script endpoint; Origin/Content-Type/Host checks and optional token. - CLI for files, folders and stdin; interactive setup. - New executor client that hooks decompile and keeps the v1 signature. - Tests need no API key: a mock provider emulates all three APIs, and renames are checked by executing code under Lua 5.1 and the Luau VM. - CI on all three OSes and a tag-triggered release workflow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RSCSfZjQxPkNn9HP29NmFV
Go 1.22 (the go.mod minimum) links macOS test binaries without an LC_UUID load command, which current macOS refuses to load, failing the macOS job. Release binaries for macOS would hit the same problem, so CI and the release workflow now use the latest stable Go. Also move to the Node 24 versions of actions/checkout and actions/setup-go. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RSCSfZjQxPkNn9HP29NmFV
A manual (workflow_dispatch) run now creates the version tag on the commit it runs on, so a release can be cut without pushing a tag first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RSCSfZjQxPkNn9HP29NmFV
Publish BetterDecompiler v2.0.0. The release workflow now also runs when a commit titled "Release vX.Y.Z" is pushed, so a version can be published without pushing a tag; it creates the tag on that commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RSCSfZjQxPkNn9HP29NmFV
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.
Replaces the Python/Flask server and its g4f proxy with a single Go program for Windows, macOS and Linux. It has no third-party dependencies, and v2.0.0 is already published from this branch: https://github.com/officialmelon/BetterDecompiler/releases/tag/v2.0.0
What changes
internal/luau) applies it and re-checks that every identifier still refers to the same variable, so behavior can't change.rewrite(full AI rewrite) andofflinemodes are also available.Retry-After.client/betterdecompiler.lua) hooksdecompile, so Dex picks it up automatically, and keeps the v1decompile(script, bool, url)signature. There is also a built-in web UI, a CLI (cleanfor files, folders and stdin;setup;providers;models;config) and a JSON API. The v1POST /fix_scriptendpoint is kept, sodex_betterdecompiler.luaworks unchanged.flask_ai_server.pyandmain.lua(replaced byclient/betterdecompiler.lua).v*tag, a commit titledRelease vX.Y.Z, or a manual run.Testing
None of these tests need an API key:
go test -race ./...passes on Ubuntu, macOS and Windows in CI.internal/mockllmemulates the OpenAI, Anthropic and Gemini APIs, including bad keys, 429/5xx with retries, refusals, truncated output and Anthropic fallback blocks.lua5.1 client/tests/run.luatests the client in a fake executor environment.scripts/e2e.shruns the real server, the mock provider and the Lua client together, plus a v1-style/fix_scriptrequest, a folder clean through the CLI, and an offline server with a token.Not yet tested against real provider APIs (no keys were available). Some default model IDs come from web searches and may need adjusting;
betterdecompiler models -p <provider>lists the valid ones.🤖 Generated with Claude Code
https://claude.ai/code/session_01RSCSfZjQxPkNn9HP29NmFV
Generated by Claude Code