helix-gpt  by leona

Code assistant LSP for Helix editor

Created 1 year ago
649 stars

Top 51.3% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides a language server for the Helix text editor, integrating AI-powered code completion and actions from services like Copilot, OpenAI, and Codeium. It aims to enhance developer productivity by offering intelligent suggestions and code manipulation directly within the editor, supporting various AI backends and offering flexible configuration.

How It Works

The language server operates by intercepting trigger characters (defaulting to {, (, ) or manual triggers (ctrl+x) to request code completions. It sends the entire current file as context to the selected AI backend. Code actions, such as resolving diagnostics, generating documentation, improving code, or writing tests, are triggered via space+a and use only the selected code as context. This approach leverages existing AI models for intelligent code assistance within the Helix environment.

Quick Start & Requirements

  • Install: Download precompiled binary (wget ... && tar ... && mv ... && chmod +x ...) or use Bun (wget ... -O /usr/bin/helix-gpt).
  • Prerequisites: Helix text editor (tested with 23.10), Bun (if not using binary), API keys for services like OpenAI or Copilot.
  • Configuration: Set OPENAI_API_KEY, COPILOT_API_KEY, CODEIUM_API_KEY environment variables or pass arguments like --handler openai --openaiKey 123. Configure Helix's languages.toml to include gpt as a language server.
  • Logs: tail -f /root/.cache/helix/helix.log and tail -f /app/helix-gpt.log.

Highlighted Details

  • Supports multiple AI backends: Copilot (recommended), OpenAI, Codeium, and Ollama (via OpenAI compliance).
  • Offers code actions: resolve diagnostics, generate docs, improve code, write tests.
  • Flexible configuration via environment variables or command-line arguments.
  • Precompiled binaries available for Linux x86_64.

Maintenance & Community

  • Project version 0.34.
  • Mentions rsc1975 for Bun Dockerfile.
  • TODO list indicates ongoing development for features like inline completion, single config, workspace commands, and error recovery.

Licensing & Compatibility

  • The README does not explicitly state a license.

Limitations & Caveats

The project is in active development with several items listed as "Todo," including pending support from Helix for inline completions and workspace commands. There's a note that errors can sometimes leave the editor unusable, suggesting potential stability issues.

Health Check
Last Commit

5 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
19 stars in the last 30 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Vincent Weisser Vincent Weisser(Cofounder of Prime Intellect), and
15 more.

codellama by meta-llama

0.0%
16k
Inference code for CodeLlama models
Created 2 years ago
Updated 1 year ago
Feedback? Help us improve.