HomerandClaude Fable 5.2 403f8d0730 Suggestions and colours on the shell's input line, drawn by the terminal; the engine's contract as built
Drawn when a pane is painted and nowhere else: nothing is written to the pane and the
terminal's model of the screen is not touched. The input line is found among the cells the
shell integration marked; the painter gets the pane's own lines with copies of the few rows
that are drawn differently.

- The rest of the line, dimmed after the cursor, from the terminal's own history of commands
  it saw run (its own file, the person's alone; nothing that starts with a space, was not
  found or came from a private pane). Right or End takes it, Alt+Right one word, as if typed.
- With the AI's autocomplete on, LLeMbas is asked after a pause when the history has nothing,
  off the window's thread, and its answer shows in the same place.
- The command line in colours of the colour scheme's palette: the command when it exists,
  options, strings, variables, operators, comments, paths that exist. Existence is looked up
  only for a shell on this machine.
- A word from the terminal at the cursor's row for a moment, in place of a dialog.
- Off under a full-screen program, without shell integration, for a line of more than three
  rows, under an overlay, and by its options and switches.

The layer, to the engine's contract as built: answers and stop go as lines (/approve, /deny,
/always, /stop); the display is started so that the pane stays to say why it could not; every
pane is told where the status records of this terminal are, each terminal keeping its own.
The autocomplete drawn by the shell integration is now autocomplete = 'shell'.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-12-02 12:22:02 +00:00
2023-10-02 16:35:42 -07:00
2024-05-13 08:29:36 -07:00
2025-02-12 09:43:36 -07:00
2025-02-12 09:43:36 -07:00
2025-02-12 09:43:36 -07:00
2025-02-12 09:43:36 -07:00
2025-02-12 09:43:36 -07:00
2025-02-12 09:43:36 -07:00
2025-02-12 09:43:36 -07:00
2025-02-12 09:43:36 -07:00
2025-02-12 09:43:36 -07:00
2022-12-07 12:09:06 -08:00
2026-06-06 08:30:00 +01:00
2024-05-13 08:29:36 -07:00
2025-02-07 13:08:01 -07:00

LLeMbas TTY

A terminal that is also an agent. LLeMbas TTY is a fork of WezTerm with LLeMbas built in. By default it is an ordinary terminal: nothing is started, nothing of a pane is read and nothing leaves the machine until you press one of the keys below.

The agent is the LLeMbas CLI (lembas), unchanged, and the editor is LLeMbas IDE (llembas-ide). The terminal carries no copy of either: it uses the ones you have, the same ones you use outside it, and installs what is missing when you ask (Set-up, below). The CLI logs in to your own LLeMbas server and uses that server's models.

State: beta. Built and packaged by CI for Linux x86-64 (a .deb and a tarball on the releases page); macOS and Windows are not packaged yet. The parts that need the LLeMbas CLI need one that knows about terminals (2.0.0-beta.18 or newer); with an older one the terminal says so in words. Version in VERSION, changes in CHANGELOG.md. MIT, like WezTerm — see LICENSE.md.

What it adds

Key Command palette (Ctrl+Shift+P) What it does
Ctrl+Shift+A LLeMbas: ask the model A one-line prompt. Your question goes to LLeMbas with the terminal context of the pane you were in (below). If the tab has a LLeMbas pane it is asked there; otherwise one opens to the right, in the same directory.
LLeMbas: ask about this screen The same, with what is visible on the screen instead of the last commands — also from a full-screen program.
Ctrl+Shift+S LLeMbas: new session here Starts lembas beside the pane, in its directory.
Ctrl+Shift+O LLeMbas: resume a session A list of your sessions to pick from.
Ctrl+Shift+D LLeMbas: toggle side display Shows or hides the session's side display.
Ctrl+Shift+H LLeMbas: private pane on/off Marks the pane private: nothing of it is ever passed on.
LLeMbas: log in Runs lembas login.
Ctrl+Shift+E LLeMbas: open LLeMbas IDE here LLeMbas IDE in a new tab, in the pane's directory.
LLeMbas: set up (CLI and IDE) Installs what is missing of the two (below).
  • A quiet window. With no configuration of your own there is no tab bar while a window has one tab; from the second tab on it is a plain line of text at the bottom. Tabs are worked by keys either way: CTRL+SHIFT+T new, CTRL+SHIFT+W close, CTRL+TAB / CTRL+SHIFT+TAB next and previous, CTRL+SHIFT+1…9 by number. The session bar below sits in that line, so it shows from two tabs on; config.hide_tab_bar_if_only_one_tab = false in your own file keeps the line always.
  • Session bar. When the pane you are in runs LLeMbas, the right of the tab bar shows its model, mode, state and how full its context is. A tab in which LLeMbas waits for you is marked with ●. With no LLeMbas pane, the bar shows nothing of ours.
  • Prompt autocomplete, off by default: in zsh the rest of the line appears dimmed after the cursor (Right arrow or End takes it), in bash a key (Ctrl+X Ctrl+A) completes the line. See Autocomplete below.
  • Its own everything. LLeMbas TTY installs beside WezTerm and shares nothing with it: its commands are llembas-tty, llembas-tty-gui and llembas-tty-mux-server, its configuration is ~/.config/llembas-tty/llembas-tty.lua (or ~/.llembas-tty.lua), and it neither reads WezTerm's files nor talks to a running WezTerm.

Set-up: the CLI and LLeMbas IDE

