This repository provides a Nix Flake configuration for setting up an environment to use the Aider CLI tool. The environment is configured to ensure all necessary dependencies are available and the aider command is ready to use.
The purpose of this flake is to create a reproducible environment for using the Aider CLI tool. By using Nix Flakes, we ensure that the environment is consistent across different machines and setups.
In the examples below, replace <user> with the GitHub username whose fork you want to use.
-
Install: Aider and its dependencies are installed into the Python and NodeJS environments in the
~/.cache/aider-chat/directory by running:nix develop 'https://github.com/<user>/flake-aider-chat/archive/refs/heads/main.zip#install' -
Run: To launch Aider in the
~/.cache/aider-chat/environment, type:nix develop 'https://github.com/<user>/flake-aider-chat/archive/refs/heads/main.zip' -
Shell: If you want to launch
aidermanually on the command line, you can drop to a shell in the Aider environment:nix develop 'https://github.com/<user>/flake-aider-chat/archive/refs/heads/main.zip#shell'You can then use the
aider --config=$AIDER_CONFcommand as needed. For more information on how to useaider, refer to the Aider CLI tool documentation and the GitHub repository.
The environment is defined in the flake.nix file. It includes:
libsecretso API keys can be managed by the desktop keychain- NodeJS with ESLint installed in
~/.cache/aider-chat/.npm-global/ - Python 3 and a virtualenv (
~/.cache/aider-chat/.venv/) that is automatically created and activated. - The
aiderCLI tool is installed and upgraded within the Python virtualenv. - The Playwright library (Python version) and supporting browsers.
- The
PATHis configured to include the virtual environment'sbindirectory. - An
aider-installscript is provided for installing and upgrading Aider and its dependencies as well as ESLint.
For more details, refer to the flake.nix file in this repository.