Migrate from deprecated Survey to Bubbletea/Huh for interactive prompts#96
Open
Migrate from deprecated Survey to Bubbletea/Huh for interactive prompts#96
Conversation
… prompts Replace the deprecated AlecAivazis/survey library with charmbracelet/huh for all interactive CLI prompts. This modernizes the user interface while maintaining backwards compatibility. Changes: - Replace survey dependency with huh v0.6.0 in go.mod - Rewrite ui/questions.go abstraction layer for Huh API - Migrate all Select, Input, Multiline, and Password prompts across 9 files - Convert transform functions from Survey OptionAnswer to string-based - Remove unused imports and clean up deprecated code patterns Benefits: - Modern, actively maintained TUI framework - Better type safety and validation - Enhanced terminal user experience - Future-proof foundation for UI improvements All interactive functionality preserved with no breaking changes to CLI usage.
Remove redundant string and int type declarations where the type can be inferred from the right-hand side value. This addresses DeepSource static analysis feedback for cleaner, more idiomatic Go code. Changed patterns: - var name string = value → var name = value - var count int = 10 → var count = 10 Files updated: - stacks/app_pipeline.go: 7 variables - stacks/database.go: 2 variables - stacks/redis.go: 1 variable - ui/questions.go: 2 variables - utils/utils.go: 1 variable
- Fix WriteTo compatibility layer issues in stacks/ - Add proper boolean conversion for yes/no selections - Convert multiline text fields to string slice handling - Remove unused helper functions and proxy types - Fix all DeepSource static analysis warnings - Remove unused clusterSelectTransform function All interactive prompts now use Huh library while maintaining the same user experience as before.
blsmth
commented
Jul 18, 2025
Clean up go.mod after migration to Huh by removing the unused github.com/AlecAivazis/survey/v2 dependency and related transitive dependencies.
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.
Summary
Migrates the AppPack CLI from the deprecated AlecAivazis/survey library to the modern charmbracelet/huh library for all interactive terminal prompts. This ensures the CLI continues to work with a supported, actively maintained TUI framework.
Key Changes
github.com/AlecAivazis/survey/v2withgithub.com/charmbracelet/huh v0.6.0ui/questions.goto use Huh API while maintaining backwards compatibilityhuh.NewSelect[string]()huh.NewInput()huh.NewText()Files Changed
go.mod,go.sum- Dependency updatesui/questions.go- New Huh-based abstraction layercmd/scheduledTasks.go,cmd/shell.go- Command promptsstacks/*.go(6 files) - Stack configuration promptsBenefits
Test Plan
go build .)./apppack version)Additional Notes
This migration was necessary because Survey has been deprecated and is no longer maintained. Huh is built on the solid Bubbletea foundation and is actively maintained by Charm, making it the recommended replacement for modern Go CLI applications.
The migration maintains full backwards compatibility - users will see the same prompts and behavior, just with improved rendering and responsiveness.