LLeMbas TTY is the terminal of a set of three: the terminal, the LLeMbas CLI (the agent) and LLeMbas IDE (the editor). The other two are installations of their own — in your home directory, updated by themselves (lembas update, llembas-ide update), and the same whether you start them here or anywhere else. The terminal looks for lembas and llembas-ide on your PATH and then in ~/.local/bin.

When one is missing, the palette entry LLeMbas: set up (CLI and IDE) — or llembas-tty-setup in a shell — says which, and asks before installing each. It runs that product's own installer from that product's own release, after checking it: the release's SHA256SUMS must be signed with the LLeMbas release key and the installer must match it. Nothing runs as root and nothing already installed is touched. A beta terminal installs the newest betas, a stable one the newest stable releases (--channel stable|beta to say otherwise; --dry-run to see what it would do; --no-cli, --no-ide).

What is passed on, and when

Only when you ask (the two ask entries), and only this:

  • the last 5 commands of that pane with the end of each one's output (200 lines or 16 KiB at most), and the pane's directory and shell. This needs the shell integration (below), which marks where a command and its output begin;
  • without shell integration: the last screenful instead;
  • from a full-screen program (an editor, a pager): only the directory, unless you chose ask about this screen.

Never: a pane you marked private, a pane that is asking for a password, a pane that runs on another machine, the scrollback as a whole, or anything at all while you have not asked. The context is written to a file only you can read, in the terminal's runtime directory; LLeMbas deletes it after reading it and the terminal removes any that are left after ten minutes. What LLeMbas then does with it is the CLI's business and follows its permissions.

The session bar reads what LLeMbas itself tells the terminal about its session. It does not read the pane.

Configuration

With no configuration file, the built-in one applies the layer with its defaults. Your own file — everything WezTerm's configuration can do, see https://wezterm.org/config/files.html — opts in with one line:

local wezterm = require 'wezterm'
local config = wezterm.config_builder()

require('llembas').apply(config, {
  -- every line is optional; these are the defaults
  enabled = true,          -- false: no layer at all
  cli = nil,               -- path of `lembas`; nil: PATH, then ~/.local/bin
  ide = nil,               -- path of `llembas-ide`; nil: the same two places
  session_bar = true,
  tab_marker = true,
  palette = true,
  bar = { fields = { 'model', 'mode', 'state', 'context' } },
                           -- also: 'session', 'title', 'effort', 'tokens', 'spend'
  keys = {                 -- false turns a key off
    ask = { key = 'A', mods = 'CTRL|SHIFT' },
    new_session = { key = 'S', mods = 'CTRL|SHIFT' },
    resume = { key = 'O', mods = 'CTRL|SHIFT' },
    toggle_display = { key = 'D', mods = 'CTRL|SHIFT' },
    private = { key = 'H', mods = 'CTRL|SHIFT' },
    ide = { key = 'E', mods = 'CTRL|SHIFT' },
  },
  split = { direction = 'Right', size = 0.45 },
  new_session_in = 'split',  -- or 'tab'
  context = {
    enabled = true,        -- false: questions go alone, nothing of the pane
    blocks = 5,            -- commands passed on (at most 20)
    output_lines = 200,    -- of each command's output, from its end
    output_bytes = 16384,
    alt_screen = false,    -- true: also the screen of a full-screen program
  },
  autocomplete = false,
})

return config

To have none of it: leave the line out of your file, pass { enabled = false }, or start with llembas-tty -n.

If your file sets its own right status or tab titles, turn session_bar or tab_marker off, or call apply after your own handlers: the terminal uses the first tab-title handler it was given.

Shell integration

The package installs it for bash through /etc/profile.d. For zsh, or after unpacking the tarball, add to ~/.zshrc or ~/.bashrc:

[ -n "$LLEMBAS_TTY" ] && . /usr/share/llembas-tty/shell/llembas-tty.sh

It marks commands and their output for the terminal (WezTerm's own integration script, OSC 133 and OSC 7) and does nothing outside LLeMbas TTY.

Autocomplete

Set autocomplete = true in the options above; new panes then have LLEMBAS_TTY_AUTOCOMPLETE=1 and the shell integration turns completion on. The line you are typing is sent to lembas complete after a short pause — never an empty line, never a line that starts with a space, never outside LLeMbas TTY. What comes back is put on the line as text; nothing runs until you press Enter. If zsh-autosuggestions is loaded, ours stays off.


Wez's Terminal

WezTerm Icon A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust

User facing docs and guide at: https://wezterm.org/

Screenshot

Screenshot of wezterm on macOS, running vim

Installation

https://wezterm.org/installation

Getting help

This is a spare time project, so please bear with me. There are a couple of channels for support:

  • You can use the GitHub issue tracker to see if someone else has a similar issue, or to file a new one.
  • Start or join a thread in our GitHub Discussions; if you have general questions or want to chat with other wezterm users, you're welcome here!
  • There is a Matrix room via Element.io for (potentially!) real time discussions.

The GitHub Discussions and Element/Gitter rooms are better suited for questions than bug reports, but don't be afraid to use whichever you are most comfortable using and we'll work it out.

Supporting the Project

If you use and like WezTerm, please consider sponsoring it: your support helps to cover the fees required to maintain the project and to validate the time spent working on it!

Read more about sponsoring.

S
Description
The agentic terminal: a WezTerm fork with LLeMbas built in
Readme MIT
316 MiB
0 Stars 2 Watchers 0 Forks
Languages
Rust 97.7%
Python 1%
Shell 0.9%
Nix 0.2%