Skip to content

Commit 092ec0d

Browse files
committed
Add onboarding preamble to interactive 'qn auth login' (DX-5694)
The command jumped straight to a hidden key prompt with no context. Interactive logins now print a short welcome on stderr explaining that an API key is needed, where it will be stored, and where to get one (dashboard.quicknode.com/api-keys, quicknode.com/signup). Suppressed by --quiet; not shown when --api-key is passed.
1 parent b16120a commit 092ec0d

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/commands/auth.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,16 @@ async fn login(args: LoginArgs, global: GlobalArgs) -> Result<(), CliError> {
7070
"no TTY available; pass --api-key to log in non-interactively".to_string(),
7171
));
7272
}
73+
if !global.quiet {
74+
let _ = writeln!(
75+
std::io::stderr(),
76+
"Welcome! The qn CLI uses a Quicknode API key to manage your account.\n\
77+
Your key is stored locally in {}.\n\n \
78+
Get an API key: https://dashboard.quicknode.com/api-keys\n \
79+
Need an account? https://www.quicknode.com/signup\n",
80+
path.display()
81+
);
82+
}
7383
config::prompt_for_api_key()?
7484
}
7585
};

0 commit comments

Comments
 (0)