One shell setup for zsh, bash, fish and PowerShell

opal gives every shell you use the same prompt, aliases, tab completion, suggestions and command history, from one config file, on Windows, macOS and Linux. It also has a terminal app of its own.

Free and open source (MIT) · One program, no dependencies · No accounts, no tracking

zsh  ╭─◆ opal/internal/prompt on main ⇡1 +2 !1 ?3                      took 3.2s
     ╰─❯ 
bash ╭─◆ opal/internal/prompt on main ⇡1 +2 !1 ?3 ◇ api
     ╰─❯ 
fish ╭─◆ opal/internal/prompt on main ⇡1 +2 !1 ?3                            ✦ 1
     ╰─❯ 
pwsh ╭─◆ opal\internal\prompt on main ⇡1 +2 !1 ?3                ✘ 127 not found
     ╰─❯ 

What it sets up

The same features in every shell, from the same config.

Written for each shell

opal is a single program. When a shell starts, opal init prints code written for that shell, so nothing is emulated.

  • Aliases become fish abbreviations and PowerShell functions that pass on arguments and pipeline input.
  • PowerShell's own aliases, like gc and gl, are kept unless you choose otherwise.
  • Works with bash 3.2 on macOS as well as bash 5, and with Windows PowerShell 5.1 as well as PowerShell 7.
  • The prompt never runs text from folder or branch names.
  • Setup only edits a marked block in your startup files and keeps a backup.
Get started
# the git plugin's "gst" in each shell

# zsh and bash
alias -- gst='git status'

# fish
abbr -a -g -- gst 'git status'

# PowerShell
function global:gst {
    if ($MyInvocation.ExpectingInput) { $input | git status @args }
    else { git status @args }
}

Opal Terminal

opal also has a terminal app of its own. It reads the same config, uses the same theme, and knows where each command starts and ends from the marks opal's prompt sends.

  • On Windows it comes with Opal Bash: bash with ls, grep, sed, awk and the other Unix tools, set up with opal and kept apart from your other shells.
  • Tabs, split panes, and a command palette that also searches the history of every shell.
  • Jump between prompts, select a command's output, and get a notification when a long command finishes in the background.
  • Quick select copies a URL, path or git hash on screen when you type its label.
  • Inline images through sixel, the kitty graphics protocol and iTerm2's image sequence.
  • Tabs, panes and their recent output come back the next time you open it.

It's used on Windows today. The macOS and Linux builds pass their tests but haven't been tried on real machines yet.

About Opal Terminal
# open it in this folder
opal terminal

# or with another shell, or a program
opal terminal -profile PowerShell
opal terminal htop

# ~/.config/opal/config.toml
[terminal]
font_size = 13
notifications = "unfocused"

Runs on

CI loads opal into each of these shells on every change.

Windows

Windows PowerShell 5.1, PowerShell 7, bash, and any shell in WSL.

macOS

zsh, the bash 3.2 that ships with macOS, newer bash, fish and PowerShell 7.

Linux

bash, zsh, fish and PowerShell 7, on x86_64 and ARM64.

Try it in a minute

One command installs opal and sets up every shell it finds. opal setup --remove takes it out again.