Skip to content

Feature Proposal: Interactive Configuration Initialization (commitg init) #7

@geekayush

Description

@geekayush

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions