studio: recommend the installer one-liner instead of unsloth studio update#5998
studio: recommend the installer one-liner instead of unsloth studio update#5998danielhanchen wants to merge 1 commit into
unsloth studio update#5998Conversation
…update` Update banners, the settings update panel, and the stale/MTP warnings now point users at the install script one-liner (curl on macOS/Linux, irm on Windows) rather than the `unsloth studio update` subcommand. Surfaces that cannot detect the OS show both commands. Internal callers, CI workflows, and the `unsloth studio update` subcommand itself are unchanged.
There was a problem hiding this comment.
Code Review
This pull request replaces references to the deprecated unsloth studio update command with direct installation scripts (curl for macOS/Linux and irm for Windows) across backend warnings, frontend banners, settings instructions, and Tauri error messages. It also updates corresponding tests and localization files. Feedback is provided on the web update banner to dynamically detect the user's operating system before copying the update command to the clipboard, preventing syntax errors from copying both commands simultaneously.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| async function handleCopyCommand() { | ||
| if (!(await copyToClipboard(STUDIO_UPDATE_CMD))) { | ||
| if (!(await copyToClipboard(STUDIO_UPDATE_COPY_CMD))) { | ||
| return; | ||
| } |
There was a problem hiding this comment.
Copying both the macOS/Linux and Windows commands to the clipboard simultaneously can cause syntax errors or messy outputs when pasted into a terminal. Since this banner runs in a web browser, we can easily detect the user's operating system via navigator.userAgent and copy only the command relevant to their platform.
async function handleCopyCommand() {
const isWindows = typeof window !== "undefined" && /win/i.test(navigator.userAgent || "");
const commandToCopy = isWindows ? STUDIO_UPDATE_WINDOWS_CMD : STUDIO_UPDATE_UNIX_CMD;
if (!(await copyToClipboard(commandToCopy))) {
return;
}
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 84cf03c015
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| transition={fadeTransition} | ||
| > | ||
| <CopyableCommand | ||
| command={updateCmd} |
There was a problem hiding this comment.
Preserve local update command for checkouts
For editable/local_repo installs, this branch tells users to pull their checkout and update locally, but updateCmd is the remote curl/irm installer without --local. In the installer, STUDIO_LOCAL_INSTALL is only set by --local (install.sh:67-68); otherwise it follows the normal PyPI package path (install.sh:2362-2364), so users with source checkouts can replace their editable install with PyPI despite the warning text saying to avoid that. Keep the checkout-specific local command or pass the local installer command here.
Useful? React with 👍 / 👎.
| const STUDIO_UPDATE_CMD = "unsloth studio update"; | ||
| const STUDIO_UPDATE_UNIX_CMD = "curl -fsSL https://unsloth.ai/install.sh | sh"; | ||
| const STUDIO_UPDATE_WINDOWS_CMD = "irm https://unsloth.ai/install.ps1 | iex"; | ||
| const STUDIO_UPDATE_COPY_CMD = `${STUDIO_UPDATE_UNIX_CMD}\n${STUDIO_UPDATE_WINDOWS_CMD}`; |
There was a problem hiding this comment.
Copy only one installer command
The banner now copies both OS-specific commands separated by a newline. If a user clicks “Copy command” and pastes into PowerShell, the Unix curl -fsSL ... | sh line runs first and fails because PowerShell's curl alias does not accept those flags; on macOS/Linux the installer runs and then the shell tries the Windows-only irm command. Since the UI says to run the command for the user's OS, the copy action should be platform-specific or split into separate copy buttons.
Useful? React with 👍 / 👎.
Summary
The update guidance shown across Studio recommended running
unsloth studio update. This switches every user facing surface to the install script one-liner, the same path the website and docs use:curl -fsSL https://unsloth.ai/install.sh | shirm https://unsloth.ai/install.ps1 | iexSurfaces that know the OS (the Settings update panel, which already has a Windows / macOS-Linux toggle) show the single matching command. Surfaces that cannot detect the OS (the web toast, the desktop banner, and the backend warnings) show both.
What changed
update-studio-instructions.tsx): the platform one-liner is now the primary command for PyPI and unknown installs. For local/editable checkouts theunsloth studio update --localstep is replaced by the one-liner whilegit pulland./install.sh --localstay. Dropped the now redundant duplicate fallback block and removed the three unused i18n keys (fallbackInstruction,fallbackCommand,localCheckout) fromenandzh-CN.web/update-banner.tsx): displays both commands and copies both.tauri/update-banner.tsx,use-tauri-backend.ts) plus the Rust conflict message (commands.rs): prose updated to both commands.main.py,core/inference/llama_cpp.py,utils/llama_cpp_freshness.py): the MTP and stale-prebuilt warnings now point at the installer; the matching assertion intest_llama_cpp_freshness.pyis updated.Out of scope
Internal callers, code comments, CI workflows, and the
unsloth studio updatesubcommand itself are unchanged. This only changes what we recommend to users.Testing
npm run typecheck(tsc -b): passesnpm run i18n:check(locale parity): passesbiome checkon the touched files: cleanpytest studio/backend/tests/test_llama_cpp_freshness.py: passes