fix defaults in sample yml

This commit is contained in:
Paul Gauthier 2024-06-06 12:46:07 -07:00
parent 0068a35554
commit 645ace1d0e
4 changed files with 344 additions and 342 deletions

View file

@ -483,7 +483,7 @@ def get_sample_yaml():
def main(): def main():
print(get_help()) print(get_sample_yaml())
if __name__ == "__main__": if __name__ == "__main__":

View file

@ -6,7 +6,7 @@ from .dump import dump # noqa: F401
class YamlHelpFormatter(argparse.HelpFormatter): class YamlHelpFormatter(argparse.HelpFormatter):
def start_section(self, heading): def start_section(self, heading):
res = "\n\n" res = "\n\n"
res += "#" * (len(heading) + 2) res += "#" * (len(heading) + 3)
res += f"\n# {heading}" res += f"\n# {heading}"
super().start_section(res) super().start_section(res)
@ -29,17 +29,19 @@ class YamlHelpFormatter(argparse.HelpFormatter):
if not metavar and isinstance(action, argparse._StoreAction): if not metavar and isinstance(action, argparse._StoreAction):
metavar = "VALUE" metavar = "VALUE"
if action.default not in (argparse.SUPPRESS, None): default = action.default
if isinstance(default, list) and not default:
default = ""
elif action.default not in (argparse.SUPPRESS, None):
default = action.default default = action.default
default = "true" if default else "false"
else: else:
default = False default = ""
default = "true" if default else "false"
if action.help: if action.help:
parts.append(f"# {action.help}") parts.append(f"## {action.help}")
parts.append(f"# {action.dest}: {default}\n") parts.append(f"#{action.dest}: {default}\n")
return "\n".join(parts) + "\n" return "\n".join(parts) + "\n"

View file

@ -3,215 +3,215 @@
# Place in your home dir, or at the root of your git repo. # Place in your home dir, or at the root of your git repo.
########################################################## ##########################################################
######### ##########
# options: # options:
# show this help message and exit ## show this help message and exit
# help: false #help:
###### #######
# Main: # Main:
# files to edit with an LLM (optional) ## files to edit with an LLM (optional)
# files: false #files:
# Specify the OpenAI API key ## Specify the OpenAI API key
# openai_api_key: false #openai_api_key:
# Specify the OpenAI API key ## Specify the OpenAI API key
# anthropic_api_key: false #anthropic_api_key:
# Specify the model to use for the main chat (default: gpt-4o) ## Specify the model to use for the main chat (default: gpt-4o)
# model: true #model: true
# Use claude-3-opus-20240229 model for the main chat ## Use claude-3-opus-20240229 model for the main chat
# model: false #model:
# Use claude-3-sonnet-20240229 model for the main chat ## Use claude-3-sonnet-20240229 model for the main chat
# model: false #model:
# Use gpt-4-0613 model for the main chat ## Use gpt-4-0613 model for the main chat
# model: false #model:
# Use gpt-4o model for the main chat ## Use gpt-4o model for the main chat
# model: false #model:
# Use gpt-4-1106-preview model for the main chat ## Use gpt-4-1106-preview model for the main chat
# model: false #model:
# Use gpt-3.5-turbo model for the main chat ## Use gpt-3.5-turbo model for the main chat
# model: false #model:
################
# Model Settings:
# List known models which match the (partial) MODEL name
# models: false
# Specify the api base url
# openai_api_base: false
# Specify the api_type
# openai_api_type: false
# Specify the api_version
# openai_api_version: false
# Specify the deployment_id
# openai_api_deployment_id: false
# Specify the OpenAI organization ID
# openai_organization_id: false
# Specify what edit format the LLM should use (default depends on model)
# edit_format: false
# Specify the model to use for commit messages and chat history summarization (default depends on --model)
# weak_model: false
# Only work with models that have meta-data available (default: True)
# show_model_warnings: true
# Max number of tokens to use for repo map, use 0 to disable (default: 1024)
# map_tokens: true
# Maximum number of tokens to use for chat history. If not specified, uses the model's max_chat_history_tokens.
# max_chat_history_tokens: false
# Specify the .env file to load (default: .env in git root)
# env_file: true
###############
# History Files:
# Specify the chat input history file (default: .aider.input.history)
# input_history_file: true
# Specify the chat history file (default: .aider.chat.history.md)
# chat_history_file: true
# Restore the previous chat history messages (default: False)
# restore_chat_history: false
################# #################
# Output Settings: # Model Settings:
# Use colors suitable for a dark terminal background (default: False) ## List known models which match the (partial) MODEL name
# dark_mode: false #models:
# Use colors suitable for a light terminal background (default: False) ## Specify the api base url
# light_mode: false #openai_api_base:
# Enable/disable pretty, colorized output (default: True) ## Specify the api_type
# pretty: true #openai_api_type:
# Enable/disable streaming responses (default: True) ## Specify the api_version
# stream: true #openai_api_version:
# Set the color for user input (default: #00cc00) ## Specify the deployment_id
# user_input_color: true #openai_api_deployment_id:
# Set the color for tool output (default: None) ## Specify the OpenAI organization ID
# tool_output_color: false #openai_organization_id:
# Set the color for tool error messages (default: red) ## Specify what edit format the LLM should use (default depends on model)
# tool_error_color: true #edit_format:
# Set the color for assistant output (default: #0088ff) ## Specify the model to use for commit messages and chat history summarization (default depends on --model)
# assistant_output_color: true #weak_model:
# Set the markdown code theme (default: default, other options include monokai, solarized-dark, solarized-light) ## Only work with models that have meta-data available (default: True)
# code_theme: true #show_model_warnings: true
# Show diffs when committing changes (default: False) ## Max number of tokens to use for repo map, use 0 to disable (default: 1024)
# show_diffs: false #map_tokens: true
############## ## Maximum number of tokens to use for chat history. If not specified, uses the model's max_chat_history_tokens.
# Git Settings: #max_chat_history_tokens:
# Enable/disable looking for a git repo (default: True) ## Specify the .env file to load (default: .env in git root)
# git: true #env_file: true
# Enable/disable adding .aider* to .gitignore (default: True)
# gitignore: true
# Specify the aider ignore file (default: .aiderignore in git root)
# aiderignore: true
# Enable/disable auto commit of LLM changes (default: True)
# auto_commits: true
# Enable/disable commits when repo is found dirty (default: True)
# dirty_commits: true
# Perform a dry run without modifying files (default: False)
# dry_run: false
#######################
# Fixing and committing:
# Commit all pending changes with a suitable commit message, then exit
# commit: false
# Lint and fix provided files, or dirty files if none provided
# lint: false
# Specify lint commands to run for different languages, eg: "python: flake8 --select=..." (can be used multiple times)
# lint_cmd: false
# Enable/disable automatic linting after changes (default: True)
# auto_lint: true
# Specify command to run tests
# test_cmd: false
# Enable/disable automatic testing after changes (default: False)
# auto_test: false
# Run tests and fix problems found
# test: false
################ ################
# History Files:
## Specify the chat input history file (default: .aider.input.history)
#input_history_file: true
## Specify the chat history file (default: .aider.chat.history.md)
#chat_history_file: true
## Restore the previous chat history messages (default: False)
#restore_chat_history: false
##################
# Output Settings:
## Use colors suitable for a dark terminal background (default: False)
#dark_mode: false
## Use colors suitable for a light terminal background (default: False)
#light_mode: false
## Enable/disable pretty, colorized output (default: True)
#pretty: true
## Enable/disable streaming responses (default: True)
#stream: true
## Set the color for user input (default: #00cc00)
#user_input_color: true
## Set the color for tool output (default: None)
#tool_output_color:
## Set the color for tool error messages (default: red)
#tool_error_color: true
## Set the color for assistant output (default: #0088ff)
#assistant_output_color: true
## Set the markdown code theme (default: default, other options include monokai, solarized-dark, solarized-light)
#code_theme: true
## Show diffs when committing changes (default: False)
#show_diffs: false
###############
# Git Settings:
## Enable/disable looking for a git repo (default: True)
#git: true
## Enable/disable adding .aider* to .gitignore (default: True)
#gitignore: true
## Specify the aider ignore file (default: .aiderignore in git root)
#aiderignore: true
## Enable/disable auto commit of LLM changes (default: True)
#auto_commits: true
## Enable/disable commits when repo is found dirty (default: True)
#dirty_commits: true
## Perform a dry run without modifying files (default: False)
#dry_run: false
########################
# Fixing and committing:
## Commit all pending changes with a suitable commit message, then exit
#commit: false
## Lint and fix provided files, or dirty files if none provided
#lint: false
## Specify lint commands to run for different languages, eg: "python: flake8 --select=..." (can be used multiple times)
#lint_cmd:
## Enable/disable automatic linting after changes (default: True)
#auto_lint: true
## Specify command to run tests
#test_cmd:
## Enable/disable automatic testing after changes (default: False)
#auto_test: false
## Run tests and fix problems found
#test: false
#################
# Other Settings: # Other Settings:
# Specify the language for voice using ISO 639-1 code (default: auto) ## Specify the language for voice using ISO 639-1 code (default: auto)
# voice_language: true #voice_language: true
# Show the version number and exit ## Show the version number and exit
# version: false #version:
# Check for updates and return status in the exit code ## Check for updates and return status in the exit code
# check_update: false #check_update: false
# Skips checking for the update when the program runs ## Skips checking for the update when the program runs
# skip_check_update: false #skip_check_update: false
# Apply the changes from the given file instead of running the chat (debug) ## Apply the changes from the given file instead of running the chat (debug)
# apply: false #apply:
# Always say yes to every confirmation ## Always say yes to every confirmation
# yes: false #yes:
# Enable verbose output ## Enable verbose output
# verbose: false #verbose: false
# Print the repo map and exit (debug) ## Print the repo map and exit (debug)
# show_repo_map: false #show_repo_map: false
# Print the system prompts and exit (debug) ## Print the system prompts and exit (debug)
# show_prompts: false #show_prompts: false
# Specify a single message to send the LLM, process reply then exit (disables chat mode) ## Specify a single message to send the LLM, process reply then exit (disables chat mode)
# message: false #message:
# Specify a file containing the message to send the LLM, process reply, then exit (disables chat mode) ## Specify a file containing the message to send the LLM, process reply, then exit (disables chat mode)
# message_file: false #message_file:
# Specify the encoding for input and output (default: utf-8) ## Specify the encoding for input and output (default: utf-8)
# encoding: true #encoding: true
# Specify the config file (default: search for .aider.conf.yml in git root, cwd or home directory) ## Specify the config file (default: search for .aider.conf.yml in git root, cwd or home directory)
# config: false #config:
# Run aider in your browser ## Run aider in your browser
# gui: false #gui: false

