- The root README gives the beta install line beside the stable one, says what is sent by itself and that nothing is stored in the editor. - CHANGELOG, Unreleased: the privacy change, and the fixes and texts of this round. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
188 lines
12 KiB
Markdown
188 lines
12 KiB
Markdown
# LLeMbas IDE
|
|
|
|
LLeMbas in your editor: a Neovim plugin, and a VS Code / VSCodium extension.
|
|
|
|
Both are clients of the [LLeMbas CLI](https://github.com/LLeMbas/LLeMbas-CLI). The CLI is the agent:
|
|
it holds the sign-in to your LLeMbas server, the models, the tools and the permissions. The editor
|
|
starts `lembas serve --stdio` and talks to it over the Agent Client Protocol. Nothing about a server
|
|
or a model is stored in the editor: you can sign in and choose models from it, and it is the CLI
|
|
and your account that keep them.
|
|
|
|
This is a beta. It needs LLeMbas CLI 2.0.0-beta.16 or newer on the same computer. With an older CLI
|
|
the editor says so once, with how to update it (`lembas update`), and what that CLI lacks is off.
|
|
|
|
The CLI has to be signed in to your LLeMbas server. You can do that from the editor —
|
|
`:LLeMbasLogin` in Neovim, *LLeMbas: Sign In* in VS Code — or in a terminal with
|
|
`lembas login <address>`. It is the same sign-in either way: **the CLI keeps one for the whole
|
|
computer**, which the terminal and the linked service use too, so signing in to another server from
|
|
the editor replaces it (the editor says whose it replaces and asks first).
|
|
|
|
If the editor does not find `lembas` (an editor started from the desktop does not always have your
|
|
shell's `PATH`) it also looks in `~/.local/bin`, where the CLI's installer puts it; anywhere else,
|
|
set the command to the program's full path (`cmd` in Neovim's `setup`, *LLeMbas: Command* in VS Code).
|
|
|
|
## LLeMbas IDE: the whole editor, one script
|
|
|
|
<!-- ide:begin -->
|
|
A complete Neovim IDE with LLeMbas built in, installed for one user by one script: a pinned
|
|
Neovim, a ready configuration (four bars around the code — state, keys, file tree, and LLeMbas's
|
|
settings, chat and prompt — fuzzy finder, Treesitter, language servers, completion, git, sessions,
|
|
key hints), the LLeMbas theme and the plugin below. It keeps its own directories
|
|
and never touches a Neovim configuration of your own.
|
|
|
|
```sh
|
|
curl -fsSL https://github.com/LLeMbas/LLeMbas-IDE/releases/latest/download/install.sh | bash
|
|
llembas-ide
|
|
```
|
|
|
|
That line installs the newest **stable** release, and finds nothing as long as every release is a
|
|
beta. For a beta, take the installer of that release and ask for the beta channel (`<version>` is
|
|
a release's version, such as the newest on the
|
|
[releases page](https://github.com/LLeMbas/LLeMbas-IDE/releases)):
|
|
|
|
```sh
|
|
curl -fsSL https://github.com/LLeMbas/LLeMbas-IDE/releases/download/v<version>/install.sh | bash -s -- --channel beta
|
|
```
|
|
|
|
What it installs and where, the keys, how to make it yours, updating, removing and what leaves
|
|
the machine: [`ide/README.md`](ide/README.md). The installer is [`ide/install.sh`](ide/install.sh);
|
|
`scripts/test-ide.sh` tests it and `scripts/package-ide.sh` writes its release files.
|
|
<!-- ide:end -->
|
|
|
|
## Neovim
|
|
|
|
Needs Neovim 0.10 or newer. The plugin lives in `nvim/`, so the runtime path points there.
|
|
|
|
lazy.nvim:
|
|
|
|
```lua
|
|
{
|
|
"LLeMbas/LLeMbas-IDE",
|
|
branch = "dev",
|
|
config = function(plugin)
|
|
vim.opt.rtp:append(plugin.dir .. "/nvim")
|
|
vim.cmd("runtime plugin/llembas.lua")
|
|
vim.cmd("silent! helptags " .. plugin.dir .. "/nvim/doc") -- so that :help llembas works
|
|
require("llembas").setup({})
|
|
end,
|
|
}
|
|
```
|
|
|
|
vim-plug: `Plug 'LLeMbas/LLeMbas-IDE', { 'branch': 'dev', 'rtp': 'nvim' }` (it makes the help tags itself).
|
|
By hand: add the checkout's `nvim` folder to `runtimepath` and run `:helptags <checkout>/nvim/doc` once.
|
|
|
|
| Command | What it does |
|
|
|---|---|
|
|
| `:LLeMbas` | open or close the chat panel (where it opens: `position` in `setup`) |
|
|
| `:'<,'>LLeMbasAsk [question]` | ask about the selected lines; without a question they go with the next message |
|
|
| `:'<,'>LLeMbasExplain` | explain the selected lines |
|
|
| `:'<,'>LLeMbasEdit [instruction]` | rewrite the selected lines as inline hunks (`ga`/`gr`, `gA`/`gR`, `]h`/`[h`) |
|
|
| `:LLeMbasGenerate [instruction]` | generate code at the cursor as inline hunks |
|
|
| `:LLeMbasCancelEdit` | cancel an in-flight rewrite or generation |
|
|
| `:LLeMbasFix` | send the current buffer's diagnostics to the agent to fix |
|
|
| `:LLeMbasAccept[!]`, `:LLeMbasReject[!]` | accept or reject proposed changes (`!`: all) |
|
|
| `:LLeMbasNextHunk`, `:LLeMbasPrevHunk` | jump between proposed changes (`]h`, `[h`) |
|
|
| `:LLeMbasAutocomplete [on\|off]` | toggle suggestions as you type |
|
|
| `:LLeMbasAutocompleteTokens [N\|auto\|words\|line\|block\|file]` | how much a suggestion writes: a length, or at most N tokens |
|
|
| `:LLeMbasAutocompleteInstructions [text\|-]` | your own instructions for suggestions (`-` clears them) |
|
|
| `:LLeMbasAutocompleteModel[!] [model]` | the model that writes suggestions (`!`: this editor only; `-`: back to default) |
|
|
| `:LLeMbasMainModel [model]` | the model for chat and rewriting, saved in your account (`?` shows both) |
|
|
| `:LLeMbasFiles[!] [name]` | find a project file by part of its name and insert `@path` (`!`: open it); asks for the name when none is given |
|
|
| `:LLeMbasOpenFile [query]` | open a file of this project, found by part of its name |
|
|
| `:LLeMbasCommands` | pick a session `/command` or skill |
|
|
| `:LLeMbasSessions` | list and resume a previous session with its history |
|
|
| `:LLeMbasCompact` | compact the session context |
|
|
| `:LLeMbasToggleThoughts` | show or hide model thinking |
|
|
| `:LLeMbasOpen` | open the file the agent showed last (pictures, PDF, sound, video and plain text only, and only when the file is what its name says) |
|
|
| `:LLeMbasStop` | stop the running turn |
|
|
| `:LLeMbasNew[!]` | start a new session (`!` also ends the agent when a turn hangs) |
|
|
| `:LLeMbasMode [mode]` | change the mode (works live mid-turn) |
|
|
| `:LLeMbasModel [model]` | pick or change the session's model |
|
|
| `:LLeMbasLogin [address] [--ca file]` | sign this computer in to a LLeMbas server: shows the code, opens the approval page (`:LLeMbasLoginCancel` stops waiting) |
|
|
| `:LLeMbasLogout` | sign this computer out (the terminal and the linked service with it) |
|
|
| `:LLeMbasRestart` | stop the agent; it starts again when it is needed |
|
|
| `:LLeMbasLog` | what the agent wrote on stderr (why it stopped, when it did) |
|
|
| `:LLeMbasStatus`, `:LLeMbasHelp` | floating status overview / commands & keys card |
|
|
| `:[range]LLeMbasPrompt [ask\|rewrite\|add]` | to the prompt with the lines, or the cursor's line, as the attachment; the prompt says what Enter will do |
|
|
| `:LLeMbasEffort [level]` | the effort of the conversation |
|
|
| `:LLeMbasAI [on\|off]` | everything of LLeMbas on or off (off: a plain editor, nothing is sent) |
|
|
| `:LLeMbasMenu` | every command and every setting, to pick from |
|
|
| `:LLeMbasBars [on\|off\|top\|bottom\|tree\|chat [on\|off]]` | the four bars, or one of them |
|
|
| `:LLeMbasTree` | the file tree, show and hide |
|
|
|
|
**The four bars.** One option lays the editor out as LLeMbas IDE does — a top bar (what the agent
|
|
is doing, the conversation, model · mode · effort, context, suggestions), a bottom bar (the keys
|
|
for where the focus is, and Neovim's own state), a file tree on the left, and on the right the
|
|
settings lines over the chat over the prompt:
|
|
|
|
```lua
|
|
require("llembas").setup({ bars = true }) -- or a table: { tree = false, chat_width = 46, top = false, … }
|
|
```
|
|
|
|
With the bars (or with `keys = true` alone) LLeMbas's keys are mapped from one table, each action
|
|
in two forms: the LLeMbas terminal's chords (`Ctrl+Shift+A` to the prompt with the selection,
|
|
`Ctrl+Tab` the mode, `Ctrl+Shift+M` the model, `Ctrl+Shift+Y`/`J` accept/reject, `Ctrl+Shift+E`/`D`
|
|
the tree and the chat, `Ctrl+Shift+P` the menu, …), which need a terminal with the kitty keyboard
|
|
protocol, and a key after `<Leader>l` that always arrives. In an empty prompt `<Tab>` switches
|
|
what Enter does: ask, rewrite, add. The mode, the effort, on/off and the bars are remembered per
|
|
working directory. Everything the bars show is public API — `settings()`, `setting_lines()`,
|
|
`choices()`, `set()`, `prompt()`, the `User LLeMbasChanged` event — see `:help llembas-bars`,
|
|
`:help llembas-keys` and `:help llembas-api`.
|
|
|
|
In the prompt: `<CR>` (normal mode) or `<C-s>` sends (or steers mid-turn), `<C-c>` stops the turn, `<C-x><C-f>` inserts `@file`, `<C-x><C-o>` inserts `/command`, `q` closes, `g?` opens help.
|
|
In the transcript: `<CR>` / `gf` opens `file:line`, `K` inspects tool output in a float, `y` yanks the fenced code block under the cursor, `i` jumps to the prompt, `q` closes.
|
|
|
|
While typing, `<Tab>` accepts a suggestion, `<M-Right>` accepts the next word, and `<M-\>` triggers one manually; all keys and `LLeMbas*` highlight groups can be customized. `require("llembas").statusline()` provides a compact statusline component.
|
|
Help: `:help llembas`.
|
|
|
|
**What is sent by itself.** A suggestion sends your server the text around the cursor and pieces
|
|
of up to six other open files; a message names the other open files. Both only for files inside
|
|
the working directory, and never a file that looks like it holds secrets (`.env`, keys,
|
|
credentials) or that the project's `.gitignore` leaves out; in a file that looks secret no
|
|
suggestion is asked for at all. The list, and what never goes: `:help llembas-privacy`. VS Code
|
|
keeps the same rule ([`vscode/README.md`](vscode/README.md), *What is sent*).
|
|
|
|
## VS Code and VSCodium
|
|
|
|
Needs VS Code or VSCodium 1.85 or newer. The extension lives in `vscode/`; it is plain JavaScript
|
|
with no dependencies, and is installed from a package you build with Node alone:
|
|
|
|
```sh
|
|
scripts/package-vscode.sh # writes dist/llembas-<version>.vsix
|
|
codium --install-extension dist/llembas-<version>.vsix # or: code --install-extension …
|
|
```
|
|
|
|
Everything is in **one side panel**: a strip of tabs over one frame — Chat, Sessions, Models,
|
|
Autocomplete, Settings, Account, Status. The chat has interactive approval, question and plan
|
|
cards, real GFM tables, code-block Copy/Insert toolbars, collapsible thinking and tool output,
|
|
session resume and compaction, `@file` and `/command` popups and shown media; rewrites and
|
|
generation are inline diffs; autocomplete is inline. Every `llembas.*` setting has a field in the
|
|
panel (written to your User or Workspace settings, as you choose), signing in happens in the
|
|
Account view, and nothing asks through a Quick Pick, an input box or a notification that wants an
|
|
answer. A view reached
|
|
from the conversation opens beside it and closes back to it. Commands, keys, and settings:
|
|
[`vscode/README.md`](vscode/README.md).
|
|
|
|
## Tests
|
|
|
|
`scripts/test-nvim.sh` runs the plugin headless (needs `nvim` 0.10+ and `python3`).
|
|
`scripts/test-vscode.sh` runs the extension's parts that need no editor, and checks the package and
|
|
the `vscode` API it uses against the version it says it needs (Node 18 or newer and `python3`). It
|
|
does not start VS Code.
|
|
|
|
Both run against the same stand-in agent, `tests/fake_agent.py`, which answers only in the shapes
|
|
the LLeMbas CLI answers in and checks what it is sent as the CLI does; `tests/fake_lembas.py` stands
|
|
in for `lembas login` and `lembas logout`. The few rules the two editors each carry a copy of —
|
|
comparing versions, which files are never sent along, reading the sign-in's output, an over-long
|
|
line of the protocol, what may be opened — are checked in both against the same cases,
|
|
[`tests/rules/`](tests/rules/), so that one cannot change without the other. When the CLI's source is at hand — a `LLeMbas-CLI`
|
|
checkout beside this repository, or wherever `LEMBAS_CLI_SOURCE` points, with its dependencies
|
|
installed and `bun` on the `PATH` — both suites also start the CLI itself, with a home of its own
|
|
(`LEMBAS_HOME`), so that it is never signed in and never touches your sessions: the hello, what
|
|
needs no sign-in, and that "not signed in" ends in an instruction. Without it they say that they
|
|
skipped that part (`LEMBAS_SKIP_REAL_CLI=1` skips it on purpose).
|
|
|
|
## Licence
|
|
|
|
MIT.
|