Skip to content

enthal/termica

Repository files navigation

Termica

Termica

A modern interface for the shell you already use.

A real, native terminal emulator in Rust — vim, ssh, htop, tmux all behave exactly as they should — with an editor-driven prompt, structured command history, and a tab-and-split workspace layered on top.

Rust License: MIT OR Apache-2.0 Platforms

termica.io · Spec · Roadmap


What is Termica?

Termica is a terminal emulator that doesn't make you choose between correct and modern. Underneath, it's a real PTY-backed terminal built on alacritty_terminal — every full-screen program you rely on (vim, less, htop, fzf, ssh, tmux) runs exactly as it does in any other terminal. On top of that, when you're sitting at a shell prompt, Termica quietly upgrades the experience: the line you're typing becomes a real text editor, your commands and their output are kept as structured blocks, and your history is searchable across sessions.

It embeds your existing zsh, bash, or fish — Termica is not a new shell, and it isn't trying to replace tmux. It's a better front-end for the shell you already use.

Three principles drive every decision

  1. Terminal correctness first. The editor experience is a layer on top of a boring, correct terminal — never the other way around. A program that misbehaves in Termica but works in your old terminal is a bug we treat as critical.
  2. Mode safety is the product. A state machine decides, per keystroke, whether you're at a prompt or inside a full-screen program, and defaults to raw-terminal behavior whenever there's any ambiguity. A keystroke delivered to the wrong place is a corruption-class bug.
  3. No silent data loss. What you typed, what the shell ran, and the exit status survive across restarts.

Features

  • A real terminal. Full VT/ANSI emulation, alternate-screen apps, mouse reporting, bracketed paste, true color. vim/htop/less/fzf/ssh/tmux just work.
  • Editor-driven prompt. At a known shell prompt, the line editor becomes a native editor: click to place the cursor, drag to select, multiline editing, undo/redo, and shell syntax highlighting. Press Enter to send the command.
  • Structured command blocks. Each command and its output are sealed into a block you can select across, copy, and read back with its exit status.
  • Command history that remembers. Backed by SQLite and seeded from your existing shell history. Walk it with ↑/↓ in the prompt, or open a fuzzy-search overlay with Ctrl+R, scoped to the current pane or everywhere.
  • Tab completion. A completion popup sourced from filesystem paths, command history, and executables on your PATH.
  • Tabs and splits. A workspace of tabs and drag-to-split panes, each a real PTY session, with per-pane keyboard focus.
  • Clickable links and paths. URLs and on-disk file paths in output are detected and openable on Cmd/Ctrl-hover.
  • Automatic shell integration. zsh, bash, and fish are detected and wired up on launch — no dotfile edits required (see below).
  • Native and fast. Built on egui with a custom cell-grid renderer. No Electron, no web view.

Status

Termica is in active development and pre-1.0. The core terminal, the tab/split workspace, the prompt-editor mode machine, command history, and tab completion are all working day-to-day, but the format and behavior may still change and there are rough edges. There are no prebuilt binaries yet — for now you build from source (it's one cargo command). Follow the issue tracker for the roadmap.

Platform support

macOS and Linux. Windows is not supported (and is not currently planned).

Getting started

1. Install Rust

Termica builds on stable Rust 1.95+ (pinned in rust-toolchain.toml). If you don't have Rust:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

2. Build and run

git clone https://github.com/enthal/termica
cd termica
cargo run --release

That launches Termica with a fresh pane running your default shell. To install the binary onto your PATH:

cargo install --path .
termica

Shell integration

On launch, Termica spawns a managed copy of your shell: it sources your real dotfiles (.zshrc / .bashrc / fish config) and then installs the lifecycle hooks that power prompt detection, command blocks, and history capture. You don't have to edit any config files.

To opt out and run a plain shell with normal rc-file processing:

TERMICA_NO_SHELL_INTEGRATION=1 termica

With integration disabled, Termica is still a fully functional terminal — the editor-driven prompt features are simply unavailable.

Keyboard shortcuts

Shortcuts use Cmd on macOS and Ctrl+Shift on Linux.

Action macOS Linux
New tab Cmd+T Ctrl+Shift+T
Close tab Cmd+W Ctrl+Shift+W
Next / previous tab Cmd+Shift+] / [ Ctrl+Shift+] / [
Clear scrollback Cmd+K Ctrl+Shift+K
Scroll through scrollback Cmd+Option+↑ / ↓ Ctrl+Alt+↑ / ↓
Quit Cmd+Q Ctrl+Shift+Q

At the prompt:

Action Key
Recall previous / next command ↑ / ↓
Fuzzy-search history Ctrl+R
Tab completion Tab

How it works

Three sharply separated layers:

  • Terminal layeralacritty_terminal drives grid state from PTY bytes, painted to egui through a custom cell renderer. We never parse VT bytes ourselves.
  • Structured-shell layer — an installable shell integration emits OSC markers; a pane-mode state machine (RawTerminal / ShellPromptEditor / AlternateScreen / Dead) consumes them and decides where each keystroke goes. Defaulting to RawTerminal is the safety invariant.
  • Workspace layer — tabs, splits, the prompt editor, the status header, history, search, and persistence on top.

The full design lives in SPEC.md and spec/. The three documents worth reading first: 01 — Architecture, 05 — Pane modes, and 09 — Testing.

Contributing

Contributions are welcome. Before opening a PR, please read CLAUDE.md for the working agreement — the short version:

  • The spec is the source of truth. Any normative change ships with its spec update in the same commit.
  • Tests-first for the load-bearing layers (terminal engine, mode machine, marker parser, prompt-submission path, persistence); same-commit tests everywhere else.
  • All changes land via a feature branch → PR → squash merge.

Local checks before committing:

cargo fmt --all
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace

A pre-commit hook that runs fmt + clippy is available — install it once per checkout:

scripts/install-git-hooks.sh

License

Dual-licensed under either of:

at your option. This matches the standard Rust ecosystem licensing.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Termica by you, as defined in the Apache-2.0 license, shall be dual-licensed as above, without any additional terms or conditions.

About

Terminal. Rust / egui. Modern UX.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages