Modern C++ Terminal Emulator
3,022
stars
6,200
commits
C++
primary language
Sep 11, 2026
updated

contour is a modern and actually fast, modal, virtual terminal emulator,
for everyday use. It is aiming for power users with a modern feature mindset.
scrolloff feature.SM ? 2026 / RM ? 2026)SM ? 2028 / RM ? 2028)contour is packaged and available for installation on multiple distributions:
Fedora use official packageArch use official packageVoid use official packageopenSUSE use official packageAdditional packages can be found on the release page including:
Click the following button to install Contour from the Flathub store.
flatpak --version)flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo.In order to configure Contour, it is necessary to modify the configuration file
contour.yml, which is initially generated in the $HOME/.config/contour
directory. Some features also require shell integration. These can be generated
via the CLI (see below), these currently exist for zsh, fish and tcsh.
Experimental. Daemon mode is new in 0.7.0 and still settling. It is built into every Contour and covered by the test suite, but its command-line flags and its wire protocol may change between releases.
Contour already gives you tabs and split panes inside one window. Daemon mode goes further: it moves your sessions into a background process, so they survive the window that shows them. A long build keeps going after you close the window, work done over SSH survives the link dropping, and the same sessions can be reattached from another machine over an encrypted connection.
contour client # attaches to the daemon, starting one if none is running
Contour also speaks tmux's control-mode protocol in both directions: tmux-aware tooling — and the
stock tmux binary itself — can attach to a Contour daemon, and contour client --tmux mirrors a
running tmux server into a Contour window, windows as tabs and panes as splits.
See Persistent sessions for the full guide.
Contour is best installed from supported package managers, but you can build from source by following the instructions below.
./scripts/install-deps.sh
This script might ask you for the administrator password if a package dependency can be installed via the system package manager.
You can use cmake presets to compile contour. The full list of available presets can be seen using cmake --list-presets. To compile release build for linux clang-release or gcc-release, or appleclang-release on macOS accordingly.
cmake --preset clang-release
cmake --build --preset clang-release
# Optionally, if you want to install from source
cmake --build --preset clang-release --target install
For Windows, you must have Windows 10, 2018 Fall Creators Update, and Visual Studio 2019, installed. It will neither build nor run on any prior Windows OS, due to libterminal making use of ConPTY API.
On Windows 10, the built-in ConPTY implementation has limitations with mouse input handling, particularly when using WSL2 with terminal applications like tmux. This is a known issue that affects several terminal emulators.
Contour supports using an external conpty.dll implementation which resolves these issues on Windows 10.
To enable external ConPTY:
Get conpty.dll and OpenConsole.exe files from wezterm:
Go to https://github.com/wez/wezterm/tree/main/assets/windows/conhost and download conpty.dll and OpenConsole.exe
Put these files into your Contour bin directory (e.g. C:\Program Files\Contour Terminal Emulator 0.6\bin)
Start Contour. It will automatically detect and use the external ConPTY implementation.
Set up vcpkg, preferably somewhere high up in the folder hierarchy, and add the folder to your PATH.
cd C:\
git clone https://github.com/Microsoft/vcpkg.git
.\vcpkg\bootstrap-vcpkg.bat
contour source folder execute .\scripts\install-deps.ps1. This step may take a very long time.In the developer version of Powershell:
# change paths accordingly if you installed QT and vcpkg to somewhere else
cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake -DCMAKE_PREFIX_PATH=C:\Qt\6.5.0\msvc2019_64\lib\cmake
cmake --build build/
# Optionally, if you want to install from source
cmake --build build/ --target install
Usage:
contour [terminal] [config FILE] [profile NAME] [debug TAGS] [live-config] [dump-state-at-exit PATH]
[early-exit-threshold UINT] [working-directory DIRECTORY] [class WM_CLASS]
[platform PLATFORM[:OPTIONS]] [session SESSION_ID] [PROGRAM ARGS...]
contour font-locator [config FILE] [profile NAME] [debug TAGS]
contour info vt
contour help
contour version
contour license
contour parser-table
contour list-debug-tags
contour daemon [socket PATH] [label NAME] [exit-with-last-session] [tmux-compat-socket LABEL]
[listen-tcp HOST:PORT] [token TOKEN] [token-file FILE]
[tls-cert FILE] [tls-key FILE] [log TAGS] [log-file FILE]
contour client [socket PATH] [label NAME] [tmux] [tmux-socket PATH] [profile NAME] [config FILE]
[connect-tcp HOST:PORT] [token TOKEN] [token-file FILE] [tls-ca FILE]
[log TAGS] [log-file FILE]
contour generate terminfo to FILE
contour generate config to FILE
contour generate integration shell SHELL to FILE
contour capture [logical] [words] [timeout SECONDS] [lines COUNT] to FILE
contour set profile [to NAME]
Contour - A modern C++ Terminal Emulator
-------------------------------------------
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
(top 30 of 65)
C++
92.8%
QML
2.8%
CMake
2.3%
Modern C++ Terminal Emulator
3,022
stars
6,200
commits
C++
primary language
Sep 11, 2026
updated

contour is a modern and actually fast, modal, virtual terminal emulator,
for everyday use. It is aiming for power users with a modern feature mindset.
scrolloff feature.SM ? 2026 / RM ? 2026)SM ? 2028 / RM ? 2028)contour is packaged and available for installation on multiple distributions:
Fedora use official packageArch use official packageVoid use official packageopenSUSE use official packageAdditional packages can be found on the release page including:
Click the following button to install Contour from the Flathub store.
flatpak --version)flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo.In order to configure Contour, it is necessary to modify the configuration file
contour.yml, which is initially generated in the $HOME/.config/contour
directory. Some features also require shell integration. These can be generated
via the CLI (see below), these currently exist for zsh, fish and tcsh.
Experimental. Daemon mode is new in 0.7.0 and still settling. It is built into every Contour and covered by the test suite, but its command-line flags and its wire protocol may change between releases.
Contour already gives you tabs and split panes inside one window. Daemon mode goes further: it moves your sessions into a background process, so they survive the window that shows them. A long build keeps going after you close the window, work done over SSH survives the link dropping, and the same sessions can be reattached from another machine over an encrypted connection.
contour client # attaches to the daemon, starting one if none is running
Contour also speaks tmux's control-mode protocol in both directions: tmux-aware tooling — and the
stock tmux binary itself — can attach to a Contour daemon, and contour client --tmux mirrors a
running tmux server into a Contour window, windows as tabs and panes as splits.
See Persistent sessions for the full guide.
Contour is best installed from supported package managers, but you can build from source by following the instructions below.
./scripts/install-deps.sh
This script might ask you for the administrator password if a package dependency can be installed via the system package manager.
You can use cmake presets to compile contour. The full list of available presets can be seen using cmake --list-presets. To compile release build for linux clang-release or gcc-release, or appleclang-release on macOS accordingly.
cmake --preset clang-release
cmake --build --preset clang-release
# Optionally, if you want to install from source
cmake --build --preset clang-release --target install
For Windows, you must have Windows 10, 2018 Fall Creators Update, and Visual Studio 2019, installed. It will neither build nor run on any prior Windows OS, due to libterminal making use of ConPTY API.
On Windows 10, the built-in ConPTY implementation has limitations with mouse input handling, particularly when using WSL2 with terminal applications like tmux. This is a known issue that affects several terminal emulators.
Contour supports using an external conpty.dll implementation which resolves these issues on Windows 10.
To enable external ConPTY:
Get conpty.dll and OpenConsole.exe files from wezterm:
Go to https://github.com/wez/wezterm/tree/main/assets/windows/conhost and download conpty.dll and OpenConsole.exe
Put these files into your Contour bin directory (e.g. C:\Program Files\Contour Terminal Emulator 0.6\bin)
Start Contour. It will automatically detect and use the external ConPTY implementation.
Set up vcpkg, preferably somewhere high up in the folder hierarchy, and add the folder to your PATH.
cd C:\
git clone https://github.com/Microsoft/vcpkg.git
.\vcpkg\bootstrap-vcpkg.bat
contour source folder execute .\scripts\install-deps.ps1. This step may take a very long time.In the developer version of Powershell:
# change paths accordingly if you installed QT and vcpkg to somewhere else
cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake -DCMAKE_PREFIX_PATH=C:\Qt\6.5.0\msvc2019_64\lib\cmake
cmake --build build/
# Optionally, if you want to install from source
cmake --build build/ --target install
Usage:
contour [terminal] [config FILE] [profile NAME] [debug TAGS] [live-config] [dump-state-at-exit PATH]
[early-exit-threshold UINT] [working-directory DIRECTORY] [class WM_CLASS]
[platform PLATFORM[:OPTIONS]] [session SESSION_ID] [PROGRAM ARGS...]
contour font-locator [config FILE] [profile NAME] [debug TAGS]
contour info vt
contour help
contour version
contour license
contour parser-table
contour list-debug-tags
contour daemon [socket PATH] [label NAME] [exit-with-last-session] [tmux-compat-socket LABEL]
[listen-tcp HOST:PORT] [token TOKEN] [token-file FILE]
[tls-cert FILE] [tls-key FILE] [log TAGS] [log-file FILE]
contour client [socket PATH] [label NAME] [tmux] [tmux-socket PATH] [profile NAME] [config FILE]
[connect-tcp HOST:PORT] [token TOKEN] [token-file FILE] [tls-ca FILE]
[log TAGS] [log-file FILE]
contour generate terminfo to FILE
contour generate config to FILE
contour generate integration shell SHELL to FILE
contour capture [logical] [words] [timeout SECONDS] [lines COUNT] to FILE
contour set profile [to NAME]
Contour - A modern C++ Terminal Emulator
-------------------------------------------
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
(top 30 of 65)
C++
92.8%
QML
2.8%
CMake
2.3%