A GPU terminal with a built-in multiplexer, made for working with AI agents.
Rust · wgpu · Lua config · Windows first, Linux and macOS builds
Duck is a terminal emulator and multiplexer in one program. Closing the window detaches instead of killing your shells, and the terminal knows which panes run an AI agent (Claude Code, Codex, Kiro, Gemini, aider…) and what each one is doing.
- Sessions that survive. Every shell lives in its own
ptyhostprocess. Closing the window, or even a crash of the server, keeps everything running; the next server reconnects. A checkpoint every 5 minutes restores workspaces, tabs and splits after a reboot, and resumes the Claude Code conversations that were open (claude --resume). - Agent aware. Each tab shows whether its agent is working, waiting for your approval or done. Approve or deny from the notice in the corner of the screen without switching tabs. Side panel with the agent's plan, context tokens and cost; timeline of the session; message queue delivered when the agent stops; "fix with agent" sends a failed command and its output.
- Orchestrates agents. Loop until a check passes (Duck runs your tests when the agent stops and sends the failure back until it passes); a map of agents, the panes they opened and their subagents; an inbox of what is waiting for you; an agent in a fresh worktree with its own port; Routines that send requests to Claude Code on a schedule.
- Agents talk across computers.
duck msg fedora "run X and tell me Y"sends a message from the agent on one computer to the agent on another, with no copy and paste between them. You approve it before it reaches the agent; the reply comes back to the pane that asked. Encrypted connection directly between the Ducks (local network, VMs, Tailscale) or through your own relay outside the network; it also lists the agents on the other side, sends files and has a diagnosis. - Tabs you don't lose. Pinned tabs, reopen the last closed one
(
Ctrl+Alt+T, with the agent session), jump back to the previous one (Alt+Q), picture-in-picture of a pane over other tabs, and a preview with your last request to the agent and the files it touched. - Secrets protected. A token that shows up on screen is masked (and kept
out of recordings and of what agents read);
duck guard installblocks secrets and client names in commits and pushes. - Easy to find. Topic menus (
Ctrl+Shift+1..4: orchestration, extensions, window, settings) and a bar with the main shortcuts; all customizable. - Command blocks. With shell integration (OSC 133), every command becomes a card with exit code and duration, copy/re-run/collapse/pin buttons, and a minimap that marks failures.
- Its own look. Custom title bar, tabs as pills (or vertical tabs), panes as rounded cards, smooth cursor, command palette that also searches tabs, sessions, history and files, 22 built-in themes plus a theme generated from your wallpaper, Mica/Acrylic on Windows 11, post-processing shaders.
- Scriptable. Config in Lua with hot reload, key tables, workflows,
layouts, WASM plugins, a CLI and an MCP server so agents can drive the
terminal (
duck cli spawn,read,send,blocks,last-failure…). - Light. One native binary (~19 MB), idle CPU ~0%, about 12k lines/s of output throughput.
Downloads the latest release for Linux x86_64 or Windows x64, checks it and runs the installer. Running it again updates Duck.
curl -fsSL https://raw.githubusercontent.com/herlondf/duck/main/get.sh | shirm https://raw.githubusercontent.com/herlondf/duck/main/get.ps1 | iex # installs to %LOCALAPPDATA%\Duck; needs PowerShell 7The first install shows a checklist with sensible defaults checked; type the numbers to toggle and press Enter:
Duck: what to set up?
1 [x] Claude Code hooks in: ~/.claude ~/.claude-work
2 [x] Claude Code statusline (5h/7d usage for Claude usage and Routines; yours is kept)
3 [x] bash/zsh shell integration and PATH in ~/.bashrc
4 [x] ~/.duck.lua
5 [x] app menu shortcut
6 [x] start on login, restoring the last session
7 [x] automatic updates (download, verify, install; restart the server when no agent is working)
8 [ ] extensions: enable Claude usage (needs Node 18+; the rest in Ctrl+Shift+P)
Numbers toggle (e.g. 6 8), Enter confirms:
Under curl | sh the answers come from the terminal (/dev/tty); without one,
or with --yes / -Yes, the defaults apply. It ends with a summary and
duck doctor. Installer options go after sh -s -- (Linux) or through
& ([scriptblock]::Create((irm .../get.ps1))) -Boot (Windows); any of
--all, --boot, --claude-hooks, --extensions (or -All, -Boot...)
skips the checklist. --wizard / -Wizard shows it again on a reinstall.
Updates: automatic. Once a day Duck checks for a new release; when there is
one, it downloads it, checks the SHA-256, installs it and restarts the server,
which the shells survive. It waits for a quiet moment: no agent working or
waiting for approval and no command running (it tries again every 2 minutes).
Then it shows "Duck atualizado para vX.Y.Z"; close and reopen the window for
the new interface. update_auto = false only notifies (then Ctrl+Shift+P >
Atualizar o Duck or duck update installs); update_check = false turns
everything off.
An install from source (clone + ./install.sh) never updates by itself, it
only notifies, and is not touched by a plain duck update. On Linux, duck update --release (or Ctrl+Shift+P >
Atualizar o Duck: trocar pelo release) switches it to the release install:
same ~/.local/bin/duck and duckw, and from then on duck update updates by
itself; the clone stays where it is. duck update --source does git pull --ff-only + ./install.sh in the clone instead (it builds, so it needs
cargo). Versions before 0.1.9 don't have --release: run the get.sh line
above once. On Windows, from source: git pull + install.ps1, as before.
You need Rust (stable); on Linux and macOS the installer offers to install it. The first build takes about 5 minutes. The playbook has the full step by step: prerequisites, checks, every extension and routines.
winget install Rustlang.Rustup
winget install Microsoft.VisualStudio.2022.BuildTools --override "--quiet --wait --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended"
winget install OpenJS.NodeJS.LTS # for extensions
git clone https://github.com/herlondf/duck.git
cd duck
pwsh -File .\install.ps1 -All # everything: build, PATH, ~/.duck.lua, Start menu, open at logon,
# Claude Code hooks and statusline, extensions built
pwsh -File .\install.ps1 # first time: the checklist above (single options: -Boot, -ClaudeHooks, -Extensions)git clone https://github.com/herlondf/duck.git && cd duck
./install.sh # build, ~/.local/bin, PATH; first time: the checklist above
./install.sh --all # no questions: + open at login, Claude Code hooks and statusline, extensionsMissing Rust or build packages (gcc, pkg-config, X11/Wayland libs)? The
installer offers to install them: rustup in your home, the packages with
sudo through apt, dnf, pacman or zypper. --yes answers yes to everything.
xcode-select --install # C compiler, if you don't have it yet
git clone https://github.com/herlondf/duck.git && cd duck
./install.sh # build (offers to install Rust), ~/.local/bin, ~/Applications/Duck.appThen run duck (opens the window) or duck doctor, which checks config,
server, hooks, shell integration and the enabled extensions (built? token
missing?). Each problem comes with the command that fixes it.
Platform status: Windows is the daily driver. Linux builds and passes the
test suite, but has had little interactive use. macOS is untested.
Mica/Acrylic are Windows-only. On Linux notifications go through the desktop
(org.freedesktop.Notifications): approval requests carry Aprovar/Negar
buttons and the others an Abrir button that jumps to the pane (servers
without actions get a plain notification). The quick-terminal hotkey uses the
GlobalShortcuts portal on Wayland (KDE, GNOME 48+) and XGrabKey on X11; when
neither works, bind duck quick in the desktop's keyboard settings
(duck doctor tells you which one applies). On Wayland the compositor places
the quick terminal; it is not pinned to the top. Both have seen little real
use so far.
| Key | Action |
|---|---|
Ctrl+Shift+P |
Command palette (commands, tabs, sessions, history, files) |
Ctrl+Shift+1 / 2 / 3 / 4 |
Menus: orchestration / extensions / window / settings |
Ctrl+Shift+/ |
Every shortcut |
Ctrl+Shift+J |
Inbox (the bell next to minimize) |
Ctrl+Shift+U |
Agent map |
Ctrl+Shift+Home |
Home: recent projects, Claude sessions, actions |
Alt+\ / Alt+- |
Split right / down |
Ctrl+Shift+T / Ctrl+Shift+W |
New tab / close tab |
Ctrl+Shift+S / Ctrl+Alt+N |
Switch / create workspace |
Ctrl+Alt+M |
Move the tab to another workspace |
Ctrl+Shift+A |
Agent Manager: every agent in a live grid |
Ctrl+Shift+I / Ctrl+Shift+Y |
Agents panel (all agents, approve, queue) / session timeline |
Ctrl+Shift+E |
Fix the last failed command with an agent |
Ctrl+Shift+Enter |
Multi-line command editor (undo, selection) |
Ctrl+, |
Settings: themes, sliders, shaders, fonts |
At the bottom there is one badge per extension (System, Agents, Azure…;
click opens the panel) and a bar with the main shortcuts. Everything is
configurable in ~/.duck.lua; see duck.example.lua, which
has commented examples for every extension. The interface is in Portuguese.
Each agent is in one of four states, with a distinct shape as well as color:
▲ asking for approval, ✓ finished and not looked at yet, ◉ working, ○ idle.
"Finished" turns into "idle" once you look at the pane; until then the tab,
the workspace (sidebar, workspace chip and switcher) keep the mark.
Ctrl+Shift+I opens the agents panel: every agent in the workspace (t
shows all workspaces), grouped by Claude account with its 5h/7d usage when
the Claude usage extension is on. With the panel focused: Enter jumps to
the pane, y/n approve or deny, m queues a message, b/w/d/i/a
filter, / searches, Tab walks the message queue (x cancel, u move up,
e deliver now), c collapses it into dots, Esc hands the keyboard back.
From the shell: duck why <pane> explains the state (hook or heuristic, last
event, title glyph, last output, question on screen, queue), and duck queue ls|add|rm|up|now <pane> [n] lists and edits the queued messages; now
delivers right away, even while the agent works.
Any program can report its state with an OSC escape, without hooks:
printf '\e]7501;state=working;app=aider\a' # working, blocked, done, idle, none
printf '\e]7501;state=blocked;msg=run migrations?\a' # msg= is shown in the panel (goes to the end)Like the Claude Code hooks, it beats the heuristic (for 10 minutes after the
last report); state=none drops the agent from the pane.
For people who write better in Portuguese: translate = { enabled = true }
(or Ctrl+Shift+4 > Tradutor: ligar). In an agent pane, Ctrl+Shift+Enter
opens the composer in translate mode: the first Enter translates (pt-BR →
en) and shows the English below with up to 3 notes on word choices; the second
Enter sends the English; Alt+Enter sends the original; editing the text
translates again; /commands and !shell go as is. Selecting text on screen
(dragging works even inside Claude Code; Shift+drag gives the mouse to the
app) opens a balloon with the translation; up to 4 words come with part of
speech and meaning in context, and + glossário saves the term (Glossário
in the palette lists them).
Translation runs through the pane agent's own CLI and account: claude -p --model haiku, gemini -m gemini-2.5-flash and codex exec -m gpt-5-mini -
(prompt on stdin; the gemini and codex ones are untested here, cmd
overrides); panes without an agent use default. Private panes are never
translated and secrets become *** before leaving.
translate = {
enabled = true, from = 'pt-BR', to = 'en',
engines = { claude = { model = 'haiku' }, codex = { model = 'gpt-5-mini', cmd = { 'codex', 'exec', '-m', '{model}', '-' } } },
default = 'claude',
},Extensions are separate programs (official SDK in TypeScript) that send data to Duck; Duck draws them as side panels, floating details, title-bar items, palette commands and notifications. A crashing extension never takes the terminal down, and an extension that is turned off costs no memory.
| Area | Extensions |
|---|---|
| Code | GitHub (notifications, review requests, PRs, issues; every gh auth login account), Azure DevOps (PRs, builds and what is deployed in each environment: classic releases per environment or pipelines per branch, configurable per project), Git (branch, changes, worktrees and stashes of the active pane) |
| Issues and errors | Jira (Server/DC and Cloud), Rollbar (active errors, resolve, mute), Grafana (LogQL queries on Loki, alert when a count goes up) |
| Infrastructure | Containers (Docker and Podman, also inside WSL), Database (saved Postgres and Redis queries, read-only by default), Ports (listening TCP ports and their process) |
| Daily use | Calendar (Google/Outlook via iCal URL, reminders and Join button), Notes (per project and global), Snippets (command snippets and clipboard history), Claude usage (5h/7d limits and cost per Claude Code profile) |
| Agents | Routines (requests to Claude Code on a schedule, cron or every N minutes, using the plan's login; the answer becomes a notification and is kept in a history) |
| Others | Google Play (releases and reviews, reply to reviews), Home Assistant (lights, switches, covers, alerts) |
Build them with install.ps1 -Extensions (or -All). They start turned
off; turn them on in Ctrl+Shift+2 → "Extensões", where you also change their
settings and add accounts. The playbook
has a recipe for each: where to create the token, what goes in the config and
how to check it. Routines are there too,
including spoken answers on an Echo or a phone push through Home Assistant.
Tokens never go into a config file. The Extensions menu asks for them, or you store them yourself:
echo <token> | duck secret set rollbar/<account>
duck secret has rollbar/<account>On Windows they live in the Credential Manager (duck:<name>, per user); on
Linux/macOS in ~/.duck/secrets with mode 600. The GitHub extension needs no
secret: it reads the accounts from the gh CLI.
Put a folder with a duck-extension.json manifest in ~/.duck/extensions/<name>
(personal) or in <duck>/extensions/<name> (shared by every user of the
machine; a personal one with the same name wins). Any language works: Duck
starts the manifest's command and talks JSON lines over stdin/stdout. The
manifest can declare settings, accounts and secrets, and the Extensions menu
builds the forms from it. See docs/EXTENSIONS.md; the
GitHub extension is the reference implementation.
A snapshot of the default, built-in capabilities of each tool (plugins and external scripts can add more). ✅ yes · 🟡 partial · ❌ no
| Duck | WezTerm | Windows Terminal | Ghostty | kitty | Alacritty | Warp | Wave | tmux | Zellij | |
|---|---|---|---|---|---|---|---|---|---|---|
| Windows (native) | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | ✅ | ✅ | ❌ | ❌ |
| Linux / macOS | 🟡 | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| GPU rendering | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ |
| Tabs and splits | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ |
| Shells survive closing the window | ✅ | 🟡 | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ | ✅ | ✅ |
| Restore layout after reboot | ✅ | ❌ | 🟡 | ❌ | 🟡 | ❌ | 🟡 | 🟡 | 🟡 | ✅ |
| Resume AI agent sessions after reboot | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| Knows agent state per tab (working / needs approval / done) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | 🟡 | ❌ | ❌ | ❌ |
| Approve agent requests from another tab | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| Command blocks (exit code, duration) | ✅ | 🟡 | 🟡 | ❌ | 🟡 | ❌ | ✅ | ✅ | ❌ | ❌ |
| Scriptable config | Lua | Lua | JSON | text | text/Python | TOML | ❌ | JSON | text | KDL |
| Plugins | Lua, WASM, extensions (any language) | Lua | ❌ | ❌ | Python | ❌ | ❌ | widgets | shell | WASM |
| API/CLI for agents to drive panes | ✅ (CLI + MCP) | ✅ (CLI) | 🟡 | ❌ | ✅ | ❌ | ❌ | 🟡 | ✅ | ✅ |
| Built-in AI chat | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ | ✅ | ❌ | ❌ |
| Open source | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ |
Duck does not try to be an AI chat app: it is a terminal where the agents you already use (in the CLI) become visible and controllable. If you want an integrated chat, Warp and Wave do that; if you only need a fast plain terminal on Linux/macOS, Ghostty, kitty and Alacritty are more mature there.
- Install and configuration playbook: step by step for installing, every extension and routines, plus troubleshooting.
- Full manual (Portuguese): every key, the CLI, the agent features, security, persistence and the architecture.
- Writing extensions.
- Feature list and status and the research notes that shaped the design.
- Terminal emulation: alacritty_terminal. Rendering: wgpu and glyphon.
- Bundled font: JetBrains Mono (SIL Open Font License 1.1) patched by Nerd Fonts.
- Duck icon: based on a CC0 (public domain) SVG from SVG Repo.
- Inspired by WezTerm, herdr, Warp, Ghostty, kitty, Zellij, Wave and Kiro.
MIT. See LICENSE. The bundled font keeps its own license (fonts/OFL.txt).