From 6f9e0ce37f60440c5f2ab3afa50944eaab8339c1 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Wed, 5 Jun 2024 19:43:24 -0700 Subject: [PATCH] cog to update usage.md --- aider/args.py | 1 + dev-requirements.in | 3 ++- dev-requirements.txt | 2 ++ scripts/update-docs.sh | 6 +++++ website/docs/usage.md | 56 +++++++++++++++++++++++------------------- 5 files changed, 42 insertions(+), 26 deletions(-) create mode 100755 scripts/update-docs.sh diff --git a/aider/args.py b/aider/args.py index f99006155..1a316ea76 100644 --- a/aider/args.py +++ b/aider/args.py @@ -454,6 +454,7 @@ def get_parser(default_config_files, git_root): def get_help(): os.environ["COLUMNS"] = "100" + sys.argv[0] = "aider" parser = get_parser([], None) return parser.format_help() diff --git a/dev-requirements.in b/dev-requirements.in index 163a9ed2b..6f67a0f91 100644 --- a/dev-requirements.in +++ b/dev-requirements.in @@ -8,4 +8,5 @@ matplotlib pandas typer imgcat -pre-commit \ No newline at end of file +pre-commit +cogapp diff --git a/dev-requirements.txt b/dev-requirements.txt index 1b97b4d8d..19c3acee8 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -20,6 +20,8 @@ click==8.1.7 # via # pip-tools # typer +cogapp==3.4.1 + # via -r dev-requirements.in contourpy==1.2.1 # via matplotlib cycler==0.12.1 diff --git a/scripts/update-docs.sh b/scripts/update-docs.sh new file mode 100755 index 000000000..0e76483e7 --- /dev/null +++ b/scripts/update-docs.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +# exit when any command fails +set -e + +cog -r website/docs/usage.md diff --git a/website/docs/usage.md b/website/docs/usage.md index 8952bfbbf..c95e75319 100644 --- a/website/docs/usage.md +++ b/website/docs/usage.md @@ -33,31 +33,37 @@ command line switches, environment variables or via a configuration file. See `aider --help` below for details. + ``` -usage: args.py [-h] [--openai-api-key OPENAI_API_KEY] [--anthropic-api-key ANTHROPIC_API_KEY] - [--model MODEL] [--opus] [--sonnet] [--4] [--4o] [--4-turbo] [--35turbo] - [--models MODEL] [--openai-api-base OPENAI_API_BASE] - [--openai-api-type OPENAI_API_TYPE] [--openai-api-version OPENAI_API_VERSION] - [--openai-api-deployment-id OPENAI_API_DEPLOYMENT_ID] - [--openai-organization-id OPENAI_ORGANIZATION_ID] [--edit-format EDIT_FORMAT] - [--weak-model WEAK_MODEL] [--show-model-warnings | --no-show-model-warnings] - [--map-tokens MAP_TOKENS] [--max-chat-history-tokens MAX_CHAT_HISTORY_TOKENS] - [--env-file ENV_FILE] [--input-history-file INPUT_HISTORY_FILE] - [--chat-history-file CHAT_HISTORY_FILE] - [--restore-chat-history | --no-restore-chat-history] [--dark-mode] [--light-mode] - [--pretty | --no-pretty] [--stream | --no-stream] - [--user-input-color USER_INPUT_COLOR] [--tool-output-color TOOL_OUTPUT_COLOR] - [--tool-error-color TOOL_ERROR_COLOR] - [--assistant-output-color ASSISTANT_OUTPUT_COLOR] [--code-theme CODE_THEME] - [--show-diffs] [--git | --no-git] [--gitignore | --no-gitignore] - [--aiderignore AIDERIGNORE] [--auto-commits | --no-auto-commits] - [--dirty-commits | --no-dirty-commits] [--dry-run | --no-dry-run] [--commit] - [--lint] [--lint-cmd LINT_CMD] [--auto-lint | --no-auto-lint] [--test-cmd TEST_CMD] - [--auto-test | --no-auto-test] [--test] [--voice-language VOICE_LANGUAGE] - [--version] [--check-update] [--skip-check-update] [--apply FILE] [--yes] [-v] - [--show-repo-map] [--show-prompts] [--message COMMAND] - [--message-file MESSAGE_FILE] [--encoding ENCODING] [-c CONFIG_FILE] [--gui] - [FILE ...] +usage: aider [-h] [--openai-api-key OPENAI_API_KEY] [--anthropic-api-key ANTHROPIC_API_KEY] + [--model MODEL] [--opus] [--sonnet] [--4] [--4o] [--4-turbo] [--35turbo] + [--models MODEL] [--openai-api-base OPENAI_API_BASE] + [--openai-api-type OPENAI_API_TYPE] [--openai-api-version OPENAI_API_VERSION] + [--openai-api-deployment-id OPENAI_API_DEPLOYMENT_ID] + [--openai-organization-id OPENAI_ORGANIZATION_ID] [--edit-format EDIT_FORMAT] + [--weak-model WEAK_MODEL] [--show-model-warnings | --no-show-model-warnings] + [--map-tokens MAP_TOKENS] [--max-chat-history-tokens MAX_CHAT_HISTORY_TOKENS] + [--env-file ENV_FILE] [--input-history-file INPUT_HISTORY_FILE] + [--chat-history-file CHAT_HISTORY_FILE] + [--restore-chat-history | --no-restore-chat-history] [--dark-mode] [--light-mode] + [--pretty | --no-pretty] [--stream | --no-stream] + [--user-input-color USER_INPUT_COLOR] [--tool-output-color TOOL_OUTPUT_COLOR] + [--tool-error-color TOOL_ERROR_COLOR] + [--assistant-output-color ASSISTANT_OUTPUT_COLOR] [--code-theme CODE_THEME] + [--show-diffs] [--git | --no-git] [--gitignore | --no-gitignore] + [--aiderignore AIDERIGNORE] [--auto-commits | --no-auto-commits] + [--dirty-commits | --no-dirty-commits] [--dry-run | --no-dry-run] [--commit] [--lint] + [--lint-cmd LINT_CMD] [--auto-lint | --no-auto-lint] [--test-cmd TEST_CMD] + [--auto-test | --no-auto-test] [--test] [--voice-language VOICE_LANGUAGE] [--version] + [--check-update] [--skip-check-update] [--apply FILE] [--yes] [-v] [--show-repo-map] + [--show-prompts] [--message COMMAND] [--message-file MESSAGE_FILE] + [--encoding ENCODING] [-c CONFIG_FILE] [--gui] + [FILE ...] aider is GPT powered coding in your terminal @@ -185,5 +191,5 @@ Args that start with '--' can also be set in a config file (specified via -c). T uses YAML syntax and must represent a YAML 'mapping' (for details, see http://learn.getgrav.org/advanced/yaml). In general, command-line values override environment variables which override config file values which override defaults. - ``` + \ No newline at end of file