branch: elpa/aidermacs commit dffb71a1461084638ae820195943a3c470459330 Author: Kang Tu <kang...@apple.com> Commit: Kang Tu <kang...@apple.com>
update README and comment --- README.org | 41 ++++++++++++++++++++++++++--------------- aider.el | 4 ++-- 2 files changed, 28 insertions(+), 17 deletions(-) diff --git a/README.org b/README.org index 3f5bca5b39..354a9d3318 100644 --- a/README.org +++ b/README.org @@ -1,27 +1,38 @@ #+TITLE: aider.el : aider (AI pair programming) inside emacs * Introduction -The Aider package provides an interactive interface to communicate with https://github.com/paul-gauthier/aider. -* Installation -To install the Aider package, add the following to your Emacs configuration: +- Do you feel that [[https://www.cursor.com/][cursor AI code editor]] is attractive, but you don't want to leave emacs? -Using `use-package` with `straight`: +- aider.el provides an interactive interface to communicate with https://github.com/paul-gauthier/aider. + - Most of elisp code in this repo was generated by aider / aider.el -#+BEGIN_SRC emacs-lisp -(straight-use-package 'aider) -#+END_SRC +* Why use aider.el in emacs? -You can also install the Aider package directly from MELPA by running the following command in Emacs: +- Pop-up menu: No need to remember the command. (aider-transient-menu, bind to C-c a by default) -#+BEGIN_SRC emacs-lisp -(require 'aider) -#+END_SRC +[[file:./transient_menu.png]] + +- Git repo specific aider session in emacs: automatically identify your git repo of current file, and create a new aider session for it. Multiple aider sessions can exist for different git repos. -* Why use aider.el instead of command line? +- Region based refactor support: You can select a region in file and ask aider to refactor that. -- Automatically identify your git repo of current file, and create a new aider session for it. Multiple aider sessions can exist for different git repos. +- .. And more: add your own elisp function to support your use case. For sure you can ask aider / aider.el to do that. + +* Installation + +- [[https://aider.chat/docs/install.html][Install aider]] +- Install dependency [[https://github.com/magit/transient][transient]] with package manager +- Install aider.el with following code + +#+BEGIN_SRC emacs-lisp + (use-package aider + :straight (:host github :repo "tninja/aider.el") + :config + (setq aider-args '("--model" "gpt-4o-mini"))) + (setenv "OPENAI_API_KEY" <your-openai-api-key>) +#+END_SRC -- Pop-up menu. No need to remember the command. +* Screenshot -- Region based refactor support. You can select a region in file and ask aider to refactor that. +[[file:./screenshot.png]] diff --git a/aider.el b/aider.el index 7b2843896b..4d0b0ea2a5 100644 --- a/aider.el +++ b/aider.el @@ -1,8 +1,8 @@ -;;; aider.el --- Aider package for interactive conversation with OpenAI -*- lexical-binding: t; -*- +;;; aider.el --- Aider package for interactive conversation with aider -*- lexical-binding: t; -*- ;; Author: Kang Tu <tni...@gmail.com> ;; Version: 0.1.0 -;; Package-Requires: ((emacs "24.1") (transient "0.3.0")) +;; Package-Requires: ((emacs "25.1") (transient "0.3.0")) ;; Keywords: convenience, tools ;; URL: https://github.com/tninja/aider.el