Introduction to the New Generation Terminal Tool ghostty

Recommended Words

Have been using it for a while, simple enough, and looks good

Original Text

This article is transcoded by 简悦 SimpRead, original source zerorust.cn
A deep analysis of the characteristics and advantages of the emerging terminal emulator Ghostty, including its performance, native features, comparison with Kitty, and future development directions, helping developers understand this new terminal tool.

Ghostty 1.0 was recently released, sparking widespread discussion among developers domestically and internationally. It is a cross-platform terminal emulator developed using the Zig language.

The name is a combination of the words ghost and tty (a common abbreviation for terminal), cleverly omitting one of the repeated "t"s in the middle.

As a new player in the terminal field, it claims to become the best terminal emulator on macOS and Linux. What makes it outstanding?

What is Ghostty?

Ghostty is a terminal emulator written in the Zig language, developed by Mitchell Hashimoto, the founder of HashiCorp.

Its design goal is to provide a fast, feature-rich, platform-native terminal experience on macOS and Linux, with plans to support Windows in the future.

Ghostty’s Feature Highlights

Ghostty’s features can be divided into two major categories: features for end users and features for terminal application developers.

Features for End Users

  • Multiple windows, tabs, and splits: Ghostty supports multiple windows, each with its own tabs and splits, presented using native UI components for smoother operation.
  • GPU-accelerated rendering: Uses Metal on macOS and OpenGL on Linux to ensure faster terminal screen rendering.
  • Theme support: Ghostty includes hundreds of built-in themes, can automatically switch themes based on system dark/light mode, and even allows custom themes.
  • Ligatures and grapheme clustering: Supports ligature fonts and correctly displays multi-codepoint emojis (such as flags, skin tones, etc.), and properly renders some languages like Arabic and Hebrew.
  • Kitty graphics protocol: Supports the Kitty graphics protocol, allowing terminal applications to render images directly in the terminal.

Features for Terminal Application Developers

  • Kitty keyboard protocol: Supports the Kitty keyboard protocol, providing a richer input experience.
  • Synchronized rendering: Ensures smoother rendering of terminal applications.
  • Light/Dark mode notifications: Terminal applications can automatically switch their themes based on the system mode.

Ghostty’s Platform-Native Features

One of Ghostty’s main design goals is to make its look, feel, and behavior like a native app specifically built for each platform. Here are some native features of Ghostty on macOS:

  • Fast terminal: Lightweight terminal that animates under the menu bar for quick access without interrupting work.
  • Native tabs and splits: Uses macOS native UI components instead of custom-drawn text.
  • Proxy icon: Dragging the proxy icon in the title bar can move or access terminal session files.
  • Secure keyboard input: Automatically detects password prompts or can manually enable secure keyboard input to protect passwords from being stolen by other processes.

Performance

Ghostty has done extensive optimization in performance

  • Defaults to vertical synchronization, supports variable refresh rates
  • Intelligently chooses integrated GPU over discrete graphics card, saving power
  • Optimized for battery life
  • Reduces rendering speed when the window is obscured, further saving power

Comparison with Existing Terminals

The author of Ghostty mentions that current mainstream terminal emulators all have their pros and cons:

  • Alacritty: fast but fewer features, non-platform-native GUI
  • Kitty: fast and feature-rich, but non-platform-native GUI
  • iTerm2: feature-rich and platform-native but slower and does not support Linux

Ghostty tries to strike a balance among these aspects, offering a fast, feature-complete terminal emulator with a native experience.

Technical Characteristics

Ghostty is developed using the Zig language, which is also a highlight worth noting. Zig is a system-level programming language with performance comparable to Rust.

Following Bun, Ghostty is another widely watched project using Zig, showing Zig’s potential in system software development.

Ghostty’s Ambitious Vision

Ghostty is not just a terminal emulator; it has bigger plans. In the future, Ghostty will expand in two main areas:

  1. libghostty: This is the core cross-platform library of Ghostty, aimed at enabling developers to build diverse terminal emulator applications on various platforms, including dedicated applications, embedded terminals in editors, and web-based terminals supported through WebAssembly.

  2. Terminal application feature extensions: Ghostty plans to introduce more modern features, such as enhancing the security of escape sequences, supporting more modern input methods (like touch gestures, momentum scrolling), and allowing terminal applications to provide native context menus.

Ghostty’s Finances and Sustainability

Ghostty is an open-source project released under the MIT License. Developer Mitchell Hashimoto states that Ghostty is a passionate project with no plans for commercialization. He hopes to ensure long-term sustainability of Ghostty through a nonprofit structure and provide compensation for contributors.

Personal Perspective

Comparison with Kitty

In the above image, Kitty is on top, Ghostty below.

As a long-time Kitty user, I think Ghostty does bring some improvements to look forward to.

For example, on Linux, Kitty used to have issues with inputting Chinese characters (fixed in newer versions), while Ghostty using system native GUI should not encounter this problem.

Additionally, as the Linux desktop shifts from X11 to Wayland, Wayland support for terminal emulators is becoming increasingly important. Kitty still has some minor issues here; hopefully Ghostty can perform better in this regard.

Also, Kitty’s author has explicitly stated it will not support Windows (though it can run via WSLg), because Kitty uses many Unix-specific APIs, whereas Ghostty plans to support Windows in the future, which is a significant advantage given the large user base on that platform.

Missing AI

Under the current AI boom, some terminal products have integrated AI functions, such as Warp terminal which focuses on AI-assisted features that can:

  • Explain the purpose of commands and parameter meanings
  • Generate commands based on natural language
  • Help debug and fix errors
  • Provide intelligent command history search

In contrast, Ghostty currently has no AI-related features. This choice reflects different product philosophies:

  1. Focus and trade-offs: Ghostty chooses to focus on core terminal emulator functions—performance, compatibility, and native experience—instead of following the AI trend. This focus may help maintain simplicity and stability of the software.

  2. Cost and dependencies: AI functions often rely on external services, which may introduce additional costs and privacy concerns. Ghostty’s fully local operation may better meet some users’ needs.

  3. Differences in user groups: AI-integrated terminals like Warp target beginner and intermediate users needing AI assistance, while Ghostty seems aimed more at professional users who prioritize performance and native experience.

Though the lack of AI features might make Ghostty seem conservative in the current trend, this may precisely embody its adherence to the essence of terminals. For users who value terminal performance and native experience more, this could actually be an advantage.

Conclusion

Ghostty’s emergence brings new options for terminal users and developers. While it still needs time to be tested, its fast, feature-rich, platform-native characteristics are indeed appealing. For developers who frequently use terminals, it’s worth keeping an eye on this new player.

Original Link

Original Text

On Linux, I used [[Guake]], then after switching to macOS, I used Kitty, until recently I switched to Warp, but unexpectedly, these days I discovered another excellent terminal called Ghostty. I hadn’t known before, but after looking into it, I found that the story behind Ghostty’s author is quite fascinating, and the Zig language used by Ghostty is also the first time I’ve heard of it.

Ghostty is a terminal emulator written in Zig language by the famous developer Mitchell Hashimoto (co-founder of HashiCorp), with notable advantages in speed and functionality.

Ghostty aims to be a faster, more feature-rich next-generation terminal application. It not only supports GPU acceleration, is built with SwiftUI on macOS and GTK on Linux, but also comes with many modern features, striking a balance between performance and ease of use.

Mitchell Hashimoto

Before further introducing Ghostty, I want to first formally introduce its author Mitchell Hashimoto. If you work in DevOps, cloud computing, or software development fields, you must be very familiar with tools like Vagrant, Terraform, Packer, etc. Mitchell Hashimoto is the core contributor behind these tools. He has been passionate about programming from early on and founded HashiCorp based on his use of these technologies, greatly advancing cloud computing and infrastructure automation, profoundly changing the construction and management of modern infrastructure.

  • Vagrant: A tool for building and managing virtualized development environments, greatly simplifying environment configuration and sharing.
  • Packer: An automation tool for creating identical machine images.
  • Terraform: An Infrastructure as Code (IaC) tool that allows defining and managing cloud resources through code.

Mitchell Hashimoto once served as CEO and CTO, but ultimately chose to return to coding, announcing the birth of the Ghostty terminal.

