Hacker News new | past | comments | ask | show | jobs | submit login
Aider: Using Uv as an Installer (simonwillison.net)
39 points by anotherpaulg 53 days ago | hide | past | favorite | 14 comments



The premise of an installer is pretty scary to me. Its so unclear to me what is going to happen to my system, or how I'd undo it. The Aider instructions/installer was not something I felt like I could use.

There also weren't docs for building/running it from source, which is usually what if recent Debian packages aren't available (they aren't).

It took some tinkering (chaotically trying uv sync, uv venv commands, hacking pyproject.toml lightly after hitting some errors)… but eventually I built a wrapper script that runs:

uv run --project /opt/aider-git aider $*

There was definitely considerable angst over this process. I've rarely seen a project that left me so without guidance for how to run it myself. Wading into python projects often feels like it requires a long history of python packager/build tools knowledge, and has brought me considerably suffering. I've muddled through many dozens of projects, but never a moment of illumination, a feeling that I grok the scene, understand the pieces and how the tool is working those components together. There's lots of different tools & epochs of python, and it feels like there's no core truth, just many different semi-overlapping styles and techniques and you need context & experience to figure out what to apply.

Where-as node_modules and package.json#scripts have felt so direct, isolated, self explanatory to me. Feeling super abandoned by python tooling is a feeling I'm used to. It was, at least, some comfort to have squeaked out a win once again though!


Thanks for trying aider! Sorry to hear you had trouble with the install. Installing Python cli tools is tricky, which is why I recommend using the uv-based installer.

The docs do list a variety of other install methods:

https://aider.chat/docs/install.html

And there is a faq about running aider from source:

https://aider.chat/docs/faq.html#how-can-i-run-aider-locally...


Here’s my write up about the unique ways that aider uses uv as an installer.

https://aider.chat/2025/01/15/uv.html

Offering these install methods dramatically reduced the number of GitHub issues from users with conflicted/broken python environments.


I really want to love uv: It's a hair away from being perfect, they just have to find a solution to the "poetry version" (bump) problem = https://github.com/astral-sh/uv/issues/6298 (Work in progress, last I heard!).

Once we have a way to get package version bumps, I can finally leave poetry for the speed of uv!

Of particular interest to me, uv has "workspaces", perfect for monorepo-like sub-packages: useful for plugin-based workflows where you may want to keep a few independent plugins in one repo.


Aider is the only python based program I’ve ever used that didn’t make versioning my problem. It runs, it upgrades, it asks nicely to upgrade, it sends me to the release notes.. It’s super smooth. I hadn’t really noticed installation at all, which is probably the nicest compliment you can pay to a python tool.


I’ve had issues with aider versions on nixos. :(

Packaging python on nix is a big pain tho.


I think this is an interesting way to package a python library but, they also have curl -LsSf https://aider.chat/install.sh | sh instead so I can see the tradeoff either install a whole new package manager or just trust that the shell script is legit.

I still use either pip -m venv venv or conda. I really tried to figure out uv but I just switch back to venv because it was too hard to use.

Also, when I tried Aider I really didn't like this feature

* Aider automatically git commits changes with a sensible commit message.

since I rather actually do the commits (I'm guessing this can be turned off).


You can use —no-auto-commits or see these docs for all the git settings:

https://aider.chat/docs/git.html


Unfortunately this also breaks the undo functionality of Aider :(


I think you can /commit through aider and still undo it, but I'm not certain.

I use no-auto-commits


I usually add "upgrade": `uv tool install --upgrade --python python3.12 aider-chat`. So that it will upgrade the version to the latest if the current one is not already.


I also started using uv -- it is fantastic in so many ways, and "uv tool" is certainly one of them.

For this particular use case, you can use `uvx`, which is a shorthand for `uv tool run`, which is a great alternative for installing random python tools in isolation.

Such as this one. Or for example, python-kasa (for controlling TP Kasa plugs) or esphome (the build script)

Prior to doing this, it was either manage virtualenvs (one for each tool), or rely on a mess of Arch packages.


Why is this necessary? I just alias aider to:

uv tool run --python 3.11 --from aider-chat@latest aider


It's useful for people who don't know how to alias something, or what uv is, or how to use uv run.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: