From 62bcc98b008029e0ad9af41e0047efa6978e9533 Mon Sep 17 00:00:00 2001 From: RealDoc06 <73218979+RealDoc06@users.noreply.github.com> Date: Sat, 21 Nov 2026 13:36:12 +0100 Subject: [PATCH] feat(cli): walk first time logins through creating API credentials --- internal/cli/login.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/cli/login.go b/internal/cli/login.go index 07cf597..04b4a0c 100644 --- a/internal/cli/login.go +++ b/internal/cli/login.go @@ -119,7 +119,11 @@ and tg will ask for them here.` } } if _, err := config.LoadCredentials(); errors.Is(err, config.ErrNoCredentials) && os.Getenv("TG_TEST_DC") == "" { - fmt.Fprintln(os.Stderr, "Telegram API credentials are needed once. Create them at https://my.telegram.org/apps") + fmt.Fprint(os.Stderr, `Telegram needs an API ID and hash for tg, once. + 1. Open https://my.telegram.org/apps and log in with your phone number + 2. Fill in any app title and short name, platform "Desktop" + 3. Copy "App api_id" and "App api_hash" below +`) id, err := p.ask(ctx, "API ID", "") if err != nil { return err