Repository navigation
docs: add upgrade guide for Wish v2 + release notes - #531
Merged
Merged
Conversation
aymanbagabas
requested review from
caarlos0,
meowgorithm and
raphamorim
and removed request for
a team
March 3, 2026 12:49
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.
Add v2 upgrade guide
Release notes
Your Wish v2 is Here!
Finally, Wish v2 is here! This release brings a ton of improvements, especially
for Bubble Tea apps running over SSH. We've rebuilt Wish on top of the all-new
Bubble Tea v2, which includes a blazing fast Cursed Renderer, automatic
color profile detection, better terminal handling, and much more.
❤️ Charm Land Import Path
We've updated our import paths to use vanity domains and use our domain to import Go packages.
💨 Built on Bubble Tea v2
Wish v2 is built on top of the all-new Bubble Tea v2, which ships with the Cursed Renderer. The new renderer is based on the ncurses rendering algorithm and is highly optimized for speed, efficiency, and accuracy.
This means SSH apps get massive performance benefits and lower bandwidth usage by orders of magnitude. No more fighting over terminal I/O either—Bubble Tea v2 handles all of that for you.
To take advantage of the new renderer, you don't need to do anything except upgrade to Wish v2.
🎨 Automatic Color Profile Detection
Remember all that color profile detection code you had to write? It's gone! Bubble Tea v2 now automatically detects the terminal's color profile and downsamples colors accordingly using the colorprofile library.
Colors just work now, no matter where the ANSI styling comes from. The
MakeRendererfunction has been removed entirely—you can use Lip Gloss styles directly.🌍 Client Environment Variables
Bubble Tea v2 sends an
EnvMsgat startup with the client's environment variables. This is especially handy for SSH apps whereos.Getenvwould give you the server's environment, not the client's.Important: Wish automatically passes the client's environment to Bubble Tea when you use
bubbletea.MakeOptions(). This meanstea.EnvMsgwill contain the client's environment, not the server's!You can access client environment variables in two ways:
Use tea.EnvMsg (Recommended)
Pass from Handler
If you need environment variables before
Init()runs, extract them in the handler:🧘 Declarative Views
In Bubble Tea v1,
View()returned astring. In v2, it returns atea.Viewstruct that lets you declare everything about your view—alt screen, mouse mode, window title, and more:No more
tea.WithAltScreen()program options—just set the fields you need.🚫 Suspend Prevention
SSH sessions can't be suspended the same way local terminals can. Wish v2 now automatically filters out
tea.SuspendMsgand replaces them withtea.ResumeMsgto prevent issues with programs trying to suspend over SSH.This is handled automatically in the
bubbletea.MakeOptionsfunction—you don't need to do anything.🪟 Better Terminal Detection
Wish v2 now properly sets the
TERMenvironment variable when a PTY is attached, and sets the initial window size correctly. This means your Bubble Tea apps will have accurate terminal information from the start.📦 Simplified Bubbletea Middleware
The bubbletea middleware API has been streamlined:
Removed:
MakeRenderer()— Color profiles are now automaticMiddlewareWithColorProfile()— No longer needed with automatic color detectionQueryTerminalFilter— Terminal querying is now handled by Bubble Tea v2Kept:
Middleware()— Still the easiest way to serve Bubble Tea appsMiddlewareWithProgramHandler()— For when you need access totea.ProgramMakeOptions()— Returns the correcttea.WithInputandtea.WithOutputoptionsHandlerandProgramHandlertypes — Same as before✌️ All the Bubble Tea v2 Goodness
Since Wish is built on Bubble Tea, you get all the new features:
KeyPressMsgandKeyReleaseMsgFor details on all the Bubble Tea v2 features, see the Bubble Tea v2 What's New document.
🔗 Updated Dependencies
All Charm libraries have been updated to use the new
charm.landimport paths:charm.land/bubbletea/v2— Bubble Tea v2charm.land/lipgloss/v2— Lip Gloss v2charm.land/log/v2— Charm Log v2charm.land/wish/v2— Wish v2 (that's us!)🌈 More on Wish v2
Ready to migrate? Head over to the Upgrade Guide for the full migration checklist.
Feedback
Have thoughts on Wish v2? We'd love to hear about it. Let us know on…
Part of Charm.
Charm热爱开源 • Charm loves open source • نحنُ نحب المصادر المفتوحة