You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(cli): walk first time logins through creating API credentials - #18
On a first login, tg login asks for an API ID and hash. It only gave a link to my.telegram.org, so you had to figure out the rest yourself. Now it lists the three steps: log in there, create an app with any name, and copy the two values.
Before
After
Screenshots come from scripts/shot.sh running TG_DEMO= tg login against its empty scratch home. They show only the prompt: it waits for input, and nothing reaches Telegram.
Created with Claude Opus 5.5 in Claude Code (T3 Code).
Note
Add first-time login steps for creating Telegram API credentials
The login command in login.go now prints step-by-step instructions when API credentials are missing: open the Telegram apps page, log in, create a Desktop-platform app, and copy the App api_id and api_hash. Instructions go to stderr before the existing prompts. Behavioral Change: only affects runs with missing credentials and TG_TEST_DC unset.
No actionable comments were generated in the recent review.
Walkthrough
When Telegram API credentials are missing and TG_TEST_DC is unset, loginCmd now prints a three-step guide to obtaining credentials. The prompts and credential-saving flow remain unchanged.
Changes: Login Credential Guidance
Layer / File(s)
Summary
Missing-credentials message internal/cli/login.go
When credentials are missing and TG_TEST_DC is unset, the command prints a three-step guide instead of a one-line instruction.
The first-login prompt now explains how to create Telegram API credentials. The credential prompts and saving behavior are unchanged, and no merge-blocking risk was found.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title says the first-time login flow now walks users through creating Telegram API credentials. The change in internal/cli/login.go does this: when credentials are missing and TG_TEST_DC is unset,…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title says the first-time login flow now walks users through creating Telegram API credentials. The change in internal/cli/login.go does this: when credentials are missing and TG_TEST_DC is unset, loginCmd prints a three-step guide instead of a one-line instruction. The title names the main change and uses the conventional feat(cli) prefix. It is specific and matches the objectives and the file summary.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: defaults
Review profile: CHILL
Plan: Advanced
Run ID: 05af3efd-a48c-4115-b298-e41abd6f4c4a
Commits
Reviewing files that changed from the base of the PR and between c1a2983 and 62bcc98.
Files selected for processing: 1
internal/cli/login.go
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
Macroscope's review found this PR approvable — Adds step-by-step instructions for creating Telegram API credentials during initial login. Only explanatory text changes; credential handling and login safeguards remain unchanged.
You can add or adjust custom eligibility rules. Learn more.
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
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.
On a first login,
tg loginasks for an API ID and hash. It only gave a link to my.telegram.org, so you had to figure out the rest yourself. Now it lists the three steps: log in there, create an app with any name, and copy the two values.Screenshots come from
scripts/shot.shrunningTG_DEMO= tg loginagainst its empty scratch home. They show only the prompt: it waits for input, and nothing reaches Telegram.Created with Claude Opus 5.5 in Claude Code (T3 Code).
Note
Add first-time login steps for creating Telegram API credentials
The login command in login.go now prints step-by-step instructions when API credentials are missing: open the Telegram apps page, log in, create a Desktop-platform app, and copy the App api_id and api_hash. Instructions go to stderr before the existing prompts. Behavioral Change: only affects runs with missing credentials and
TG_TEST_DCunset.Macroscope summarized 62bcc98.
Summary by CodeRabbit