View file

@ -26,217 +26,217 @@ cog.outl("```")
# Place in your home dir, or at the root of your git repo. # Place in your home dir, or at the root of your git repo.
########################################################## ##########################################################
######### ##########
# options: # options:
# show this help message and exit ## show this help message and exit
# help: false #help:
###### #######
# Main: # Main:
# files to edit with an LLM (optional) ## files to edit with an LLM (optional)
# files: false #files:
# Specify the OpenAI API key ## Specify the OpenAI API key
# openai_api_key: false #openai_api_key:
# Specify the OpenAI API key ## Specify the OpenAI API key
# anthropic_api_key: false #anthropic_api_key:
# Specify the model to use for the main chat (default: gpt-4o) ## Specify the model to use for the main chat (default: gpt-4o)
# model: true #model: true
# Use claude-3-opus-20240229 model for the main chat ## Use claude-3-opus-20240229 model for the main chat
# model: false #model:
# Use claude-3-sonnet-20240229 model for the main chat ## Use claude-3-sonnet-20240229 model for the main chat
# model: false #model:
# Use gpt-4-0613 model for the main chat ## Use gpt-4-0613 model for the main chat
# model: false #model:
# Use gpt-4o model for the main chat ## Use gpt-4o model for the main chat
# model: false #model:
# Use gpt-4-1106-preview model for the main chat ## Use gpt-4-1106-preview model for the main chat
# model: false #model:
# Use gpt-3.5-turbo model for the main chat ## Use gpt-3.5-turbo model for the main chat
# model: false #model:
################
# Model Settings:
# List known models which match the (partial) MODEL name
# models: false
# Specify the api base url
# openai_api_base: false
# Specify the api_type
# openai_api_type: false
# Specify the api_version
# openai_api_version: false
# Specify the deployment_id
# openai_api_deployment_id: false
# Specify the OpenAI organization ID
# openai_organization_id: false
# Specify what edit format the LLM should use (default depends on model)
# edit_format: false
# Specify the model to use for commit messages and chat history summarization (default depends on --model)
# weak_model: false
# Only work with models that have meta-data available (default: True)
# show_model_warnings: true
# Max number of tokens to use for repo map, use 0 to disable (default: 1024)
# map_tokens: true
# Maximum number of tokens to use for chat history. If not specified, uses the model's max_chat_history_tokens.
# max_chat_history_tokens: false
# Specify the .env file to load (default: .env in git root)
# env_file: true
###############
# History Files:
# Specify the chat input history file (default: .aider.input.history)
# input_history_file: true
# Specify the chat history file (default: .aider.chat.history.md)
# chat_history_file: true
# Restore the previous chat history messages (default: False)
# restore_chat_history: false
################# #################
# Output Settings: # Model Settings:
# Use colors suitable for a dark terminal background (default: False) ## List known models which match the (partial) MODEL name
# dark_mode: false #models:
# Use colors suitable for a light terminal background (default: False) ## Specify the api base url
# light_mode: false #openai_api_base:
# Enable/disable pretty, colorized output (default: True) ## Specify the api_type
# pretty: true #openai_api_type:
# Enable/disable streaming responses (default: True) ## Specify the api_version
# stream: true #openai_api_version:
# Set the color for user input (default: #00cc00) ## Specify the deployment_id
# user_input_color: true #openai_api_deployment_id:
# Set the color for tool output (default: None) ## Specify the OpenAI organization ID
# tool_output_color: false #openai_organization_id:
# Set the color for tool error messages (default: red) ## Specify what edit format the LLM should use (default depends on model)
# tool_error_color: true #edit_format:
# Set the color for assistant output (default: #0088ff) ## Specify the model to use for commit messages and chat history summarization (default depends on --model)
# assistant_output_color: true #weak_model:
# Set the markdown code theme (default: default, other options include monokai, solarized-dark, solarized-light) ## Only work with models that have meta-data available (default: True)
# code_theme: true #show_model_warnings: true
# Show diffs when committing changes (default: False) ## Max number of tokens to use for repo map, use 0 to disable (default: 1024)
# show_diffs: false #map_tokens: true
############## ## Maximum number of tokens to use for chat history. If not specified, uses the model's max_chat_history_tokens.
# Git Settings: #max_chat_history_tokens:
# Enable/disable looking for a git repo (default: True) ## Specify the .env file to load (default: .env in git root)
# git: true #env_file: true
# Enable/disable adding .aider* to .gitignore (default: True)
# gitignore: true
# Specify the aider ignore file (default: .aiderignore in git root)
# aiderignore: true
# Enable/disable auto commit of LLM changes (default: True)
# auto_commits: true
# Enable/disable commits when repo is found dirty (default: True)
# dirty_commits: true
# Perform a dry run without modifying files (default: False)
# dry_run: false
#######################
# Fixing and committing:
# Commit all pending changes with a suitable commit message, then exit
# commit: false
# Lint and fix provided files, or dirty files if none provided
# lint: false
# Specify lint commands to run for different languages, eg: "python: flake8 --select=..." (can be used multiple times)
# lint_cmd: false
# Enable/disable automatic linting after changes (default: True)
# auto_lint: true
# Specify command to run tests
# test_cmd: false
# Enable/disable automatic testing after changes (default: False)
# auto_test: false
# Run tests and fix problems found
# test: false
################ ################
# History Files:
## Specify the chat input history file (default: .aider.input.history)
#input_history_file: true
## Specify the chat history file (default: .aider.chat.history.md)
#chat_history_file: true
## Restore the previous chat history messages (default: False)
#restore_chat_history: false
##################
# Output Settings:
## Use colors suitable for a dark terminal background (default: False)
#dark_mode: false
## Use colors suitable for a light terminal background (default: False)
#light_mode: false
## Enable/disable pretty, colorized output (default: True)
#pretty: true
## Enable/disable streaming responses (default: True)
#stream: true
## Set the color for user input (default: #00cc00)
#user_input_color: true
## Set the color for tool output (default: None)
#tool_output_color:
## Set the color for tool error messages (default: red)
#tool_error_color: true
## Set the color for assistant output (default: #0088ff)
#assistant_output_color: true
## Set the markdown code theme (default: default, other options include monokai, solarized-dark, solarized-light)
#code_theme: true
## Show diffs when committing changes (default: False)
#show_diffs: false
###############
# Git Settings:
## Enable/disable looking for a git repo (default: True)
#git: true
## Enable/disable adding .aider* to .gitignore (default: True)
#gitignore: true
## Specify the aider ignore file (default: .aiderignore in git root)
#aiderignore: true
## Enable/disable auto commit of LLM changes (default: True)
#auto_commits: true
## Enable/disable commits when repo is found dirty (default: True)
#dirty_commits: true
## Perform a dry run without modifying files (default: False)
#dry_run: false
########################
# Fixing and committing:
## Commit all pending changes with a suitable commit message, then exit
#commit: false
## Lint and fix provided files, or dirty files if none provided
#lint: false
## Specify lint commands to run for different languages, eg: "python: flake8 --select=..." (can be used multiple times)
#lint_cmd:
## Enable/disable automatic linting after changes (default: True)
#auto_lint: true
## Specify command to run tests
#test_cmd:
## Enable/disable automatic testing after changes (default: False)
#auto_test: false
## Run tests and fix problems found
#test: false
#################
# Other Settings: # Other Settings:
# Specify the language for voice using ISO 639-1 code (default: auto) ## Specify the language for voice using ISO 639-1 code (default: auto)
# voice_language: true #voice_language: true
# Show the version number and exit ## Show the version number and exit
# version: false #version:
# Check for updates and return status in the exit code ## Check for updates and return status in the exit code
# check_update: false #check_update: false
# Skips checking for the update when the program runs ## Skips checking for the update when the program runs
# skip_check_update: false #skip_check_update: false
# Apply the changes from the given file instead of running the chat (debug) ## Apply the changes from the given file instead of running the chat (debug)
# apply: false #apply:
# Always say yes to every confirmation ## Always say yes to every confirmation
# yes: false #yes:
# Enable verbose output ## Enable verbose output
# verbose: false #verbose: false
# Print the repo map and exit (debug) ## Print the repo map and exit (debug)
# show_repo_map: false #show_repo_map: false
# Print the system prompts and exit (debug) ## Print the system prompts and exit (debug)
# show_prompts: false #show_prompts: false
# Specify a single message to send the LLM, process reply then exit (disables chat mode) ## Specify a single message to send the LLM, process reply then exit (disables chat mode)
# message: false #message:
# Specify a file containing the message to send the LLM, process reply, then exit (disables chat mode) ## Specify a file containing the message to send the LLM, process reply, then exit (disables chat mode)
# message_file: false #message_file:
# Specify the encoding for input and output (default: utf-8) ## Specify the encoding for input and output (default: utf-8)
# encoding: true #encoding: true
# Specify the config file (default: search for .aider.conf.yml in git root, cwd or home directory) ## Specify the config file (default: search for .aider.conf.yml in git root, cwd or home directory)
# config: false #config:
# Run aider in your browser ## Run aider in your browser
# gui: false #gui: false
``` ```
<!--[[[end]]]--> <!--[[[end]]]-->