Skip to content

feat: add asterisk masking to password login prompt

Vaishnavi Prabhala requested to merge feat/password-asterisk into develop

This MR improves the user experience of the login command by providing visual feedback (asterisks) when entering a password. Previously, the CLI used getpass, which provided no visual indication of typing.

Key Changes: Dependency Management: Added stdiomask to the project dependencies using uv. Updated pyproject.toml and uv.lock.

Logic Enhancement: Refactored the login command in src/corpus_client_cli/cli.py to use stdiomask.getpass. Smart Prompting: Added an explicit check (if password is None:) to ensure the interactive prompt only triggers when the password is not provided as a CLI argument. This maintains compatibility with automated scripts. Code Quality: Cleaned up unused getpass imports and ensured the file passes Ruff formatting standards.

Testing Performed: Interactive Login: Ran uv run corpus-client login — typing now displays ****. Non-Interactive Login: Ran uv run corpus-client login --phone --password — confirmed the CLI authenticates directly without triggering a masked prompt. Environment Check: Verified compatibility within the uv virtual environment and handled PEP 668 constraints.

Checklist: -[x] Code follows project styling (Ruff formatted) -[x] No unused imports -[x] pyproject.toml updated with new dependency -[x] Manual testing successful

Screenshot_from_2026-04-15_11-46-23

Edited by Vaishnavi Prabhala

Merge request reports

Loading