mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-09-22 08:02:24 +00:00
964576040f6aca92d728764d40abb6343287c2b9
A pane configured to run fish still advertised the login shell, because pane_environment() injected TERM, the TTY7_* markers and TERM_PROGRAM but never touched SHELL -- so the pane inherited the GUI session's login-time snapshot of it. Everything that spawns "the user's shell" read that: tmux's default-shell started zsh inside a fish pane, and so did sudo -s, an editor's shell escape, and any coding agent picking a quoting dialect from $SHELL. The failure is silent -- fish rejects the bash line, the agent's sentinel file never appears, and the rejected text stays in the line editor to concatenate onto the next send. Inject SHELL alongside the other markers, set to the absolute path of the program the pane is about to exec. That program is read off argv rather than off the shell tty7 resolved: an argv-replacing integration injection and the parent-shell override both rewrite argv, while CommandBuilder::get_shell() keeps answering the passwd entry. Only an absolute path is ever written. A configured command may be bare (the inventory keeps it bare so PATH decides which install wins), and consumers exec $SHELL under a PATH of their own, so a bare name is resolved against the PATH the pane will inherit -- the user's env-block PATH when they set one -- and skipped when that finds nothing. A stale login shell beats a name that resolves somewhere else. An explicit SHELL in the user's env block still wins, the same precedence TERM_PROGRAM has: tty7 describes the pane, the user's config gets the last word. Windows is deliberately left out. Neither cmd nor PowerShell reads SHELL; the tools that do are the POSIX emulations (MSYS/Git Bash, Cygwin, WSL), and they want a POSIX path, not the Windows one this would have to give them. That also leaves the WSL pane alone, where the pane program is wsl.exe and the distro's own login shell is the right answer. Native SSH panes are unaffected: they never build a local command, and the remote sshd sets SHELL from the remote passwd entry. Closes #342 Co-authored-by: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com>
tty7
A terminal workbench: persistent sessions, remote work, agents.
Pure Rust · GPU rendering on Zed's gpui · VT core from Alacritty
English · 简体中文
Why
- Performance — ~2× the throughput of Alacritty, Ghostty, or Kitty (benchmarks)
- Persistent sessions — quit or reboot; your shells and supported agent sessions keep running, no tmux
- Editor-grade input — suggestions, completion, highlighting, history search
- Remote development — files, repos, panes, and git data stay on the remote machine
- Native SSH — profiles, SFTP, port forwarding, and jump hosts
- Agent-aware — Claude Code, Codex & co.: status, notifications, git context
- CLI + Skills — agents create panes, run commands, and inspect output
Install
Native builds for each platform on Releases:
| macOS | …-macos-arm64.dmg · …-x86_64.dmg |
drag into Applications |
| Windows | …-setup.exe · portable ….zip |
|
| Linux | …-x86_64.AppImage |
chmod +x and run — X11/Wayland libraries bundled |
What's inside
| Editor-grade input | ghost suggestions from history · explained tab completion · syntax highlighting · multi-line editing · click places the caret · ⌃ R fuzzy history |
| Window | tabs & splits · ⌘ P palette · ⌘ F scrollback search · nine themes · IME |
| Agent-aware | per-pane detection (~17 CLIs): status dot · notifications · branch + diff · resume after reboot · tray icon when input is needed |
| Remote workspaces | remote files, repos, changes, diffs, worktrees, tabs, and panes · reconnect from any client and continue where you left off |
| CLI + Skills | bundled tty7 CLI · agent skill · pane/workspace control · real PTY commands · output, process, port, and agent status |
| SSH | native russh stack: profiles with keychain secrets · SFTP panel · port forwarding · jump hosts · one-time, unprivileged tty7-server install |
Terminal and keybinding reference: docs/features.md. The agent-facing CLI interface is documented in skills/tty7/SKILL.md.
Install the skill with:
npx skills add l0ng-ai/tty7
Benchmarks
Same machine, same day, same 155×40 grid — Apple M1 Pro, macOS 26.3.1, five-run averages (2026-07-04):
| tty7 | Alacritty | Ghostty | Kitty | |
|---|---|---|---|---|
Plaintext I/O — 11 MB cat (lower = better) |
95 ms | 239 ms | 179 ms | 185 ms |
| DOOM-fire frame rate (higher = better) | 888 fps | 485 fps | 552 fps | 617 fps |
| Cold-launch memory | 116 MB¹ | 105 MB | 128 MB | 130 MB |
¹ GUI 105 MB + the persistent server 11 MB.
Methodology and one-command reproduction: scripts/bench/.
Built on gpui and alacritty_terminal · Apache-2.0 · Discord · Changelog
Description
A terminal workbench in pure Rust: shells, persistent sessions, SSH, coding agents. GPU-rendered on Zed's gpui, VT core from Alacritty.
ai-agentsalacrittyclaude-codecoding-agentcross-platformdaemondeveloper-toolsgpugpuilinuxmacosptyrustshellsshterminalterminal-emulatorterminal-multiplexertmuxwindows
Readme
Apache-2.0
34 MiB
Languages
Rust
99.1%
Shell
0.5%
PowerShell
0.2%
Inno Setup
0.1%