Simply put, Ghostty is a cross-platform, GPU-accelerated modern terminal emulator. Its core advantages include:

  • Outstanding Performance: Like Alacritty, Ghostty leverages the GPU for rendering, ensuring very low latency and high throughput, maintaining smoothness even when handling massive output. By using modern graphics APIs and offloading rendering tasks to the GPU, whether it’s fast scrolling, complex text output, or running real-time updating commands like htop, Ghostty delivers a very smooth user experience.
  • Rich Functionality: Unlike Alacritty’s minimalism, Ghostty maintains high performance while integrating many developer-needed features, such as window/tab management (Multiplexing), theme systems, etc. It includes built-in terminal multiplexing as an alternative to Tmux, with native windows, tabs, panes, etc., switchable via hotkeys.
  • Modern Design: Ghostty considers many modern usage scenarios and strives to address some pain points in traditional terminals regarding interaction and security. It supports True Color, 24-bit color, font ligatures, image protocols, hyperlinks, and hundreds of themes.
  • Powerful configurable options and theme support: You can deeply customize according to your usage habits, from fonts to colors to shortcuts. Ghostty already has a very active community with many users sharing their configurations and themes. It uses pure text configuration with TOML format.

Ghostty’s goal is to resolve pain points of existing terminal emulators in performance, functionality, stability, and cross-platform consistency. Although Ghostty is still rapidly evolving and under development, from Mitchell’s shared content and project goals, we can see some core features and design philosophies of Ghostty.

Installation

On macOS, you can use the following command:

brew install --cask ghostty

Ghostty is mainly customized through a pure text configuration file, which is very friendly for users familiar with Linux environments who prefer configuring via text editors. You can also manage your configurations through dotfiles.

Usage

Configuration File Path

After the first launch, the configuration file is located at:

  • Linux – $HOME/.config/ghostty/config
  • macOS – $HOME/Library/Application\ Support/com.mitchellh.ghostty/config

The configuration file uses key-value pair format.

font-family = "Monaco"

Remember to reload the configuration in Ghostty after editing the file through the menu option “Reload Configuration”.

Colors and Themes

Background and foreground colors

background = #ff66ccforeground = #000000

Themes

Ghostty comes with hundreds of built-in themes. You can list all available themes using the command ghostty +list-themes, which provides a preview of each theme’s appearance.

theme = GruvboxDark

Font Configuration

Ghostty provides rich font configuration options.

  • font-family: Sets the preferred font family. Can be specified multiple times for fallback fonts.
  • font-family-bold, font-family-italic, font-family-bold-italic: Set font families for bold, italic, and bold-italic styles respectively.
  • font-style, font-style-bold, font-style-italic, font-style-bold-italic: Specify named font styles used by terminal fonts, e.g., the style “Heavy” for “Iosevka Heavy”. Setting the value to false disables that specific style.
  • font-synthetic-style: Controls whether styles like bold, italic, bold-italic are synthesized. Can be true or false, or disable specific syntheses like “no-bold”, “no-italic”.
  • font-feature: Apply font features, such as ss20 or -ss20 (to disable). To disable programming ligatures, use -calt.
  • font-size: Sets the font size (in points), supporting non-integer values.
  • font-variation, font-variation-bold, font-variation-italic, font-variation-bold-italic: Set font variation values for variable fonts, format is id=value, e.g., wght=700.

You can list available system fonts with the command ghostty +list-fonts.

Hotkeys

You can customize keyboard shortcuts for specific operations. For example, to create a shortcut Ctrl+d that splits the current Ghostty window into two panes side by side to the right:

keybind = ctrl+d=new_split:right

Ghostty also supports many other configurations covering mouse and clipboard behavior, terminal behavior, startup sessions, etc. For example, you can control startup tabs, window layouts, working directories, and started programs by creating session files and using the --session command line flag.

A complete list of configuration options can be found in Ghostty’s official documentation or related configuration guides.

Usage

Configure shortcut Ctrl+D to split the window

keybind = ctrl+d=new_split:right

Custom Themes

List themes

ghostty +list-themes

Use in configuration file

theme = Unikitty

You can configure Ghostty’s window and content to use the same theme color

window-theme = ghostty

The emergence of Ghostty provides us, efficiency-driven developers, with another new option. It is more than a simple terminal emulator — it feels like a modern development workstation. It combines Alacritty’s speed and Kitty’s features while innovating and optimizing on this foundation.

Although Ghostty is still young, with its outstanding design philosophy, strong performance, and active community, I believe it has the potential to become a strong contender in the future terminal emulator arena. If you are looking for a new terminal tool, give Ghostty a try — perhaps it will bring you unexpected surprises.

  • [[Guake]]
  • [[Kitty]]
  • [[wezterm-terminal]]
  • [[Alacritty Terminal]]
  • [[Mac app iTerm2]]
  • [[Warp]]