ghostty
👻 Ghostty is a fast, feature-rich, and cross-platform terminal emulator that uses platform-native UI and GPU acceleration.
Top Related Projects
A cross-platform, OpenGL terminal emulator.
A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
Cross-platform, fast, feature-rich, GPU based terminal
A terminal built on web technologies
iTerm2 is a terminal emulator for Mac OS X that does amazing things.
The new Windows Terminal and the original Windows console host, all in the same place!
Quick Overview
Ghostty is a fast, feature-rich, and cross-platform terminal emulator. It aims to provide a modern terminal experience with a focus on performance, customization, and user-friendly features. Ghostty is designed to be a compelling alternative to traditional terminal emulators.
Pros
- High performance and low latency, providing a smooth user experience
- Cross-platform support (macOS, Linux, and Windows)
- Extensive customization options, including themes and key bindings
- Built-in features like ligature support, image viewing, and tabs
Cons
- Relatively new project, which may lead to potential stability issues
- Limited documentation compared to more established terminal emulators
- Smaller community and ecosystem compared to alternatives like iTerm2 or Alacritty
- May require some configuration to achieve desired functionality
Getting Started
To get started with Ghostty, follow these steps:
- Download the latest release for your operating system from the Ghostty releases page.
- Install the application following the instructions for your OS.
- Launch Ghostty from your applications menu or command line.
- (Optional) Create a configuration file at
~/.config/ghostty/config
to customize your experience:
# Example configuration
font-family = "JetBrains Mono"
font-size = 14
theme = "Dracula"
- Explore the Ghostty documentation for more advanced configuration options and features.
Competitor Comparisons
A cross-platform, OpenGL terminal emulator.
Pros of Alacritty
- More mature project with a larger community and longer development history
- Cross-platform support (Linux, macOS, Windows, BSD)
- Extensive documentation and configuration options
Cons of Alacritty
- Written in Rust, which may have a steeper learning curve for contributors
- Lacks some advanced features like tabs or split panes out-of-the-box
Code Comparison
Ghostty configuration example:
font-family = "JetBrains Mono"
font-size = 14
cursor-style = "beam"
Alacritty configuration example:
font:
normal:
family: JetBrains Mono
size: 14.0
cursor:
style: Beam
Both projects aim to provide fast, GPU-accelerated terminal emulators. Ghostty is a newer project written in C++, focusing on performance and minimalism. It offers some unique features like built-in multiplexing and a custom UI toolkit.
Alacritty, being more established, has a larger user base and more extensive documentation. It's known for its speed and cross-platform compatibility. However, it may require additional tools or configurations for features like tabs or splits.
The configuration syntax differs between the two, with Ghostty using TOML and Alacritty using YAML. This may impact user preference and ease of configuration.
A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
Pros of WezTerm
- Cross-platform support (Windows, macOS, Linux)
- Extensive configuration options via Lua scripting
- Rich feature set including multiplexing, ligatures, and GPU acceleration
Cons of WezTerm
- Larger resource footprint
- Steeper learning curve due to Lua configuration
- Potentially overwhelming number of options for new users
Code Comparison
WezTerm configuration (Lua):
return {
font = wezterm.font("JetBrains Mono"),
color_scheme = "Dracula",
default_prog = {"zsh"},
window_background_opacity = 0.9,
}
Ghostty configuration (TOML):
font-family = "JetBrains Mono"
theme = "dracula"
shell = "zsh"
background-opacity = 0.9
Key Differences
- WezTerm offers more flexibility with Lua scripting, while Ghostty uses a simpler TOML configuration.
- WezTerm has broader platform support, whereas Ghostty focuses on Unix-like systems.
- Ghostty aims for simplicity and performance, while WezTerm provides a more feature-rich experience.
Conclusion
WezTerm is a highly customizable, cross-platform terminal emulator with a wide range of features. Ghostty, on the other hand, prioritizes simplicity and performance, making it potentially more appealing for users who prefer a streamlined experience on Unix-like systems. The choice between the two depends on individual needs and preferences regarding customization, performance, and platform requirements.
Cross-platform, fast, feature-rich, GPU based terminal
Pros of Kitty
- More mature and feature-rich project with extensive documentation
- Cross-platform support (Linux, macOS, and experimental Windows)
- Large and active community with frequent updates
Cons of Kitty
- Written in Python and C, which may impact performance
- Configuration can be complex for new users
- Larger resource footprint compared to some lightweight alternatives
Code Comparison
Kitty configuration example:
font_family Fira Code
font_size 12.0
cursor_shape beam
scrollback_lines 10000
Ghostty configuration example:
font-family = "Fira Code"
font-size = 12
cursor-style = "beam"
scrollback-lines = 10000
While both terminals offer similar functionality, Ghostty uses TOML for configuration, which some users may find more intuitive. Kitty's configuration is more verbose but offers greater flexibility.
Ghostty is a newer project written in Rust, potentially offering better performance and memory usage. However, it currently lacks the extensive feature set and cross-platform support of Kitty. Ghostty's development is ongoing, and it may become a strong competitor as it matures.
A terminal built on web technologies
Pros of Hyper
- Cross-platform support (macOS, Windows, Linux)
- Extensible through plugins and themes
- Built with web technologies, making it familiar for web developers
Cons of Hyper
- Performance can be slower compared to native terminals
- Higher resource usage due to Electron framework
- Some users report stability issues and crashes
Code Comparison
Ghostty (configuration example):
font-family = "JetBrains Mono"
font-size = 14
cursor-style = "beam"
Hyper (configuration example):
module.exports = {
config: {
fontSize: 14,
fontFamily: 'JetBrains Mono',
cursorShape: 'BEAM'
}
};
Both projects allow for easy customization, but Ghostty uses TOML for configuration, while Hyper uses JavaScript. Ghostty's configuration tends to be more concise, while Hyper's offers more flexibility through JavaScript.
Ghostty is a newer, performance-focused terminal emulator written in Rust, aiming for speed and efficiency. Hyper, on the other hand, is a more established project built on web technologies, offering cross-platform support and extensive customization options at the cost of performance.
iTerm2 is a terminal emulator for Mac OS X that does amazing things.
Pros of iTerm2
- Mature and feature-rich terminal emulator with a large user base
- Extensive customization options, including themes, profiles, and keyboard shortcuts
- Robust integration with macOS, including native fullscreen support and Applescript automation
Cons of iTerm2
- Limited to macOS, not available on other platforms
- Can be resource-intensive, especially with multiple sessions or advanced features enabled
- Slower development cycle compared to newer terminal emulators
Code Comparison
iTerm2 (Objective-C):
- (void)setTransparency:(float)transparency {
_transparency = transparency;
[self updateTransparency];
[self setNeedsDisplay:YES];
}
Ghostty (Rust):
pub fn set_opacity(&mut self, opacity: f32) {
self.opacity = opacity;
self.update_opacity();
self.request_redraw();
}
While both projects implement similar functionality, iTerm2 uses Objective-C, which is specific to macOS, while Ghostty uses Rust, allowing for cross-platform development. The Ghostty implementation is more concise and uses modern language features.
iTerm2 is a well-established terminal emulator with a rich feature set, but it's limited to macOS. Ghostty, being newer and written in Rust, offers the potential for cross-platform support and improved performance, but may lack some of the advanced features and integrations found in iTerm2.
The new Windows Terminal and the original Windows console host, all in the same place!
Pros of Terminal
- More mature and feature-rich project with extensive documentation
- Cross-platform support (Windows, macOS, Linux)
- Large community and active development from Microsoft
Cons of Terminal
- Heavier resource usage compared to lightweight alternatives
- Primarily focused on Windows, with less emphasis on other platforms
- Steeper learning curve for customization and advanced features
Code Comparison
Terminal (C++):
void TerminalPage::_HandleScrollEvent(const winrt::Windows::UI::Xaml::Input::PointerRoutedEventArgs& e)
{
const auto delta = e.GetCurrentPoint(_root).Properties().MouseWheelDelta();
_DoScroll(delta);
}
Ghostty (Rust):
pub fn handle_scroll(&mut self, delta: i32) {
let new_scroll = self.scroll.saturating_add_signed(delta);
self.scroll = new_scroll.clamp(0, self.max_scroll);
self.redraw();
}
Both code snippets handle scrolling events, but Terminal's implementation is more complex due to its integration with Windows UI frameworks, while Ghostty's approach is more straightforward and platform-agnostic.
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Ghostty
Fast, native, feature-rich terminal emulator pushing modern features.
About
·
Download
·
Documentation
·
Developing
About
Ghostty is a terminal emulator that differentiates itself by being fast, feature-rich, and native. While there are many excellent terminal emulators available, they all force you to choose between speed, features, or native UIs. Ghostty provides all three.
In all categories, I am not trying to claim that Ghostty is the best (i.e. the fastest, most feature-rich, or most native). But Ghostty is competitive in all three categories and Ghostty doesn't make you choose between them.
Ghostty also intends to push the boundaries of what is possible with a terminal emulator by exposing modern, opt-in features that enable CLI tool developers to build more feature rich, interactive applications.
While aiming for this ambitious goal, our first step is to make Ghostty one of the best fully standards compliant terminal emulator, remaining compatible with all existing shells and software while supporting all of the latest terminal innovations in the ecosystem. You can use Ghostty as a drop-in replacement for your existing terminal emulator.
For more details, see About Ghostty.
Download
See the download page on the Ghostty website.
Documentation
See the documentation on the Ghostty website.
Roadmap and Status
The high-level ambitious plan for the project, in order:
# | Step | Status |
---|---|---|
1 | Standards-compliant terminal emulation | â |
2 | Competitive performance | â |
3 | Basic customizability -- fonts, bg colors, etc. | â |
4 | Richer windowing features -- multi-window, tabbing, panes | â |
5 | Native Platform Experiences (i.e. Mac Preference Panel) | â ï¸ |
6 | Cross-platform libghostty for Embeddable Terminals | â ï¸ |
7 | Windows Terminals (including PowerShell, Cmd, WSL) | â |
N | Fancy features (to be expanded upon later) | â |
Additional details for each step in the big roadmap below:
Standards-Compliant Terminal Emulation
Ghostty implements enough control sequences to be used by hundreds of testers daily for over the past year. Further, we've done a comprehensive xterm audit comparing Ghostty's behavior to xterm and building a set of conformance test cases.
We believe Ghostty is one of the most compliant terminal emulators available.
Terminal behavior is partially a de jure standard (i.e. ECMA-48) but mostly a de facto standard as defined by popular terminal emulators worldwide. Ghostty takes the approach that our behavior is defined by (1) standards, if available, (2) xterm, if the feature exists, (3) other popular terminals, in that order. This defines what the Ghostty project views as a "standard."
Competitive Performance
We need better benchmarks to continuously verify this, but Ghostty is generally in the same performance category as the other highest performing terminal emulators.
For rendering, we have a multi-renderer architecture that uses OpenGL on Linux and Metal on macOS. As far as I'm aware, we're the only terminal emulator other than iTerm that uses Metal directly. And we're the only terminal emulator that has a Metal renderer that supports ligatures (iTerm uses a CPU renderer if ligatures are enabled). We can maintain around 60fps under heavy load and much more generally -- though the terminal is usually rendering much lower due to little screen changes.
For IO, we have a dedicated IO thread that maintains very little jitter
under heavy IO load (i.e. cat <big file>.txt
). On benchmarks for IO,
we're usually within a small margin of other fast terminal emulators.
For example, reading a dump of plain text is 4x faster compared to iTerm and
Kitty, and 2x faster than Terminal.app. Alacritty is very fast but we're still
around the same speed (give or take) and our app experience is much more
feature rich.
[!NOTE] Despite being very fast, there is a lot of room for improvement here.
Richer Windowing Features
The Mac and Linux (build with GTK) apps support multi-window, tabbing, and splits.
Native Platform Experiences
Ghostty is a cross-platform terminal emulator but we don't aim for a least-common-denominator experience. There is a large, shared core written in Zig but we do a lot of platform-native things:
- The macOS app is a true SwiftUI-based application with all the things you would expect such as real windowing, menu bars, a settings GUI, etc.
- macOS uses a true Metal renderer with CoreText for font discovery.
- The Linux app is built with GTK.
There are more improvements to be made. The macOS settings window is still a work-in-progress. Similar improvements will follow with Linux.
Cross-platform libghostty
for Embeddable Terminals
In addition to being a standalone terminal emulator, Ghostty is a
C-compatible library for embedding a fast, feature-rich terminal emulator
in any 3rd party project. This library is called libghostty
.
This goal is not hypothetical! The macOS app is a libghostty
consumer.
The macOS app is a native Swift app developed in Xcode and main()
is
within Swift. The Swift app links to libghostty
and uses the C API to
render terminals.
This step encompasses expanding libghostty
support to more platforms
and more use cases. At the time of writing this, libghostty
is very
Mac-centric -- particularly around rendering -- and we have work to do to
expand this to other platforms.
Crash Reports
Ghostty has a built-in crash reporter that will generate and save crash
reports to disk. The crash reports are saved to the $XDG_STATE_HOME/ghostty/crash
directory. If $XDG_STATE_HOME
is not set, the default is ~/.local/state
.
Crash reports are not automatically sent anywhere off your machine.
Crash reports are only generated the next time Ghostty is started after a crash. If Ghostty crashes and you want to generate a crash report, you must restart Ghostty at least once. You should see a message in the log that a crash report was generated.
[!NOTE]
Use the
ghostty +crash-report
CLI command to get a list of available crash reports. A future version of Ghostty will make the contents of the crash reports more easily viewable through the CLI and GUI.
Crash reports end in the .ghosttycrash
extension. The crash reports are in
Sentry envelope format. You can
upload these to your own Sentry account to view their contents, but the format
is also publicly documented so any other available tools can also be used.
The ghostty +crash-report
CLI command can be used to list any crash reports.
A future version of Ghostty will show you the contents of the crash report
directly in the terminal.
To send the crash report to the Ghostty project, you can use the following CLI command using the Sentry CLI:
SENTRY_DSN=https://e914ee84fd895c4fe324afa3e53dac76@o4507352570920960.ingest.us.sentry.io/4507850923638784 sentry-cli send-envelope --raw <path to ghostty crash>
[!WARNING]
The crash report can contain sensitive information. The report doesn't purposely contain sensitive information, but it does contain the full stack memory of each thread at the time of the crash. This information is used to rebuild the stack trace but can also contain sensitive data depending when the crash occurred.
Developing Ghostty
See the documentation on the Ghostty website for
building Ghostty from a source tarball.
Building Ghostty from a Git checkout is very similar, except you want to
omit the -Doptimize
flag to build a debug build, and you may require
additional dependencies since the source tarball includes some processed
files that are not in the Git repository.
On Linux or macOS, you can use zig build -Dapp-runtime=glfw run
for a quick
GLFW-based app for a faster development cycle while developing core
terminal features. Note that this app is missing many features and is also
known to crash in certain scenarios, so it is only meant for development
tasks.
Other useful commands:
zig build test
for running unit tests.zig build test -Dtest-filter=<filter>
for running a specific subset of those unit testszig build run -Dconformance=<name>
runs a conformance test case from theconformance
directory. Thename
is the name of the file. This runs in the current running terminal emulator so if you want to check the behavior of this project, you must run this command in Ghostty.
Extra Dependencies
Building Ghostty from a Git checkout on Linux requires some additional dependencies:
blueprint-compiler
macOS users don't require any additional dependencies.
[!NOTE] This only applies to building from a Git checkout. This section does not apply if you're building from a released source tarball. For source tarballs, see the website.
Linting
Prettier
Ghostty's docs and resources (not including Zig code) are linted using Prettier with out-of-the-box settings. A Prettier CI check will fail builds with improper formatting. Therefore, if you are modifying anything Prettier will lint, you may want to install it locally and run this from the repo root before you commit:
prettier --write .
Make sure your Prettier version matches the version of Prettier in devShell.nix.
Nix users can use the following command to format with Prettier:
nix develop -c prettier --write .
Alejandra
Nix modules are formatted with Alejandra. An Alejandra CI check will fail builds with improper formatting.
Nix users can use the following command to format with Alejandra:
nix develop -c alejandra .
Non-Nix users should install Alejandra and use the following command to format with Alejandra:
alejandra .
Make sure your Alejandra version matches the version of Alejandra in devShell.nix.
Updating the Zig Cache Fixed-Output Derivation Hash
The Nix package depends on a fixed-output derivation that manages the Zig package cache. This allows the package to be built in the Nix sandbox.
Occasionally (usually when build.zig.zon
is updated), the hash that
identifies the cache will need to be updated. There are jobs that monitor the
hash in CI, and builds will fail if it drifts.
To update it, you can run the following in the repository root:
./nix/build-support/check-zig-cache-hash.sh --update
This will write out the nix/zigCacheHash.nix
file with the updated hash
that can then be committed and pushed to fix the builds.
Top Related Projects
A cross-platform, OpenGL terminal emulator.
A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
Cross-platform, fast, feature-rich, GPU based terminal
A terminal built on web technologies
iTerm2 is a terminal emulator for Mac OS X that does amazing things.
The new Windows Terminal and the original Windows console host, all in the same place!
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot