Skip to content

studio: recommend the installer one-liner instead of unsloth studio update#5998

Open
danielhanchen wants to merge 1 commit into
mainfrom
studio-update-installer-oneliner
Open

studio: recommend the installer one-liner instead of unsloth studio update#5998
danielhanchen wants to merge 1 commit into
mainfrom
studio-update-installer-oneliner

Conversation

@danielhanchen
Copy link
Copy Markdown
Member

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:

  • macOS / Linux: curl -fsSL https://unsloth.ai/install.sh | sh
  • Windows (PowerShell): irm https://unsloth.ai/install.ps1 | iex

Surfaces 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

  • Settings update panel (update-studio-instructions.tsx): the platform one-liner is now the primary command for PyPI and unknown installs. For local/editable checkouts the unsloth studio update --local step is replaced by the one-liner while git pull and ./install.sh --local stay. Dropped the now redundant duplicate fallback block and removed the three unused i18n keys (fallbackInstruction, fallbackCommand, localCheckout) from en and zh-CN.
  • Web update banner (web/update-banner.tsx): displays both commands and copies both.
  • Desktop banner and preflight messages (tauri/update-banner.tsx, use-tauri-backend.ts) plus the Rust conflict message (commands.rs): prose updated to both commands.
  • Backend warnings (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 in test_llama_cpp_freshness.py is updated.

Out of scope

Internal callers, code comments, CI workflows, and the unsloth studio update subcommand itself are unchanged. This only changes what we recommend to users.

Testing

  • npm run typecheck (tsc -b): passes
  • npm run i18n:check (locale parity): passes
  • biome check on the touched files: clean
  • pytest studio/backend/tests/test_llama_cpp_freshness.py: passes

…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.
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines 40 to 43
async function handleCopyCommand() {
if (!(await copyToClipboard(STUDIO_UPDATE_CMD))) {
if (!(await copyToClipboard(STUDIO_UPDATE_COPY_CMD))) {
return;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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;
    }

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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}`;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant