From 0b112e948f6ea1690f9e93f10e6ba8c4cfbd1a92 Mon Sep 17 00:00:00 2001 From: saviour Date: Sat, 10 May 2025 21:38:08 +0900 Subject: [PATCH 1/2] feat: Enable file completion for all file-related arguments --- aider/args.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/aider/args.py b/aider/args.py index 1543bb07e..bb81cae01 100644 --- a/aider/args.py +++ b/aider/args.py @@ -43,7 +43,7 @@ def get_parser(default_config_files, git_root): group = parser.add_argument_group("Main model") group.add_argument( "files", metavar="FILE", nargs="*", help="files to edit with an LLM (optional)" - ) + ).complete = shtab.FILE group.add_argument( "--model", metavar="MODEL", @@ -110,13 +110,13 @@ def get_parser(default_config_files, git_root): metavar="MODEL_SETTINGS_FILE", default=".aider.model.settings.yml", help="Specify a file with aider model settings for unknown models", - ) + ).complete = shtab.FILE group.add_argument( "--model-metadata-file", metavar="MODEL_METADATA_FILE", default=".aider.model.metadata.json", help="Specify a file with context window and costs for unknown models", - ) + ).complete = shtab.FILE group.add_argument( "--alias", action="append", @@ -262,13 +262,13 @@ def get_parser(default_config_files, git_root): metavar="INPUT_HISTORY_FILE", default=default_input_history_file, help=f"Specify the chat input history file (default: {default_input_history_file})", - ) + ).complete = shtab.FILE group.add_argument( "--chat-history-file", metavar="CHAT_HISTORY_FILE", default=default_chat_history_file, help=f"Specify the chat history file (default: {default_chat_history_file})", - ) + ).complete = shtab.FILE group.add_argument( "--restore-chat-history", action=argparse.BooleanOptionalAction, @@ -280,7 +280,7 @@ def get_parser(default_config_files, git_root): metavar="LLM_HISTORY_FILE", default=None, help="Log the conversation with the LLM to this file (for example, .aider.llm.history)", - ) + ).complete = shtab.FILE ########## group = parser.add_argument_group("Output settings") @@ -552,7 +552,7 @@ def get_parser(default_config_files, git_root): "--analytics-log", metavar="ANALYTICS_LOG_FILE", help="Specify a file to log analytics events", - ) + ).complete = shtab.FILE group.add_argument( "--analytics-disable", action="store_true", @@ -619,7 +619,7 @@ def get_parser(default_config_files, git_root): "Specify a file containing the message to send the LLM, process reply, then exit" " (disables chat mode)" ), - ) + ).complete = shtab.FILE group.add_argument( "--gui", "--browser", @@ -637,7 +637,7 @@ def get_parser(default_config_files, git_root): "--apply", metavar="FILE", help="Apply the changes from the given file instead of running the chat (debug)", - ) + ).complete = shtab.FILE group.add_argument( "--apply-clipboard-edits", action="store_true", @@ -698,13 +698,13 @@ def get_parser(default_config_files, git_root): action="append", metavar="FILE", help="specify a file to edit (can be used multiple times)", - ) + ).complete = shtab.FILE group.add_argument( "--read", action="append", metavar="FILE", help="specify a read-only file (can be used multiple times)", - ) + ).complete = shtab.FILE group.add_argument( "--vim", action="store_true", @@ -734,7 +734,7 @@ def get_parser(default_config_files, git_root): "--load", metavar="LOAD_FILE", help="Load and execute /commands from a file on launch", - ) + ).complete = shtab.FILE group.add_argument( "--encoding", default="utf-8", @@ -755,7 +755,7 @@ def get_parser(default_config_files, git_root): "Specify the config file (default: search for .aider.conf.yml in git root, cwd" " or home directory)" ), - ) + ).complete = shtab.FILE # This is a duplicate of the argument in the preparser and is a no-op by this time of # argument parsing, but it's here so that the help is displayed as expected. group.add_argument( @@ -763,7 +763,7 @@ def get_parser(default_config_files, git_root): metavar="ENV_FILE", default=default_env_file(git_root), help="Specify the .env file to load (default: .env in git root)", - ) + ).complete = shtab.FILE group.add_argument( "--suggest-shell-commands", action=argparse.BooleanOptionalAction, From f018b5fab54f767d69162ce9395f751aa33e2587 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Sun, 11 May 2025 07:56:55 -0700 Subject: [PATCH 2/2] include pip in uv installs --- aider/website/docs/install.md | 14 +++++++------- aider/website/install.ps1 | 2 +- aider/website/install.sh | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/aider/website/docs/install.md b/aider/website/docs/install.md index 024c76f34..0ebf1d2e2 100644 --- a/aider/website/docs/install.md +++ b/aider/website/docs/install.md @@ -28,12 +28,6 @@ These one-liners will install aider, along with python 3.12 if needed. They are based on the [uv installers](https://docs.astral.sh/uv/getting-started/installation/). -#### Windows - -```powershell -powershell -ExecutionPolicy ByPass -c "irm https://aider.chat/install.ps1 | iex" -``` - #### Mac & Linux Use curl to download the script and execute it with sh: @@ -48,6 +42,12 @@ If your system doesn't have curl, you can use wget: wget -qO- https://aider.chat/install.sh | sh ``` +#### Windows + +```powershell +powershell -ExecutionPolicy ByPass -c "irm https://aider.chat/install.ps1 | iex" +``` + ## Install with uv @@ -55,7 +55,7 @@ You can install aider with uv: ```bash python -m pip install uv # If you need to install uv -uv tool install --force --python python3.12 aider-chat@latest +uv tool install --force --python python3.12 --with pip aider-chat@latest ``` This will install uv using your existing python version 3.8-3.13, diff --git a/aider/website/install.ps1 b/aider/website/install.ps1 index 116b5e118..dcb2376e8 100644 --- a/aider/website/install.ps1 +++ b/aider/website/install.ps1 @@ -425,7 +425,7 @@ function Invoke-Installer($artifacts, $platforms) { Write-Information "" Write-Information "Installing aider-chat..." - & "$dest_dir\uv.exe" tool install --force --python python3.12 aider-chat@latest + & "$dest_dir\uv.exe" tool install --force --python python3.12 --with pip aider-chat@latest if (-not $NoModifyPath) { Add-Ci-Path $dest_dir diff --git a/aider/website/install.sh b/aider/website/install.sh index e0e234826..187d706ef 100644 --- a/aider/website/install.sh +++ b/aider/website/install.sh @@ -1178,7 +1178,7 @@ install() { say "Installing aider..." say "" # Install aider-chat using the newly installed uv - ensure "${_install_dir}/uv" tool install --force --python python3.12 aider-chat@latest + ensure "${_install_dir}/uv" tool install --force --python python3.12 --with pip aider-chat@latest # Avoid modifying the users PATH if they are managing their PATH manually case :$PATH: