Deprecated: Function get_magic_quotes_gpc() is deprecated in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 99

Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 619

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1169

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176
E624 GitHub - risent/elt.el
Nothing Special   »   [go: up one dir, main page]

Skip to content

risent/elt.el

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Emacs LLM Tools

Kiro Compatible

Core Features

  • elt-ask: Ask questions directly (C-c l a)
  • elt-explain: Explain selected text with context (C-c l e)
  • elt-rewrite: Rewrite selected text with style options (C-c l r)
  • elt-translate: Translate selected text (C-c l t)

Key Features

  • Async requests: Won't block Emacs while waiting for responses
  • Context awareness: elt-explain includes surrounding code for better understanding
  • Flexible response handling: Can insert directly or show in separate buffer
  • Error handling: Graceful handling of network issues and API errors
  • Customizable: All settings via defcustom
  • Health check: elt-check-ollama to verify connection

Usage

  1. Save as elt.el in your Emacs config directory
  2. Add to your init file:
    (load "path/to/elt.el")
    (elt-enable)  ; Enable globally
  3. Make sure Ollama is running: ollama serve
  4. Customize the model: M-x customize-group RET elt RET

Configuration

Here is an example of how you can configure elt.el in your init.el file. You will need to adjust the path to elt.el to match your system.

Core Features

  • elt-ask: Ask questions directly (C-c l a)
  • elt-chat: Start an interactive chat session (C-c l x)
  • elt-explain: Explain selected text with context (C-c l e)
  • elt-rewrite: Rewrite selected text with style options (C-c l r)
  • elt-translate: Translate selected text (C-c l t)

Key Features

  • Async requests: Won't block Emacs while waiting for responses
  • Context awareness: elt-explain includes surrounding code for better understanding
  • Flexible response handling: Can insert directly or show in separate buffer
  • Error handling: Graceful handling of network issues and API errors
  • Customizable: All settings via defcustom
  • Health check: elt-check-ollama to verify connection

Usage

  1. Save as elt.el in your Emacs config directory
  2. Add to your init file:
    (load "path/to/elt.el")
    (elt-enable)  ; Enable globally
  3. Make sure Ollama is running: ollama serve
  4. Customize the model: M-x customize-group RET elt RET

Configuration

Here is an example of how you can configure elt.el in your init.el file. You will need to adjust the path to elt.el to match your system.

;; 1. Add elt.el to your Emacs load-path
;;    Replace the path with the actual location of your elt.el file.
(add-to-list 'load-path "/Users/risent/Code/github/elt.el/")

;; 2. Load the library
(require 'elt)

;; 3. Customize variables (optional)
;;    Here are some common settings you might want to configure.

;; Set your preferred LLM provider ('ollama, 'openai, or 'openrouter)
(setq elt-provider 'ollama)

;; Set the model for your chosen provider
(setq elt-ollama-model "llama3")
;; (setq elt-openai-model "gpt-4o")

;; Configure the SOCKS5 proxy (if you need one)
;; (setq elt-socks-proxy "localhost:9050")

;; Decide how translations are displayed
;; Set to 't to use a popup, or 'nil to insert the translation directly.
(setq elt-translate-use-popup t)

;; Control whether responses are inserted directly or in a separate buffer
;; 't = insert at point, 'nil = use a separate buffer
(setq elt-insert-response-directly nil)


;; 4. Enable the minor mode to activate the keybindings
(elt-mode 1)

;; You can now use the keybindings, such as:
;; C-c l a  (elt-ask)
;; C-c l x  (elt-chat)
;; C-c l t  (elt-translate)
;; C-c l e  (elt-explain)

After adding this code to your init.el, you'll need to restart Emacs or evaluate the code for the changes to take effect.

Quick Start

Core Commands

  • C-c l c - Check if provider is working
  • C-c l a - Ask a question
  • C-c l x - Start a chat session
  • Select text and C-c l e - Explain it
  • Select text and C-c l r - Rewrite it
  • Select text and C-c l t - Translate it

Code Generation Commands

After adding this code to your init.el, you'll need to restart Emacs or evaluate the code for the changes to take effect.

Quick Start

Core Commands

  • C-c l c - Check if provider is working
  • C-c l a - Ask a question
  • Select text and C-c l e - Explain it
  • Select text and C-c l r - Rewrite it
  • Select text and C-c l t - Translate it

Code Generation Commands

  • C-c l g - Generate code from description
  • C-c l G - Generate code in specific language
  • C-c l f - Generate function with name
  • C-c l C-c - Generate class with name
  • Select code and C-c l T - Generate unit tests
  • Select code and C-c l d - Add comments/documentation
  • Select code and C-c l o - Optimize code

Chat Commands

  • C-c l x - Start an interactive chat session
  • In chat buffer:
    • C-c C-c - Send message
    • C-c C-r - Regenerate last response
    • C-c C-e - Edit last user message
    • C-c C-y - Copy last response
    • C-c C-h - View full history
    • C-c C-x - Export chat session
    • C-c C-s - Reset chat session
    • C-c C-m - Change LLM model
    • C-c C-t - Toggle streaming
    • C-c C-q - Quit chat
    • C-c ? - Show help

History Commands

  • C-c l h - View response history
  • C-c l H - Search response history
  • C-c l C-h - Clear response history
  • C-c l E - Export response history

The code includes proper error handling, customization options, and a minor mode with keybindings.

Code Generation

ELT provides powerful code generation capabilities to accelerate your development workflow:

Generation Features

  • Natural Language to Code: Describe what you want and get working code
  • Language-Specific Generation: Target specific programming languages
  • Function Generation: Create functions with proper signatures and documentation
  • Class Generation: Generate complete class structures with methods
  • Test Generation: Automatically create unit tests for existing code
  • Code Documentation: Add comprehensive comments and docstrings
  • Code Optimization: Improve performance and readability of existing code

Code Generation Commands

  • C-c l g - Generate Code: Create code from natural language description
  • C-c l G - Generate with Language: Specify target programming language
  • C-c l f - Generate Function: Create a function with specific name and purpose
  • C-c l C-c - Generate Class: Create a class with methods and properties
  • C-c l T - Generate Tests: Create unit tests for selected code (select code first)
  • C-c l d - Add Documentation: Add comments and docstrings (select code first)
  • C-c l o - Optimize Code: Improve performance and style (select code first)

Usage Examples

Generate a sorting function:

  1. Press C-c l f
  2. Enter function name: quicksort
  3. Describe: "implement quicksort algorithm for arrays"

Add tests to existing code:

  1. Select your function code
  2. Press C-c l T
  3. Tests will be generated automatically

Optimize existing code:

  1. Select code block
  2. Press C-c l o
  3. Get optimized version with explanations

Code Generation Tips

  • Be specific in your descriptions for better results
  • Include expected input/output types when generating functions
  • Use the language-specific generation for better syntax
  • Review generated code before using in production
  • Generated tests can serve as documentation examples

Response History

ELT automatically tracks all your AI interactions, allowing you to review, search, and reuse previous responses:

History Features

  • Automatic tracking: All responses are saved with timestamps, prompts, and metadata
  • History browser: View all previous interactions in a dedicated buffer
  • Search functionality: Find specific responses by searching prompts or content
  • Export capability: Save your history to a file for backup or sharing
  • Persistence: Optionally save history between Emacs sessions

History Commands

  • C-c l h - Open history browser
  • C-c l H - Search history for specific content
  • C-c l C - Clear all history (with confirmation)
  • C-c l E - Export history to a text file

History Browser Navigation

In the history buffer, use these keys:

  • q - Quit history buffer
  • n/p - Navigate up/down
  • s - Search history
  • c - Clear history
  • e - Export history
  • 6192 r - Refresh history view

History Configuration

;; Maximum number of responses to keep (default: 50)
(setq elt-max-history-size 100)

;; Enable persistent history across sessions
(setq elt-save-history-to-file t)

;; Custom history file location
(setq elt-history-file "~/.emacs.d/my-elt-history.el")

Kiro Integration

This project is fully compatible with Kiro IDE, providing enhanced development capabilities:

Available Kiro Features

  • Project Context: Detailed project information and development guidelines
  • API Guidelines: Best practices for API integrations (loaded when working with API code)
  • Accessibility Guidelines: Available on-demand for UI/UX improvements
  • Automated Testing: Hooks to check syntax and suggest improvements when saving files
  • Feature Development: Spec templates for structured feature development
  • AWS Documentation: Integration with AWS documentation tools via MCP

Using Kiro with this Project

  1. Open the project in Kiro IDE
  2. Access project context with #project-context
  3. Use #accessibility when working on UI improvements
  4. Save .el files to trigger automated checks
  5. Follow spec templates when developing new features

For more information about Kiro, visit Kiro Documentation.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0