Unified Emacs interface for AI coding assistants. Integrates Claude Code, Gemini CLI, OpenAI Codex, and GitHub Copilot CLI. Enables developers to streamline coding tasks, generate code, and automate workflows directly within Emacs.
git clone https://github.com/tninja/ai-code-interface.el.gitUnified Emacs interface for AI coding assistants. Integrates Claude Code, Gemini CLI, OpenAI Codex, and GitHub Copilot CLI. Enables developers to streamline coding tasks, generate code, and automate workflows directly within Emacs.
["Install `ai-code-interface.el` via MELPA or load it manually in your Emacs config. Ensure you have at least one AI backend (Claude Code, GitHub Copilot CLI, etc.) configured.","Open a buffer with your target code file or create a new buffer for generated code. Position the cursor where you want the AI to operate (e.g., inside a function or at the end of a file).","Invoke the interface using a keybinding or command. For example, use `M-x ai-code-interface-ask` and enter your prompt, or use `C-c a c` for code generation.","Review the AI's output in the `*ai-code-interface*` buffer. Accept, reject, or modify the suggestions. Use `C-c C-c` to apply changes directly to your buffer.","For complex tasks, break them into smaller prompts. For example, first generate a function signature, then fill in the implementation. Use `ai-code-interface-explain` to clarify confusing code sections."]
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/tninja/ai-code-interface.elCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Use `ai-code-interface.el` to [TASK]. For example: 'Generate a Python function that [DESCRIBE_FUNCTION] using [SPECIFIC_LIBRARY].' or 'Refactor the [FILE_PATH] file to follow [CODING_STYLE].' Include [CONTEXT] if needed, such as error messages or specific requirements.
```elisp
;; Generated function for parsing JSON logs with error handling
(defun parse-log-json (log-string)
"Parse a JSON log string into an Emacs Lisp plist.
Handles malformed JSON by returning nil and logging the error.
Example input: '{"level":"error","message":"Failed to connect"}'"
(condition-case err
(json-read-from-string log-string)
(error
(message "Failed to parse log JSON: %s" (error-message-string err))
nil)))
;; Refactored function to follow elisp best practices
(defun calculate-stats (data)
"Calculate mean, median, and mode of NUMBERS.
Returns a plist with :mean, :median, and :mode keys.
NUMBERS should be a list of integers or floats."
(let ((sorted (sort (copy-sequence data) #'<))
(len (length data)))
(list :mean (/ (apply #'+ data) len)
:median (nth (/ len 2) sorted)
:mode (car (cl-reduce (lambda (a b) (if (> (cdr a) (cdr b)) a b))
(cl-map 'list
(lambda (x) (cons x (cl-count x data)))
(delete-dups data)))))))
```
**Usage Notes:**
- The `parse-log-json` function now includes robust error handling for malformed input.
- The `calculate-stats` function follows Emacs Lisp conventions with proper docstrings and type hints.
- Both functions are ready to be added to your `utils.el` file.
Would you like me to generate unit tests for these functions using `ert`?Neural rendering for photorealistic 3D models
Google's multimodal AI model and assistant
Let’s build from here, together
Advanced foundation models via API and ChatGPT
AI assistant built for thoughtful, nuanced conversation
Automate your spreadsheet tasks with AI power
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan