Skip to content

Conversation

@ukumar-ks
Copy link
Contributor

Implemented the 'generate' command, which generates random passwords according to user-defined parameters for password length, complexity, and composition.

@adeshmukh-ks adeshmukh-ks changed the base branch from master to generate November 4, 2025 11:45
try:
import pyperclip
CLIPBOARD_AVAILABLE = True
except ImportError:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove try except while importing


def execute(self, context: KeeperParams, **kwargs) -> Any:
"""Execute the password generation command."""
try:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add context and vault verification to ensure user is logged in, refer other command execution method


if not request.enable_breach_scan:
logger.debug("BreachWatch scanning disabled by user")
elif context.vault and context.vault.breach_watch_plugin():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dont check context.vault here, that would be the first step in execute method
Don't pass context to this method, only pass vault

breach_watch = breach_watch_plugin.breach_watch
logger.debug("Using BreachWatch for password scanning")
else:
logger.debug("BreachWatch not available (vault not initialized or feature not enabled)")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change this mesaage to breachwatch plugin not available, enable it to use and make it logger.warning

@@ -0,0 +1,4 @@
Strength(%) BreachWatch Password
1 100 Skipped helmet prosper artefact paddle style cannon slow left original logic hawk loyal middle sugar enable carbon asset hood patient apple ability seminar fold family
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose of this file

Copy link
Contributor

@adeshmukh-ks adeshmukh-ks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In all examples, remove arguments from the CLI and add hardcoded variables which can be forwarded to the functions instead, this makes it easier to change for user

@adeshmukh-ks adeshmukh-ks changed the base branch from generate to generate-command November 12, 2025 10:01
@adeshmukh-ks adeshmukh-ks changed the title Generate command Generate command added Nov 12, 2025
@adeshmukh-ks adeshmukh-ks merged commit 7f09e8d into generate-command Nov 12, 2025
2 checks passed
@adeshmukh-ks adeshmukh-ks deleted the generate-int branch November 12, 2025 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants