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.gitai-code-interface.el is an Emacs integration layer that unifies access to multiple AI coding assistants including Claude Code, Gemini CLI, OpenAI Codex, and GitHub Copilot CLI. It enables developers to leverage these tools directly within their editor, streamlining code generation and task automation without context switching. The tool consolidates separate AI interfaces into a single, cohesive Emacs workflow for faster development cycles.
["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."]
Generate code snippets and functions using multiple AI models from within Emacs
Automate repetitive coding tasks by calling different AI assistants through a unified interface
Compare outputs from Claude, Gemini, OpenAI, and GitHub Copilot without leaving the editor
Streamline debugging and code refactoring workflows using integrated AI assistance
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
Pioneering accessible, high-performance AI models
Google's multimodal AI model and assistant
AI assistant built for thoughtful, nuanced conversation
Agentic AI Workflow platform
Connected workspace for docs, wikis, and projects
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan