@@ -192,6 +192,37 @@ func LinkExistingApp(ctx context.Context, clients *shared.ClientFactory, app *ty
192192 return nil
193193}
194194
195+ // LinkExistingAppQuiet links an existing app without verbose output. It resolves
196+ // the team and environment, validates the app, saves it, and prints only the app
197+ // summary. Used by `create --app` where the surrounding create output is enough.
198+ func LinkExistingAppQuiet (ctx context.Context , clients * shared.ClientFactory , app * types.App ) error {
199+ linkedApp , auth , err := promptExistingApp (ctx , clients )
200+ if err != nil {
201+ return err
202+ }
203+ * app = linkedApp
204+
205+ appIDs := []string {app .AppID }
206+ _ , err = clients .API ().GetAppStatus (ctx , auth .Token , appIDs , app .TeamID )
207+ if err != nil {
208+ return err
209+ }
210+
211+ err = saveAppToJSON (ctx , clients , * app )
212+ if err != nil {
213+ clients .IO .PrintDebug (ctx , "Error saving app to file when linking existing app: %s" , err )
214+ return err
215+ }
216+
217+ clients .IO .PrintInfo (ctx , false , "\n %s" , style .Sectionf (style.TextSection {
218+ Emoji : "house" ,
219+ Text : "App" ,
220+ Secondary : formatListSuccess ([]types.App {* app }),
221+ }))
222+
223+ return nil
224+ }
225+
195226// LinkAppFooterSection displays the details of app that was added to the project.
196227func LinkAppFooterSection (ctx context.Context , clients * shared.ClientFactory , app * types.App ) {
197228 clients .IO .PrintInfo (ctx , false , "\n %s" , style .Sectionf (style.TextSection {
0 commit comments