From 29e77c2b4d2414e0380e1c70f26141e86c15abca Mon Sep 17 00:00:00 2001 From: thiswillbeyourgithub <26625900+thiswillbeyourgithub@users.noreply.github.com> Date: Fri, 3 Oct 2025 10:37:44 +0200 Subject: [PATCH] fix: add --user argument when installing addons Signed-off-by: thiswillbeyourgithub <26625900+thiswillbeyourgithub@users.noreply.github.com> --- llm/cli.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/llm/cli.py b/llm/cli.py index 2e11e2c8..7e41f35a 100644 --- a/llm/cli.py +++ b/llm/cli.py @@ -2996,7 +2996,12 @@ def display_truncated(text): is_flag=True, help="Include pre-release and development versions", ) -def install(packages, upgrade, editable, force_reinstall, no_cache_dir, pre): +@click.option( + "--user", + is_flag=True, + help="Install to the Python user install directory for your platform.", +) +def install(packages, upgrade, editable, force_reinstall, no_cache_dir, pre, user): """Install packages from PyPI into the same environment as LLM""" args = ["pip", "install"] if upgrade: @@ -3009,6 +3014,8 @@ def install(packages, upgrade, editable, force_reinstall, no_cache_dir, pre): args += ["--no-cache-dir"] if pre: args += ["--pre"] + if user: + args += ["--user"] args += list(packages) sys.argv = args run_module("pip", run_name="__main__")