Skip to content

feat(config): add 'describe' mode to config command for detailed parameter info #476

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 30, 2025

Conversation

benleibowitz
Copy link
Contributor

@benleibowitz benleibowitz commented May 29, 2025

This commit adds a new 'describe' mode to the config command, allowing users to get detailed information about configuration parameters. It includes:

  1. New CONFIG_MODES.describe enum value
  2. Functions to generate and print help messages for config parameters
  3. Updated configCommand to handle the new 'describe' mode
  4. README updates to document the new 'describe' functionality

The describe mode can be used in two ways:

  1. To print help for all available config parameters: oco config describe

  2. To print help for specific config parameters: oco config describe OCO_MODEL OCO_API_KEY

Additionally, the commit fixes the error handling for the get and set modes, ensuring that an error is thrown if no config keys are provided.

These changes improve the usability and discoverability of the configuration system, making it easier for users to understand and manage their opencommit settings.

See #470

Example Usage

oco config describe
┌  COMMAND: config describe 
Available config parameters:

OCO_AI_PROVIDER:
  Description: The AI provider to use
  Default: openai

OCO_API_KEY:
  Description: API key for the selected provider

OCO_API_URL:
  Description: Custom API URL - may be used to set proxy path to OpenAI API

OCO_DESCRIPTION:
  Description: Postface a message with ~3 sentences description of the changes
  Default: false
...
...
... 
oco config describe OCO_AI_PROVIDER
┌  COMMAND: config describe OCO_AI_PROVIDER

OCO_AI_PROVIDER:
  Description: The AI provider to use
  Default: openai
  Accepted values:
    - ollama
    - openai
    - anthropic
    - gemini
    - azure
    - test
    - flowise
    - groq
    - mistral
    - mlx
    - deepseek

…meter info

This commit adds a new 'describe' mode to the config command, allowing users
to get detailed information about configuration parameters. It includes:

1. New CONFIG_MODES.describe enum value
2. Functions to generate and print help messages for config parameters
3. Updated configCommand to handle the new 'describe' mode
4. README updates to document the new 'describe' functionality
@di-sukharev di-sukharev merged commit 063aa94 into di-sukharev:master May 30, 2025
5 checks passed
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