summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-02-12 09:33:49 +0200
committerPaul Buetow <paul@buetow.org>2026-02-12 09:33:49 +0200
commitda160fbdfb30a55a4d617553baeb5b0a5a9d5fb8 (patch)
tree8c8c184d3947211c82f10b198c7b366a01cd4780
parentcfd02d2874992f7e293d5098bd328a495825a8d4 (diff)
Rename hexai-lsp command to hexai-lsp-server
Amp-Thread-ID: https://ampcode.com/threads/T-019c50bc-2906-77db-a31e-0d553338d99b Co-authored-by: Amp <amp@ampcode.com>
-rw-r--r--.gitignore2
-rw-r--r--MCP-SERVER-PLAN.md2
-rw-r--r--Magefile.go8
-rw-r--r--README.md2
-rw-r--r--cmd/hexai-lsp-server/main.go (renamed from cmd/hexai-lsp/main.go)2
-rw-r--r--cmd/hexai-lsp-server/main_test.go (renamed from cmd/hexai-lsp/main_test.go)2
-rw-r--r--docs/buildandinstall.md4
-rw-r--r--docs/custom-code-actions.md6
-rw-r--r--docs/usage.md6
-rw-r--r--internal/hexailsp/run.go2
-rw-r--r--internal/hexailsp/run_test.go10
11 files changed, 23 insertions, 23 deletions
diff --git a/.gitignore b/.gitignore
index e996cb2..b8c11da 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,5 @@
/hexai
-/hexai-lsp
+/hexai-lsp-server
/hexai-mcp-server
/hexai-tmux-action
/hexai-tmux-edit
diff --git a/MCP-SERVER-PLAN.md b/MCP-SERVER-PLAN.md
index f6b1f44..133ee69 100644
--- a/MCP-SERVER-PLAN.md
+++ b/MCP-SERVER-PLAN.md
@@ -1044,7 +1044,7 @@ type RespError struct {
- `/home/paul/git/hexai/internal/lsp/transport.go` - Transport pattern
- `/home/paul/git/hexai/internal/lsp/server.go` - Server dispatch pattern
- `/home/paul/git/hexai/internal/tmuxedit/history.go` - JSONL storage pattern
-- `/home/paul/git/hexai/cmd/hexai-lsp/main.go` - Command entry point
+- `/home/paul/git/hexai/cmd/hexai-lsp-server/main.go` - Command entry point
- `/home/paul/git/hexai/internal/appconfig/config.go` - Config extension pattern
### Files to Create
diff --git a/Magefile.go b/Magefile.go
index f0ce2f0..bea6b1f 100644
--- a/Magefile.go
+++ b/Magefile.go
@@ -32,7 +32,7 @@ func Build() error {
// BuildHexaiLSP builds the LSP server binary.
func BuildHexaiLSP() error {
printCoverage()
- return sh.RunV("go", "build", "-o", "hexai-lsp", "cmd/hexai-lsp/main.go")
+ return sh.RunV("go", "build", "-o", "hexai-lsp-server", "cmd/hexai-lsp-server/main.go")
}
// BuildHexaiCLI builds the CLI binary.
@@ -63,7 +63,7 @@ func BuildHexaiMCPServer() error {
func Dev() error {
printCoverage()
mg.Deps(Test, Vet, Lint)
- if err := sh.RunV("go", "build", "-race", "-o", "hexai-lsp", "cmd/hexai-lsp/main.go"); err != nil {
+ if err := sh.RunV("go", "build", "-race", "-o", "hexai-lsp-server", "cmd/hexai-lsp-server/main.go"); err != nil {
return err
}
if err := sh.RunV("go", "build", "-race", "-o", "hexai", "cmd/hexai/main.go"); err != nil {
@@ -82,7 +82,7 @@ func Dev() error {
func Run() error {
printCoverage()
mg.Deps(Dev)
- return sh.RunV("go", "run", "cmd/hexai-lsp/main.go")
+ return sh.RunV("go", "run", "cmd/hexai-lsp-server/main.go")
}
// RunCLI runs the CLI with a small test input.
@@ -109,7 +109,7 @@ func Install() error {
if err := os.MkdirAll(bin, 0o755); err != nil {
return err
}
- if err := sh.RunV("cp", "-v", "./hexai-lsp", bin+"/"); err != nil {
+ if err := sh.RunV("cp", "-v", "./hexai-lsp-server", bin+"/"); err != nil {
return err
}
if err := sh.RunV("cp", "-v", "./hexai", bin+"/"); err != nil {
diff --git a/README.md b/README.md
index 71d3b39..305853b 100644
--- a/README.md
+++ b/README.md
@@ -52,7 +52,7 @@ hexai follows the XDG Base Directory Specification:
- `stats.lock` - File lock for stats access
- **State & Logs:** `~/.local/hexai/state/` (or `$XDG_STATE_HOME/state/`)
- `tmux-edit-history.jsonl` - History of text submitted via tmux popup
- - `hexai-lsp.log` - LSP server debug logs
+ - `hexai-lsp-server.log` - LSP server debug logs
- `hexai-tmux-edit.log` - Tmux edit debug logs
- `hexai-mcp-server.log` - MCP server debug logs
- **Data:** `~/.local/hexai/data/` (or `$XDG_DATA_HOME/`)
diff --git a/cmd/hexai-lsp/main.go b/cmd/hexai-lsp-server/main.go
index 828d0f8..c8cdd8f 100644
--- a/cmd/hexai-lsp/main.go
+++ b/cmd/hexai-lsp-server/main.go
@@ -48,5 +48,5 @@ func defaultLogPath() string {
if err != nil {
panic(fmt.Sprintf("cannot create state directory: %v", err))
}
- return fmt.Sprintf("%s/hexai-lsp.log", stateDir)
+ return fmt.Sprintf("%s/hexai-lsp-server.log", stateDir)
}
diff --git a/cmd/hexai-lsp/main_test.go b/cmd/hexai-lsp-server/main_test.go
index 387b640..5563e3d 100644
--- a/cmd/hexai-lsp/main_test.go
+++ b/cmd/hexai-lsp-server/main_test.go
@@ -10,7 +10,7 @@ import (
func TestMain_Version(t *testing.T) {
oldArgs := os.Args
defer func() { os.Args = oldArgs }()
- os.Args = []string{"hexai-lsp", "-version"}
+ os.Args = []string{"hexai-lsp-server", "-version"}
var buf bytes.Buffer
old := log.Writer()
log.SetOutput(&buf)
diff --git a/docs/buildandinstall.md b/docs/buildandinstall.md
index 89a7c57..2240be0 100644
--- a/docs/buildandinstall.md
+++ b/docs/buildandinstall.md
@@ -3,7 +3,7 @@
Hexai uses Mage for developer tasks. Install Mage, then run targets like build, dev, test, and install.
- Install Mage: `go install github.com/magefile/mage@latest`
-- Build binaries: `mage build` (produces `hexai`, `hexai-lsp`, `hexai-tmux-action`, and `hexai-tmux-edit`)
+- Build binaries: `mage build` (produces `hexai`, `hexai-lsp-server`, `hexai-tmux-action`, and `hexai-tmux-edit`)
- Dev build (+ tests, vet, lint): `mage dev`
- Run tests: `mage test`
- Run tests with coverage: `go test ./... -cover`
@@ -19,6 +19,6 @@ Note: `mage lint` uses `golangci-lint`. Install via `mage devinstall` if needed.
Either use the Mage method as mentioned above, or install directly with:
- CLI: `go install codeberg.org/snonux/hexai/cmd/hexai@latest`
-- LSP: `go install codeberg.org/snonux/hexai/cmd/hexai-lsp@latest`
+- LSP: `go install codeberg.org/snonux/hexai/cmd/hexai-lsp-server@latest`
- Action runner: `go install codeberg.org/snonux/hexai/cmd/hexai-tmux-action@latest`
- Tmux popup editor: `go install codeberg.org/snonux/hexai/cmd/hexai-tmux-edit@latest`
diff --git a/docs/custom-code-actions.md b/docs/custom-code-actions.md
index 9f5b132..2da534f 100644
--- a/docs/custom-code-actions.md
+++ b/docs/custom-code-actions.md
@@ -1,6 +1,6 @@
# Custom Code Actions Design
-This document proposes how Hexai can support user-defined code actions via the config file, and surface them in both hexai-lsp and hexai-tmux-action.
+This document proposes how Hexai can support user-defined code actions via the config file, and surface them in both hexai-lsp-server and hexai-tmux-action.
## Goals
@@ -65,7 +65,7 @@ Notes:
### Validation
-Implement `func (a App) Validate() error` and call it on startup in hexai-lsp and hexai-tmux-action. Fail fast with a descriptive error if any rule is violated:
+Implement `func (a App) Validate() error` and call it on startup in hexai-lsp-server and hexai-tmux-action. Fail fast with a descriptive error if any rule is violated:
- Duplicate `id` among custom actions (case-insensitive): "config: duplicate custom action id: <id>"
- Duplicate custom action `hotkey` (case-insensitive, non-empty): "config: duplicate custom action hotkey: <hotkey>"
- `tmux.custom_menu_hotkey` collides with built-in tmux top-level hotkeys (`r,i,c,t,p,s`) or is not a single character: "config: invalid tmux.custom_menu_hotkey: <value>"
@@ -76,7 +76,7 @@ Implement `func (a App) Validate() error` and call it on startup in hexai-lsp an
- Invalid `scope` value: "config: custom action <id> has invalid scope: <value>"
If validation fails:
-- hexai-lsp: log the error and exit the server (do not serve requests).
+- hexai-lsp-server: log the error and exit the server (do not serve requests).
- hexai-tmux-action: print the error on stderr and exit non-zero.
## LSP Integration
diff --git a/docs/usage.md b/docs/usage.md
index 4d1b50b..f5d977b 100644
--- a/docs/usage.md
+++ b/docs/usage.md
@@ -5,10 +5,10 @@ inline triggers, code actions, and the CLI — with examples.
## LSP server
-- Run over stdio: `hexai-lsp`
+- Run over stdio: `hexai-lsp-server`
- Flags:
- `-version`: print Hexai version and exit.
- - `-log`: path to log file (default `/tmp/hexai-lsp.log`).
+ - `-log`: path to log file (default `/tmp/hexai-lsp-server.log`).
### Configure in Helix
@@ -23,7 +23,7 @@ formatter = { command = "goimports" }
language-servers = [ "gopls", "golangci-lint-lsp", "hexai" ]
[language-server.hexai]
-command = "hexai-lsp"
+command = "hexai-lsp-server"
```
Note: additional LSPs (`gopls`, `golangci-lint-lsp`) are optional; Hexai works without them.
diff --git a/internal/hexailsp/run.go b/internal/hexailsp/run.go
index 18f5aa5..99779bb 100644
--- a/internal/hexailsp/run.go
+++ b/internal/hexailsp/run.go
@@ -32,7 +32,7 @@ func Run(logPath string, stdin io.Reader, stdout io.Writer, stderr io.Writer) er
}
func RunWithConfig(logPath string, configPath string, stdin io.Reader, stdout io.Writer, stderr io.Writer) error {
- logger := log.New(stderr, "hexai-lsp ", log.LstdFlags|log.Lmsgprefix)
+ logger := log.New(stderr, "hexai-lsp-server ", log.LstdFlags|log.Lmsgprefix)
if strings.TrimSpace(logPath) != "" {
f, err := os.OpenFile(logPath, os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0o644)
if err != nil {
diff --git a/internal/hexailsp/run_test.go b/internal/hexailsp/run_test.go
index 6a3c789..12b56c0 100644
--- a/internal/hexailsp/run_test.go
+++ b/internal/hexailsp/run_test.go
@@ -29,7 +29,7 @@ func TestRunWithFactory_UsesDefaultsAndCallsServer(t *testing.T) {
_ = os.Setenv("OPENAI_API_KEY", "")
var stderr bytes.Buffer
- logger := log.New(&stderr, "hexai-lsp ", 0)
+ logger := log.New(&stderr, "hexai-lsp-server ", 0)
cfg := appconfig.Load(nil) // defaults
var gotOpts lsp.ServerOptions
factory := func(r io.Reader, w io.Writer, logger *log.Logger, opts lsp.ServerOptions) ServerRunner {
@@ -64,7 +64,7 @@ func TestRunWithFactory_BuildsClientWhenKeysPresent(t *testing.T) {
_ = os.Setenv("OPENAI_API_KEY", "dummy")
var stderr bytes.Buffer
- logger := log.New(&stderr, "hexai-lsp ", 0)
+ logger := log.New(&stderr, "hexai-lsp-server ", 0)
cfg := appconfig.Load(nil) // defaults, provider=openai by default
var got llm.Client
factory := func(r io.Reader, w io.Writer, logger *log.Logger, opts lsp.ServerOptions) ServerRunner {
@@ -81,7 +81,7 @@ func TestRunWithFactory_BuildsClientWhenKeysPresent(t *testing.T) {
func TestRun_RespectsLogPathFlag(t *testing.T) {
tmp := t.TempDir()
- logFile := filepath.Join(tmp, "hexai-lsp.log")
+ logFile := filepath.Join(tmp, "hexai-lsp-server.log")
// Run with real Run but nil env key so client disabled; ensure no panic and file created
if err := Run(logFile, bytes.NewBuffer(nil), bytes.NewBuffer(nil), bytes.NewBuffer(nil)); err != nil {
t.Fatalf("Run error: %v", err)
@@ -94,7 +94,7 @@ func TestRun_RespectsLogPathFlag(t *testing.T) {
func TestRunWithFactory_NormalizesContextMode_AndSetsPreviewLimit(t *testing.T) {
t.Cleanup(func() { logging.SetLogPreviewLimit(0) })
var stderr bytes.Buffer
- logger := log.New(&stderr, "hexai-lsp ", 0)
+ logger := log.New(&stderr, "hexai-lsp-server ", 0)
cfg := appconfig.App{
ContextMode: " File-On-New-Func ",
LogPreviewLimit: 3,
@@ -117,7 +117,7 @@ func TestRunWithFactory_NormalizesContextMode_AndSetsPreviewLimit(t *testing.T)
func TestRunWithFactory_LogContextFlag(t *testing.T) {
var stderr bytes.Buffer
- logger := log.New(&stderr, "hexai-lsp ", 0)
+ logger := log.New(&stderr, "hexai-lsp-server ", 0)
cfg := appconfig.App{}
var got1, got2 lsp.ServerOptions
first := true