Summary
Introduce a new CLI command, commitg init, which interactively guides users through the setup of Commit-G configuration using the prompts package. This command will generate a configuration file in the project root based on user input, streamlining the onboarding and configuration process.
Motivation
- Reduce friction for new users by eliminating the need to manually create and edit configuration files.
- Ensure correct configuration by validating user input and providing sensible defaults.
- Improve user experience with a guided, interactive setup.
Scope & Requirements
CLI Integration
- Add a new command:
commitg init
- When invoked, this command should:
- Prompt the user for all relevant configuration options.
- Write the resulting configuration to file in the project root.
Prompts & Options
- Use the
prompts package for interactive questions.
- Prompt for the following options:
- Gemini API Key (
apiKey) – required
- Model (
model) – default: gemini-1.5-flash
- Max Diff Length (
maxDiffLength) – default: 10000
- Emoji Support (
emoji) – default: true
- Prefix (
prefix) – optional
- Max Retries (
maxRetries) – default: 2
File Handling
- If configuration file already exists:
- Prompt the user to confirm overwriting the file.
- Abort if the user declines.
Documentation
- Update the README to document the new
commitg init command and its benefits.
Summary
Introduce a new CLI command,
commitg init, which interactively guides users through the setup of Commit-G configuration using thepromptspackage. This command will generate a configuration file in the project root based on user input, streamlining the onboarding and configuration process.Motivation
Scope & Requirements
CLI Integration
commitg initPrompts & Options
promptspackage for interactive questions.apiKey) – requiredmodel) – default:gemini-1.5-flashmaxDiffLength) – default:10000emoji) – default:trueprefix) – optionalmaxRetries) – default:2File Handling
Documentation
commitg initcommand and its benefits.