Skip to content

Conversation

pavelgj
Copy link
Collaborator

@pavelgj pavelgj commented May 13, 2024

No description provided.

@MichaelDoyle MichaelDoyle changed the title Added (experimental) non-intetractive mode option for genkit init Added (experimental) non-interactive mode option for genkit init May 13, 2024
Copy link
Member

@MichaelDoyle MichaelDoyle left a comment

Choose a reason for hiding this comment

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

Looks good.

Left a small idea for you in case it helps wrt booleans.

.option(
'--non-interactive',
'Run init in non-interactive mode (experimental)'
)
Copy link
Member

Choose a reason for hiding this comment

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

What do you think about doing --interactive with a default setting of "true"?

Might help with some of the double-negatives later on.

!nonInteractive

and

!process.argv.includes('--non-interactive')

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

General recommendation is to avoid boolean flags with default value of true...

Copy link
Member

Choose a reason for hiding this comment

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

ok 😄 I could see why (--non-interactive vs --interactive=false) it's just a readability thing in the code itself to consider from my perspective.

alternatively, could try and come up w/ something "positive" like --skip-prompts, but let's not spin our wheels on it.

@pavelgj pavelgj merged commit 25a0c80 into main May 13, 2024
@pavelgj pavelgj deleted the pavelgj/noninteractiveinit branch May 13, 2024 13:54
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.

2 participants