helix-gpt  by leona

Code assistant LSP for Helix editor

created 1 year ago
621 stars

Top 53.9% 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

3 months ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
1
Star History
71 stars in the last 90 days

Explore Similar Projects

Starred by Chris Van Pelt Chris Van Pelt(Cofounder of Weights & Biases), Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), and
15 more.

developer by smol-ai

0.1%
12k
Agent for embedding a developer in your app
created 2 years ago
updated 1 year ago
Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), Jeff Hammerbacher Jeff Hammerbacher(Cofounder of Cloudera), and
9 more.

codex by openai

0.8%
32k
Coding agent CLI tool for terminal-based chat-driven development
created 3 months ago
updated 19 hours ago
Feedback? Help us improve.