Ghostty로 Claude Code와 tmux 사용하기: 입문부터 문제 해결까지

Ghostty에서 Claude Code와 CLI 도구를 쓴다면 터미널·셸·tmux의 역할부터 구분해 보자. macOS 기본 조작, 최소 설정, 세션 복귀 실습, 한글 입력·SSH 문제 해결과 iTerm2·Warp 비교를 함께 안내한다.
이 글은 macOS 사용자를 기준으로 한다. 공식 문서와 공개 이슈를 2026-10-26에 확인했고, 설치된 Ghostty 1.3.1에서 기본 단축키와 예제 설정 문법을 검사했다. 모든 OS·키보드 조합에서 입력 문제를 재현하거나 터미널별 성능을 측정한 후기는 아니다.
1. Ghostty는 어떤 프로그램인가
Ghostty 공식 웹사이트의 Ghostty는 명령줄 프로그램을 화면에 표시하고 키보드 입력을 전달하는 터미널 에뮬레이터다. macOS·Linux의 네이티브 UI와 빠른 렌더링을 지향하며 탭, 화면 분할, 테마 등을 제공한다. 개발자도 모든 성능 항목에서 가장 빠르다고 주장하지 않는다. (공식 소개)
| 도구 | 담당하는 일 | 대신하지 않는 것 |
|---|---|---|
| Ghostty | 창·탭·글자·키 입력을 제공 | AI 모델이나 프로젝트의 실행 환경 |
| 셸 | 입력한 명령을 해석하고 프로그램 실행 | 터미널 창 자체 |
| tmux | 세션·윈도·패널을 관리하고 연결을 분리·복구 | 머신 재부팅 뒤 프로세스 복구 |
| Claude Code | 코드 조사·수정 등 AI CLI 작업 | 터미널이나 tmux 서버 |
일반적인 구조는 Ghostty → 셸 → tmux → 셸 → Claude Code다. tmux 없이 Ghostty에서 Claude Code만 실행해도 된다. Ghostty를 바꿨다고 Claude의 모델 성능이나 사용 한도가 늘지는 않는다.
2. iTerm2·Warp·기본 터미널과 비교하기
| 프로그램 | 선택하기 좋은 이유 | 살펴볼 점 |
|---|---|---|
| Ghostty | 네이티브 조작감, 탭·분할, 작은 텍스트 설정으로 CLI에 집중 | 세션 유지에는 tmux 같은 별도 도구 사용. 설정은 주로 파일로 편집 |
| iTerm2 | 세밀한 프로필·자동화와 tmux의 네이티브 창·탭 통합 | 기존 프로필·워크플로가 잘 맞으면 굳이 바꿀 필요 없음 |
| Warp Terminal | 터미널과 AI 에이전트 작업 기능을 한 제품에서 사용 | 기능별 요금·데이터 전송 설정, 기존 셸·플러그인 호환성 확인 |
| macOS 터미널 | 추가 설치 없이 기본 CLI·SSH·tmux 사용 | Ghostty의 네이티브 분할·현대적 터미널 기능이 필요한지 판단 |
Ghostty의 장점은 이미 선택한 CLI 도구를 편하게 담는 작업 화면이라는 점이다. Warp 자체의 AI 흐름이 필요하다면 Warp의 장점이 더 클 수 있다. Warp를 단순히 ‘tmux 미지원’이나 ‘항상 모든 명령 전송’으로 설명하지 말자. 현재 호환성 문서와 개인정보 설정을 기능·요금제별로 확인해야 한다.
특히 iTerm2는 tmux -CC로 tmux 윈도를 네이티브 창·탭처럼 다루는 통합을 제공한다. 일반 tmux를 Ghostty 안에서 실행하는 것과 구분하자. (iTerm2 tmux 통합)
iTerm2 공개 공식 문서 캡처. 비교에서 중요한 차이는 단순 화면 분할보다 tmux의 네이티브 UI 통합이다. (출처, 2026-10-26 캡처)
3. 설치하고 현재 상태 확인하기
Ghostty 공식 다운로드에서 macOS .dmg를 받아 응용 프로그램 폴더로 옮긴다. Homebrew가 준비되어 있다면 아래 방식도 가능하다. 이미 설치한 도구는 중복 설치하지 않는다.
brew install --cask ghostty
brew install tmux
Claude Code가 없다면 공식 빠른 시작을 따라 설치·로그인을 완료한다. Homebrew 설치를 선택했다면:
brew install --cask claude-code
Ghostty를 열고 확인한다.
ghostty --version
tmux -V
claude --version
pwd
pwd는 현재 폴더를 보여 준다. ghostty 명령만 못 찾는다면 앱의 CLI 경로인 /Applications/Ghostty.app/Contents/MacOS/ghostty를 사용할 수 있다. 셸·PATH 문제와 앱 설치 실패는 구분한다. Homebrew로 설치한 Claude Code는 해당 설치 방식의 업데이트 명령으로 관리한다.
4. 먼저 익힐 Ghostty 기본 조작
아래는 macOS용 Ghostty 1.3.1의 기본 바인딩이다. 사용자가 바꾼 값이나 다른 OS에는 그대로 적용되지 않을 수 있다. Cmd는 Command, Option은 ⌥다.
| 할 일 | 단축키 |
|---|---|
| 새 창 / 새 탭 | Cmd+N / Cmd+T |
| 오른쪽 분할 / 아래쪽 분할 | Cmd+D / Cmd+Shift+D |
| 이전·다음 분할로 이동 | Cmd+[ / Cmd+] |
| 방향을 지정해 분할 이동 | Cmd+Option+Arrow |
| 글자 확대 / 축소 | Cmd++ / Cmd+- |
| 검색 | Cmd+F |
| 명령 팔레트 | Cmd+Shift+P |
| 설정 열기 / 다시 읽기 | Cmd+, / Cmd+Shift+, |
직접 기본값을 확인하려면 ghostty +list-keybinds --default를 사용한다. 명령 팔레트에서도 동작과 단축키를 찾을 수 있다. Ghostty 설정에서는 macOS의 Command를 super로 표기한다. (키 바인딩 안내)
5. 설정은 네 줄부터 시작하기
처음부터 테마·폰트·셸 플러그인을 한꺼번에 바꾸지 말고 Cmd+,로 실제 설정 파일을 연다. 현재 문서의 파일명은 config.ghostty이며, 이전 config 파일도 지원한다.
- 공통 경로:
~/.config/ghostty/config.ghostty - macOS 경로:
~/Library/Application Support/com.mitchellh.ghostty/config.ghostty $XDG_CONFIG_HOME을 지정했다면 공통 경로의 기준이 달라진다. 여러 파일이 있으면 뒤에 로드된 macOS 쪽 설정이 우선할 수 있다.
Ghostty 공개 설정 문서 캡처. 파일을 여러 곳에 만들기보다 현재 사용 중인 파일부터 확인한다. (출처, 2026-10-26 캡처)
기존 파일을 덮어쓰지 말고 다음 값만 추가하거나 수정한다.
font-size = 14
window-padding-x = 8
window-padding-y = 8
mouse-hide-while-typing = true
저장한 뒤 Cmd+Shift+,로 다시 읽는다. 옵션에 따라 새 터미널을 열어야 적용될 수도 있다. 문법은 ghostty +validate-config로 검사하고, 자세한 값은 옵션 참고 문서에서 확인한다. Option 기반 단축키가 필요할 때만 macos-option-as-alt = left를 검토한다. Option으로 입력하던 특수 문자의 동작도 바뀌므로 필수 설정으로 넣지 않는다.
6. Claude Code를 먼저 단독 실행해 보기
실제 작업할 프로젝트 폴더로 이동한 뒤 실행한다. 아래 경로는 자신의 프로젝트로 바꾼다.
cd /path/to/your/project
claude
첫 요청은 ‘이 프로젝트의 폴더 구조와 실행 방법을 설명해 주세요. 아직 파일은 수정하지 마세요’처럼 범위를 작게 잡는다. 터미널 앱의 편리함과 에이전트의 파일·명령 실행 권한은 별개다. 로그인과 권한 확인은 Claude Code 자체 안내를 따른다.
- Enter는 전송,
Ctrl+J또는\다음 Enter는 줄바꿈에 사용할 수 있다. - 현재 공식 문서는 Ghostty의
Shift+Enter를 별도 설정 없이 지원한다고 안내한다. tmux 안에서는 다음 절의 설정이 추가로 필요할 수 있다. /theme으로 Claude 화면 테마를 맞출 수 있다. Ghostty 테마와 Claude의 표시 테마는 서로 다른 설정이다.
Claude Code 터미널 안내를 기준으로 하며, Ghostty 사용자 모두에게 /terminal-setup을 먼저 실행하라고 권하지 않는다.
7. tmux 분리·복귀를 직접 연습하기
tmux의 세션은 작업 묶음, 윈도는 그 안의 화면, 패널은 분할 영역이다. 처음에는 Ghostty 탭 하나 안에서 tmux가 분할을 담당하도록 두면 키가 덜 헷갈린다. 이미 tmux 안이라면 새 Ghostty 탭에서 실습해 중첩을 피한다.
mkdir -p ~/Projects/ghostty-lab
cd ~/Projects/ghostty-lab
tmux new-session -A -s ghostty-lab
-A는 같은 이름의 세션이 있으면 연결하고 없으면 만든다. 새 세션 안에서:
printf 'shell pid: %s\n' "$$"
sleep 300
PID를 기록한다. sleep이 실행되는 동안 Ctrl+B를 누르고 놓은 뒤 D를 누른다. 이것이 detach다. tmux 밖으로 나왔어도 서버와 명령은 남는다. 같은 맥의 새 Ghostty 탭에서 복귀한다.
tmux ls
tmux attach-session -t ghostty-lab
실행 중이던 sleep이 보이면 Ctrl+C로 실습 명령만 중단하고, 앞의 printf를 다시 실행해 같은 셸 PID인지 비교한다. 실제 프로젝트에서도 같은 방식으로 이름 붙인 세션 안에서 claude나 개발 서버를 실행한다. (tmux 공식 입문)
| 할 일 | tmux 기본 키: Ctrl+B를 먼저 누르고 놓기 |
|---|---|
| 세션에서 분리 | d |
| 새 윈도 / 윈도 목록 | c / w |
| 좌우 분할 / 위아래 분할 | % / " |
| 패널 이동 / 현재 패널 확대 | 방향키 / z |
| 복사 모드 / 복사 모드 종료 | [ / q |
| tmux 복사 버퍼 붙여넣기 | ] |
Ghostty의 Cmd+D와 tmux의 Ctrl+B → %는 서로 다른 계층의 분할이다. Ghostty 창 복원도 tmux 프로세스 유지와 다르다. tmux가 실행되는 머신이 잠자기·재부팅·종료되면 작업의 지속 실행을 보장하지 않는다. 원격 작업을 유지하려면 SSH 접속 후 작업을 실행할 원격 머신에서 tmux를 시작한다. 맥 미니 원격 작업 안내도 함께 참고하자.
8. tmux 안에서 줄바꿈·알림이 다르게 동작한다면
현재 Claude Code 문서는 아래 설정을 안내한다. ~/.tmux.conf가 있다면 백업하고 해당 항목을 병합한다. 파일 전체를 다른 예제로 덮어쓰지 않는다.
set -g allow-passthrough on
set -g focus-events on
set -s extended-keys on
set -as terminal-features 'xterm*:extkeys'
tmux source-file ~/.tmux.conf
다시 detach·attach하고 Claude Code도 재시작한다. 확장 키는 Shift+Enter 구분에, passthrough는 지원되는 알림·진행 표시 전달에 관여한다. 지원하지 않는 옵션 오류가 나면 tmux -V와 설치 경로부터 확인하고 최신 지원 버전으로 업데이트한다. 알림의 최종 표시는 Ghostty와 macOS의 권한·설정에도 달려 있다.
공개 공식 문서의 tmux 설정 부분 캡처. ‘외부 터미널에서는 되는데 tmux 안에서 안 되는’ 입력·표시 문제를 구분한다. (출처, 2026-10-26 캡처)
9. 스크롤·복사·이미지는 각각 구분하기
일반 셸 출력에서는 Ghostty의 선택·Cmd+C·Cmd+V가 출발점이다. tmux의 이전 출력은 Ctrl+B → [ 복사 모드로 탐색한다. tmux 복사 버퍼와 macOS 클립보드는 같은 저장소가 아니다. 시스템 클립보드 연동이 필요하면 tmux 공식 클립보드 안내를 따라 별도로 설정한다.
원한다면 ~/.tmux.conf에 아래를 병합해 마우스와 vi 방식 복사를 사용할 수 있다.
set -g mouse on
setw -g mode-keys vi
다시 설정을 읽은 뒤 복사 모드에서 Space로 선택을 시작하고 Enter로 tmux 버퍼에 복사한다. Ctrl+B → ]로 그 버퍼를 붙인다. 전체 화면 TUI에서는 앱 자체 스크롤과 tmux 복사 모드가 별개임을 기억한다.
또한 로컬 이미지 클립보드가 SSH 너머 Claude Code로 자동 전달되는 것은 아니다. 이미지 파일을 원격 환경에 보내는 단계는 SSH·tmux의 이미지 전달 안내에서 따로 다룬다.
10. 한글 입력·SSH·화면 문제 점검하기
| 증상 | 먼저 비교할 것 |
|---|---|
| 한영 전환 직후 첫 글자 조합이 깨짐 | 같은 입력기로 일반 셸, Claude 단독, tmux 안 Claude를 차례로 비교 |
| 조합 중인 글자·후보창 위치가 어긋남 | Ghostty 문제인지 CLI의 커서 위치 보고 문제인지 다른 터미널에서도 비교 |
| Shift+Enter가 전송됨 | tmux 밖에서 먼저 시험하고 확장 키 설정·버전 확인 |
| SSH에서 unknown terminal 오류 | 원격 호스트의 xterm-ghostty terminfo 유무 확인 |
| 깜빡임·스크롤 점프 | Ghostty·tmux·Claude 버전, 창 크기, TUI 렌더링 모드를 나눠 비교 |
실제로 한글 입력 보고가 있다. Ghostty의 첫 글자 조합 보고는 1.3.1을 포함하지만, 저장소의 접수 정책 때문에 자동 종료된 사례다. 이를 유지관리자가 확인한 결함이나 수정 완료로 단정하지 않는다. Claude Code의 IME 위치 보고는 중복으로 종료되었다. Closed만 보고 해결됐다고 판단할 수 없다. 해당 증상을 직접 비교한 뒤 버전·입력기·최소 설정을 기록한다.
SSH의 terminfo 문제는 Ghostty 공식 안내를 따른다. 원격 서버에 tic가 있다면 해당 호스트에 항목을 설치할 수 있다. user@server는 실제 접속 대상으로 바꾼다.
infocmp -x xterm-ghostty | ssh user@server -- tic -x -
설치 권한이 없다면 한 번의 연결에만 TERM=xterm-256color ssh user@server를 사용하는 대안을 검토한다. 일부 기능은 줄어들 수 있다. 모든 셸의 TERM을 전역으로 덮어쓰지는 않는다. 또한 ghostty +ssh는 확인 시점 공식 문서상 1.4.0 예정 기능으로 1.3.x에는 없다. 문서의 tip 기능을 설치된 안정판 기능으로 혼동하지 말자. (SSH 기능 문서)
11. 일상적인 작업 배치 추천
처음에는 프로젝트별 tmux 세션 하나, 작업 창 두세 개로 시작한다. 하나는 Claude Code, 하나는 셸·버전 관리 확인, 필요하면 하나는 개발 서버다. 여러 에이전트가 같은 파일을 동시에 수정하게 만드는 것은 터미널 분할만으로 해결되지 않으므로 작업 범위도 나눈다.
짧은 로컬 명령만 사용한다면 Ghostty 탭만으로 충분하다. 세션 복귀가 필요하면 tmux를 더하고, iTerm2의 프로필과 -CC 통합이 이미 편하다면 그대로 유지해도 된다. Ghostty는 익숙한 CLI 도구의 화면·입력 환경을 개선하는 선택지이며, 좋은 작업 습관까지 자동으로 만들어 주는 도구는 아니다.

If you use Claude Code and other CLI tools in Ghostty, start by separating the terminal, shell, and tmux. This guide covers macOS controls, minimal configuration, reconnecting sessions, Korean input and SSH troubleshooting, and comparisons with iTerm2 and Warp.
This article targets macOS. Official documentation and public reports were checked on 2026-10-26; the default shortcuts and sample configuration syntax were inspected with installed Ghostty 1.3.1. It does not report performance benchmarks or reproduce input problems across every OS and keyboard combination.
1. What Ghostty does
Ghostty is a terminal emulator: it displays command-line programs and passes keyboard input to them. It aims for native macOS/Linux interfaces and fast rendering, with tabs, splits, and themes. Its developer does not claim it wins every performance metric. (Official introduction)
| Tool | Responsibility | What it does not replace |
|---|---|---|
| Ghostty | Windows, tabs, text, and keyboard input | An AI model or project runtime |
| Shell | Interpret commands and start programs | The terminal window |
| tmux | Manage sessions, windows, panes, detachment and reconnection | Process recovery after a host reboot |
| Claude Code | AI CLI tasks such as inspecting and changing code | The terminal or tmux server |
A typical stack is Ghostty → shell → tmux → shell → Claude Code. You can also run Claude Code without tmux. Changing terminals does not increase Claude's model capabilities or usage allowance.
2. Compare iTerm2, Warp, and Apple Terminal
| Application | Reasons to choose it | What to consider |
|---|---|---|
| Ghostty | Native controls, tabs/splits, and small text configuration focused on CLI work | Use a separate tool such as tmux for session persistence; most configuration is file-based |
| iTerm2 | Detailed profiles, automation, and native window/tab integration with tmux | Keep it if your existing profiles and workflows suit you |
| Warp Terminal | Terminal and AI agent workflows in one product | Check feature costs, data settings, and compatibility with your shell/plugins |
| Apple Terminal | Basic CLI, SSH, and tmux without another installation | Decide whether you need Ghostty's native splitting and modern terminal features |
Ghostty works well as a workspace for CLI tools you already chose. Warp can be a better fit when you want its integrated AI workflow. Avoid blanket statements that Warp cannot run tmux or always transmits every command: consult its current compatibility guide and privacy settings for the features and plan you use.
iTerm2 specifically offers tmux -CC, presenting tmux windows as native windows/tabs. That differs from running the ordinary tmux interface inside Ghostty. (iTerm2 tmux integration)
Captured public iTerm2 documentation. The distinction is native tmux UI integration, beyond merely splitting a screen. (Source, captured 2026-10-26)
3. Install and check your environment
Download the macOS .dmg from Ghostty's official download page and move it into Applications. With Homebrew already configured, you can also use the following. Skip tools you already installed.
brew install --cask ghostty
brew install tmux
If Claude Code is missing, follow its official quick start for installation and sign-in. For the Homebrew route:
brew install --cask claude-code
Open Ghostty and check:
ghostty --version
tmux -V
claude --version
pwd
pwd shows your current directory. If only ghostty is not found, its app CLI is at /Applications/Ghostty.app/Contents/MacOS/ghostty. Distinguish a shell/PATH issue from a failed app installation. Manage a Homebrew-installed Claude Code with that installation method's update command.
4. Learn the basic Ghostty controls
These are macOS defaults inspected in Ghostty 1.3.1; custom bindings and other operating systems may differ. Cmd means Command and Option means ⌥.
| Action | Shortcut |
|---|---|
| New window / tab | Cmd+N / Cmd+T |
| Split right / down | Cmd+D / Cmd+Shift+D |
| Previous / next split | Cmd+[ / Cmd+] |
| Move to a split by direction | Cmd+Option+Arrow |
| Increase / decrease font size | Cmd++ / Cmd+- |
| Search | Cmd+F |
| Command palette | Cmd+Shift+P |
| Open / reload configuration | Cmd+, / Cmd+Shift+, |
Inspect defaults with ghostty +list-keybinds --default, or find actions and their bindings in the command palette. Ghostty configuration calls macOS Command super. (Keybinding documentation)
5. Start with four configuration lines
Avoid changing themes, fonts, and shell plugins together. Use Cmd+, to open the actual configuration. Current documentation uses config.ghostty; the older filename config remains supported.
- Shared location:
~/.config/ghostty/config.ghostty - macOS location:
~/Library/Application Support/com.mitchellh.ghostty/config.ghostty - Setting
$XDG_CONFIG_HOMEchanges the shared location. With several files, later-loaded macOS settings can override earlier values.
Captured public Ghostty configuration documentation. Find your active file before creating several alternatives. (Source, captured 2026-10-26)
Add or change these values without overwriting your existing file:
font-size = 14
window-padding-x = 8
window-padding-y = 8
mouse-hide-while-typing = true
Save and reload with Cmd+Shift+,. Some options need a new terminal. Validate syntax with ghostty +validate-config and consult the option reference. Consider macos-option-as-alt = left only when you need Option-based shortcuts; it also changes special-character input, so it is not a mandatory setting.
6. Run Claude Code on its own first
Enter the project you want to work in; replace the example path:
cd /path/to/your/project
claude
Start with a narrow request: explain the directory structure and how to run the project, without editing files yet. Terminal convenience is separate from an agent's permission to change files or run commands. Follow Claude Code's own authentication and permission prompts.
- Enter sends;
Ctrl+Jor\followed by Enter can insert a newline. - Current documentation says Ghostty supports
Shift+Enterwithout extra setup. tmux can require the configuration below. /themeadjusts Claude's display. Its theme and Ghostty's theme are separate.
This follows the Claude Code terminal guide; it does not recommend /terminal-setup as a prerequisite for every Ghostty user.
7. Practice detaching and reconnecting with tmux
A tmux session groups work, a window is a screen inside it, and a pane is a split region. Initially, let tmux handle splitting inside one Ghostty tab. If already inside tmux, open another Ghostty tab to avoid nesting.
mkdir -p ~/Projects/ghostty-lab
cd ~/Projects/ghostty-lab
tmux new-session -A -s ghostty-lab
-A attaches if the named session exists and creates it otherwise. In the session:
printf 'shell pid: %s\n' "$$"
sleep 300
Note the PID. While sleep runs, press and release Ctrl+B, then press D to detach. The server and command remain alive. Reconnect from a new Ghostty tab on the same Mac:
tmux ls
tmux attach-session -t ghostty-lab
If you see the running sleep, interrupt that practice command with Ctrl+C. Repeat the earlier printf and compare the shell PID. Use the same pattern to run claude or a dev server in named sessions for real projects. (Official tmux introduction)
| Action | Default tmux key after pressing and releasing Ctrl+B |
|---|---|
| Detach | d |
| New window / window list | c / w |
| Side-by-side / stacked panes | % / " |
| Change pane / zoom pane | Arrow keys / z |
| Copy mode / leave copy mode | [ / q |
| Paste tmux buffer | ] |
Ghostty's Cmd+D and tmux's Ctrl+B → % split different layers. Restoring Ghostty windows is also different from keeping tmux processes alive. tmux does not guarantee continuous execution when its host sleeps, reboots, or shuts down. For remote persistence, SSH into the working machine and start tmux there. See the remote Mac mini guide.
8. Fix newline and notification differences inside tmux
Current Claude Code documentation recommends the following. Back up an existing ~/.tmux.conf and merge these entries rather than replacing the whole file.
set -g allow-passthrough on
set -g focus-events on
set -s extended-keys on
set -as terminal-features 'xterm*:extkeys'
tmux source-file ~/.tmux.conf
Detach and reattach, then restart Claude Code. Extended keys distinguish Shift+Enter; passthrough forwards supported notifications and progress updates. If an option is unsupported, check tmux -V and the installed executable before updating to a current supported version. Notification display also depends on Ghostty and macOS settings/permissions.
Captured public official tmux configuration guidance, useful when something works outside tmux but fails inside it. (Source, captured 2026-10-26)
9. Separate scrolling, copying, and images
For ordinary shell output, begin with Ghostty selection, Cmd+C, and Cmd+V. Browse older tmux output with Ctrl+B → [. The tmux buffer and macOS clipboard are separate stores. Configure system-clipboard integration separately using the official tmux clipboard guide.
Optionally merge the following into ~/.tmux.conf to enable mouse support and vi-style copying:
set -g mouse on
setw -g mode-keys vi
Reload the configuration; in copy mode, Space begins selection and Enter copies it into tmux's buffer. Ctrl+B → ] pastes that buffer. Full-screen applications can have their own scrolling in addition to tmux copy mode.
A local image clipboard is not automatically forwarded to Claude Code across SSH. Sending an image file to the remote runtime is covered in the SSH/tmux image-transfer guide.
10. Diagnose Korean input, SSH, and display problems
| Symptom | First comparison |
|---|---|
| First Korean character breaks after switching input sources | Same input method in a plain shell, standalone Claude, then Claude inside tmux |
| Composition text/candidate window appears in the wrong place | Compare another terminal to distinguish terminal behavior from the CLI's cursor reporting |
| Shift+Enter sends a message | Test outside tmux, then check extended-key configuration and versions |
| SSH reports unknown terminal | Check remote xterm-ghostty terminfo |
| Flicker or scroll jumps | Compare Ghostty/tmux/Claude versions, window size, and TUI rendering modes separately |
There are real input reports. The Ghostty first-character report names 1.3.1, but was automatically closed under the repository's submission policy. Do not treat that as maintainer-confirmed behavior or a completed fix. The Claude Code IME-position report was closed as a duplicate. Closed does not by itself mean fixed. Compare your symptom and record versions, input method, and minimal configuration.
For SSH terminfo failures, follow Ghostty's official help. If the remote has tic, install the entry there; replace user@server with your destination:
infocmp -x xterm-ghostty | ssh user@server -- tic -x -
Without installation permission, consider TERM=xterm-256color ssh user@server for a single connection, accepting reduced features. Do not globally overwrite TERM in every shell. At the checked date, ghostty +ssh is documented as an upcoming 1.4.0 feature, absent from 1.3.x. Do not confuse tip documentation with your installed stable release. (SSH feature documentation)
11. Arrange your daily workspace
Start with one tmux session per project and two or three windows: Claude Code, a shell/version-control view, and optionally a dev server. Terminal splitting does not solve simultaneous edits by several agents; divide their work as well.
Ghostty tabs alone are enough for short local commands. Add tmux when you need reconnection, and keep iTerm2 if its profiles and -CC integration already suit you. Ghostty improves the display and input environment around familiar CLI tools; it does not automatically supply good working habits.

在 Ghostty 中使用 Claude Code 和 CLI 工具时,先分清终端、shell 与 tmux 的职责。本文介绍 macOS 基本操作、最小配置、会话重连实验、韩文输入与 SSH 排错,并对比 iTerm2 和 Warp。
本文面向 macOS,官方文档与公开报告核对于 2026-10-26;默认快捷键和示例配置语法通过已安装的 Ghostty 1.3.1 检查。本文没有测量各终端性能,也没有复现所有系统和键盘组合的输入问题。
1. Ghostty 是什么
Ghostty 是显示命令行程序并传递键盘输入的终端模拟器。它注重 macOS/Linux 原生界面与快速渲染,提供标签页、分屏和主题。开发者也没有宣称它在所有性能指标上都最快。(官方介绍)
| 工具 | 职责 | 不能替代 |
|---|---|---|
| Ghostty | 窗口、标签、文字与键盘输入 | AI 模型或项目运行环境 |
| Shell | 解释命令、启动程序 | 终端窗口 |
| tmux | 管理会话、窗口、面板及分离、重连 | 主机重启后的进程恢复 |
| Claude Code | 代码检查、修改等 AI CLI 工作 | 终端或 tmux 服务器 |
典型结构为 Ghostty → shell → tmux → shell → Claude Code。也可以不用 tmux,直接运行 Claude Code。换终端不会提高 Claude 的模型能力或使用额度。
2. 对比 iTerm2、Warp 和系统终端
| 程序 | 适合选择的原因 | 需要考虑 |
|---|---|---|
| Ghostty | 原生操作、标签与分屏、简洁文本配置,专注 CLI | 持久会话需要 tmux 等独立工具;配置主要编辑文件 |
| iTerm2 | 丰富配置档、自动化及 tmux 原生窗口和标签集成 | 已有流程顺手就不必更换 |
| Warp Terminal | 同一产品提供终端与 AI 智能体流程 | 核对功能费用、数据设置及 shell、插件兼容性 |
| macOS 终端 | 无需额外安装即可使用 CLI、SSH、tmux | 判断是否需要 Ghostty 的原生分屏和现代终端功能 |
Ghostty 的优势是作为你已选定的 CLI 工具的工作界面。如果需要 Warp 内置 AI 流程,Warp 可能更适合。不要简单宣称 Warp 不支持 tmux,或始终上传所有命令;应按功能和套餐查看当前兼容性文档与隐私设置。
iTerm2 的 tmux -CC 会将 tmux 窗口呈现为原生窗口或标签,这不同于在 Ghostty 内运行普通 tmux 界面。(iTerm2 tmux 集成)
iTerm2 公开官方文档截图。区别在于 tmux 原生界面集成,而不只是分屏。(来源,2026-10-26 截图)
3. 安装并检查环境
从 Ghostty 官方下载页取得 macOS .dmg,移入“应用程序”。已配置 Homebrew 时也可运行以下命令;已有的工具无需重复安装。
brew install --cask ghostty
brew install tmux
若尚无 Claude Code,按官方快速入门安装并登录。使用 Homebrew 时:
brew install --cask claude-code
打开 Ghostty,检查:
ghostty --version
tmux -V
claude --version
pwd
pwd 显示当前目录。如果只有 ghostty 找不到,可用应用 CLI 路径 /Applications/Ghostty.app/Contents/MacOS/ghostty。区分 shell/PATH 问题与应用安装失败。Homebrew 版 Claude Code 应按该安装方式更新。
4. 先学基本操作
以下为 Ghostty 1.3.1 的 macOS 默认快捷键;自定义设置与其他系统可能不同。Cmd 是 Command,Option 是 ⌥。
| 操作 | 快捷键 |
|---|---|
| 新窗口 / 新标签 | Cmd+N / Cmd+T |
| 向右 / 向下分屏 | Cmd+D / Cmd+Shift+D |
| 上一个 / 下一个分屏 | Cmd+[ / Cmd+] |
| 按方向切换分屏 | Cmd+Option+Arrow |
| 放大 / 缩小字体 | Cmd++ / Cmd+- |
| 搜索 | Cmd+F |
| 命令面板 | Cmd+Shift+P |
| 打开 / 重载配置 | Cmd+, / Cmd+Shift+, |
运行 ghostty +list-keybinds --default 查看默认值,也可在命令面板找操作及快捷键。配置中的 super 对应 macOS Command。(快捷键文档)
5. 配置先从四行开始
不要同时更换主题、字体和 shell 插件。用 Cmd+, 打开实际配置文件。当前文档使用 config.ghostty,旧名 config 仍受支持。
- 通用位置:
~/.config/ghostty/config.ghostty - macOS 位置:
~/Library/Application Support/com.mitchellh.ghostty/config.ghostty $XDG_CONFIG_HOME会改变通用路径。若存在多个文件,后加载的 macOS 配置可能覆盖前面的值。
Ghostty 公开配置文档截图。先确认正在使用的文件,避免到处新建配置。(来源,2026-10-26 截图)
保留现有文件,仅添加或调整以下值:
font-size = 14
window-padding-x = 8
window-padding-y = 8
mouse-hide-while-typing = true
保存后按 Cmd+Shift+, 重载;部分选项需要新建终端。用 ghostty +validate-config 检查语法,参考配置选项。只有需要 Option 快捷键时才考虑 macos-option-as-alt = left;它也改变特殊字符输入,不是必选项。
6. 先单独运行 Claude Code
进入实际项目,再启动;替换下列示例路径:
cd /path/to/your/project
claude
第一条请求可以是:解释项目目录和运行方法,暂不修改文件。终端的便利与智能体修改文件、执行命令的权限是两回事;登录和权限以 Claude Code 自身提示为准。
- Enter 发送,
Ctrl+J或\后按 Enter 可换行。 - 当前官方文档说明 Ghostty 的
Shift+Enter无需额外设置;tmux 内可能还需下文配置。 /theme调整 Claude 界面;它与 Ghostty 主题分别设置。
以上依据 Claude Code 终端指南,并不建议所有 Ghostty 用户先运行 /terminal-setup。
7. 练习 tmux 分离与重连
tmux 的会话是一组工作,窗口是会话内的屏幕,面板是分屏区域。起步时让一个 Ghostty 标签里的 tmux 负责分屏;若已在 tmux 内,开新 Ghostty 标签练习,避免嵌套。
mkdir -p ~/Projects/ghostty-lab
cd ~/Projects/ghostty-lab
tmux new-session -A -s ghostty-lab
-A 会连接已有同名会话,否则创建。进入后运行:
printf 'shell pid: %s\n' "$$"
sleep 300
记下 PID。在 sleep 运行期间,先按下并松开 Ctrl+B,再按 D,即可 detach。服务器和命令仍在。用同一台 Mac 的新 Ghostty 标签重连:
tmux ls
tmux attach-session -t ghostty-lab
若看到仍在运行的 sleep,用 Ctrl+C 只中断此练习命令。再运行此前的 printf,确认 shell PID 相同。实际项目也可在命名会话内运行 claude 或开发服务器。(tmux 官方入门)
| 操作 | 先按下并松开 Ctrl+B,再按 |
|---|---|
| 分离会话 | d |
| 新窗口 / 窗口列表 | c / w |
| 左右 / 上下分屏 | % / " |
| 切换面板 / 放大面板 | 方向键 / z |
| 复制模式 / 退出复制模式 | [ / q |
| 粘贴 tmux 缓冲区 | ] |
Ghostty 的 Cmd+D 与 tmux 的 Ctrl+B → % 属于不同层。恢复 Ghostty 窗口也不同于维持 tmux 进程。tmux 不保证其主机睡眠、重启或关机后任务持续运行。 远程使用时,先 SSH 到工作主机,再在那台主机启动 tmux。参阅远程 Mac mini 指南。
8. tmux 内换行和通知不同时
当前 Claude Code 文档推荐以下设置。先备份已有 ~/.tmux.conf 并合并条目,不要替换整个文件。
set -g allow-passthrough on
set -g focus-events on
set -s extended-keys on
set -as terminal-features 'xterm*:extkeys'
tmux source-file ~/.tmux.conf
分离、重连,再重启 Claude Code。扩展按键用于区分 Shift+Enter;passthrough 转发受支持的通知和进度。若选项不受支持,检查 tmux -V 与程序路径,再更新到当前受支持版本。通知最终显示还取决于 Ghostty 与 macOS 的权限和设置。
公开官方文档的 tmux 设置截图,用于区分“tmux 外正常、内部异常”的输入和显示问题。(来源,2026-10-26 截图)
9. 分清滚动、复制与图像
普通 shell 输出先用 Ghostty 选择、Cmd+C、Cmd+V。tmux 历史输出用 Ctrl+B → [ 浏览。tmux 缓冲区与 macOS 剪贴板不是同一个存储区。 系统剪贴板集成应按 tmux 官方指南另行配置。
可选地合并下列设置,启用鼠标及 vi 风格复制:
set -g mouse on
setw -g mode-keys vi
重载后,在复制模式按 Space 开始选择、Enter 复制到 tmux 缓冲区,用 Ctrl+B → ] 粘贴。全屏 TUI 自身的滚动与 tmux 复制模式也可能不同。
本地图像剪贴板不会自动通过 SSH 转给 Claude Code。将图片送到远程运行环境的步骤见 SSH/tmux 图片传输指南。
10. 检查韩文输入、SSH 与显示问题
| 症状 | 首先比较 |
|---|---|
| 切换输入法后首个韩文字母组合异常 | 同一输入法在普通 shell、独立 Claude、tmux 内 Claude 的表现 |
| 组合文字或候选窗位置异常 | 换终端比较,区分终端行为与 CLI 光标位置报告 |
| Shift+Enter 直接发送 | 先测 tmux 外,再查扩展按键与版本 |
| SSH 提示 unknown terminal | 远程是否有 xterm-ghostty terminfo |
| 闪烁、滚动跳动 | 分别比较 Ghostty/tmux/Claude 版本、窗口大小、TUI 渲染模式 |
确有输入报告。Ghostty 首字符问题提到了 1.3.1,但按仓库提交政策被自动关闭,不能视为维护者已确认或已经修复。Claude Code IME 位置报告因重复关闭。Closed 本身不代表已修复。 应比较实际症状,记录版本、输入法和最小配置。
SSH terminfo 问题遵循 Ghostty 官方帮助。远程有 tic 时可安装条目;将 user@server 换为实际目标:
infocmp -x xterm-ghostty | ssh user@server -- tic -x -
无安装权限时,可考虑仅对一次连接使用 TERM=xterm-256color ssh user@server,但可能减少功能。不要全局覆盖所有 shell 的 TERM。核对时,ghostty +ssh 是文档中计划用于 1.4.0 的功能,1.3.x 没有;不要把 tip 文档当成已安装稳定版功能。(SSH 功能文档)
11. 安排日常工作区
先用每项目一个 tmux 会话、两三个窗口:Claude Code、shell/版本管理,必要时再加开发服务器。分屏不能解决多个智能体同时修改同一文件的问题,工作范围也要划分。
短小本地命令只用 Ghostty 标签即可,需要重连再加 tmux;如果 iTerm2 的配置档和 -CC 已经顺手,继续用它也合理。Ghostty 改善熟悉 CLI 工具的显示与输入环境,但不会自动带来良好的工作习惯。

GhosttyでClaude CodeなどのCLIを使うなら、端末・シェル・tmuxの役割から整理しましょう。macOSの基本操作、最小設定、セッション復帰の実習、韓国語入力やSSHの対処、iTerm2・Warpとの比較を案内します。
本記事はmacOS向けです。公式文書と公開報告を 2026-10-26 に確認し、導入済みの Ghostty 1.3.1 で既定のキーと設定例の構文を検査しました。全OS・キーボードでの再現確認や、端末間の性能測定をした記事ではありません。
1. Ghosttyは何をするアプリか
Ghosttyは、CLIの表示とキー入力を担当する ターミナルエミュレーター です。macOS・LinuxのネイティブUIと高速描画を目指し、タブ、分割、テーマを提供します。開発者も全性能項目で最速とは主張していません。(公式紹介)
| 道具 | 担当 | 代替しないもの |
|---|---|---|
| Ghostty | ウィンドウ、タブ、文字、キー入力 | AIモデルやプロジェクトの実行環境 |
| シェル | コマンド解釈とプログラム起動 | 端末ウィンドウそのもの |
| tmux | セッション・ウィンドウ・ペイン、分離と再接続 | ホスト再起動後のプロセス復旧 |
| Claude Code | 調査や変更などのAI CLI作業 | 端末やtmuxサーバー |
基本構造は Ghostty → シェル → tmux → シェル → Claude Code です。tmuxなしでも使えます。端末を変えてもClaudeのモデル能力や利用上限は増えません。
2. iTerm2・Warp・標準ターミナルとの比較
| アプリ | 選ぶ理由 | 確認する点 |
|---|---|---|
| Ghostty | ネイティブ操作、タブ・分割、小さなテキスト設定でCLIに集中 | セッション保持はtmuxなどを併用。設定は主にファイル編集 |
| iTerm2 | 詳細なプロファイル、自動化、tmuxのネイティブウィンドウ・タブ統合 | 既存の環境が合うなら変更は不要 |
| Warp Terminal | 端末とAIエージェント作業を一つの製品で利用 | 機能別料金、データ設定、シェル・プラグイン互換性 |
| macOSターミナル | 追加導入なしでCLI・SSH・tmuxを利用 | Ghosttyの分割や現代的な端末機能が必要か判断 |
Ghosttyの利点は 選んだCLIを使いやすく収める作業画面 であることです。Warp自身のAIワークフローが必要ならWarpの利点が大きい場合もあります。「tmux非対応」「常に全コマンドを送信」と一括りにせず、現在の 互換性文書と プライバシー設定を機能・プラン別に確認します。
iTerm2の tmux -CC はtmuxウィンドウをネイティブウィンドウやタブにします。Ghostty内で通常のtmuxを動かす方式とは別です。(iTerm2のtmux統合)
iTerm2公開公式文書のキャプチャ。単なる分割より、tmuxのネイティブUI統合が比較上の違いです。(出典、2026-10-26撮影)
3. 導入して環境を確認する
Ghostty公式ダウンロードのmacOS .dmgを取得し、アプリケーションへ移します。Homebrewが設定済みなら次も使えます。導入済みの道具は重複インストールしません。
brew install --cask ghostty
brew install tmux
Claude Codeがなければ 公式クイックスタートで導入・ログインを済ませます。Homebrewを使う場合は次のとおりです。
brew install --cask claude-code
Ghosttyを開いて確認します。
ghostty --version
tmux -V
claude --version
pwd
pwd は現在のディレクトリです。ghosttyだけ見つからなければ /Applications/Ghostty.app/Contents/MacOS/ghostty を使えます。シェル・PATHの問題と導入失敗を区別します。Homebrew版Claude Codeは、その導入方法の更新コマンドで管理します。
4. 先に覚える基本操作
以下はGhostty 1.3.1のmacOS既定値です。変更済み設定や他OSでは異なる場合があります。Cmd はCommand、Option は⌥です。
| 操作 | キー |
|---|---|
| 新規ウィンドウ / タブ | Cmd+N / Cmd+T |
| 右 / 下へ分割 | Cmd+D / Cmd+Shift+D |
| 前 / 次の分割へ | Cmd+[ / Cmd+] |
| 方向を指定して移動 | Cmd+Option+Arrow |
| 文字拡大 / 縮小 | Cmd++ / Cmd+- |
| 検索 | Cmd+F |
| コマンドパレット | Cmd+Shift+P |
| 設定を開く / 再読込 | Cmd+, / Cmd+Shift+, |
ghostty +list-keybinds --default で既定値を確認できます。パレットでも操作とキーを探せます。設定内ではmacOS Commandを super と表記します。(キーバインド説明)
5. 設定は4行から始める
テーマ、フォント、シェルプラグインを同時に変えず、Cmd+, で実際の設定ファイルを開きます。現在の名前は config.ghostty で、旧名 config も使えます。
- 共通パス:
~/.config/ghostty/config.ghostty - macOSパス:
~/Library/Application Support/com.mitchellh.ghostty/config.ghostty $XDG_CONFIG_HOMEを設定している場合は共通パスが変わります。複数あれば、後から読むmacOS設定が先の値を上書きすることがあります。
公開公式設定文書のキャプチャ。複数の場所に作る前に、現在のファイルを確認します。(出典、2026-10-26撮影)
既存ファイルを上書きせず、次の値だけ追加・変更します。
font-size = 14
window-padding-x = 8
window-padding-y = 8
mouse-hide-while-typing = true
保存後は Cmd+Shift+, で再読込します。一部は新しい端末が必要です。ghostty +validate-config で構文を検査し、詳細は オプション一覧を見ます。Optionショートカットが必要な場合だけ macos-option-as-alt = left を検討してください。特殊文字入力も変わるので必須設定にはしません。
6. まずClaude Codeを単独で使う
実際のプロジェクトへ移動して起動します。例のパスは置き換えてください。
cd /path/to/your/project
claude
最初は「ディレクトリ構成と起動方法を説明し、まだ変更しないでください」と範囲を絞ります。端末の便利さと、エージェントのファイル変更・実行権限は別です。認証と権限はClaude Code自身の案内に従います。
- Enterは送信、
Ctrl+Jまたは\の後にEnterで改行できます。 - 現在の公式文書ではGhosttyの
Shift+Enterは追加設定不要です。tmux内では後述の設定が必要な場合があります。 /themeはClaudeの表示テーマです。Ghosttyのテーマとは別設定です。
Claude Code端末ガイドに基づき、全Ghosttyユーザーに最初から /terminal-setup を勧めることはしません。
7. tmuxの分離と復帰を練習する
tmuxの セッション は作業のまとまり、ウィンドウ はその中の画面、ペイン は分割領域です。最初はGhosttyの1タブでtmuxに分割を任せます。既にtmux内なら、新規Ghosttyタブで練習して入れ子を避けます。
mkdir -p ~/Projects/ghostty-lab
cd ~/Projects/ghostty-lab
tmux new-session -A -s ghostty-lab
-A は同名セッションがあれば接続し、なければ作成します。中で次を実行します。
printf 'shell pid: %s\n' "$$"
sleep 300
PIDを控えます。sleep 実行中に Ctrl+Bを押して離し、D を押すとdetachします。サーバーとコマンドは残ります。同じMacの新しいGhosttyタブから復帰します。
tmux ls
tmux attach-session -t ghostty-lab
実行中の sleep が見えたら Ctrl+C で練習コマンドだけを止め、先ほどの printf を再実行して同じシェルPIDか比較します。実プロジェクトでも名前付きセッション内で claude や開発サーバーを実行します。(tmux公式入門)
| 操作 | Ctrl+Bを押して離した後の既定キー |
|---|---|
| セッション分離 | d |
| 新規ウィンドウ / 一覧 | c / w |
| 左右 / 上下分割 | % / " |
| ペイン移動 / 拡大 | 方向キー / z |
| コピーモード / コピーモード終了 | [ / q |
| tmuxバッファを貼る | ] |
Ghosttyの Cmd+D とtmuxの Ctrl+B → % は異なる層を分割します。Ghosttyのウィンドウ復元とプロセス維持も別です。tmuxのホストがスリープ・再起動・終了すると、継続実行は保証されません。 リモートではSSH接続後、実際に作業するホスト側でtmuxを起動します。リモートMac miniガイドも参照してください。
8. tmux内で改行や通知が変わる場合
現在のClaude Code文書は次を案内しています。既存の ~/.tmux.conf をバックアップして項目を統合し、ファイル全体を置き換えないでください。
set -g allow-passthrough on
set -g focus-events on
set -s extended-keys on
set -as terminal-features 'xterm*:extkeys'
tmux source-file ~/.tmux.conf
detach・attachし直し、Claude Codeも再起動します。拡張キーは Shift+Enter の区別、passthroughは対応する通知・進捗表示の転送に関わります。未対応オプションなら tmux -V と実行パスを確認して更新します。通知の最終表示はGhostty・macOSの権限や設定にも左右されます。
公開公式文書の設定部分。「tmux外では動くが内側では動かない」問題の切り分けに使います。(出典、2026-10-26撮影)
9. スクロール・コピー・画像を区別する
普通のシェル出力はGhosttyで選択し、Cmd+C・Cmd+V を使います。tmuxの過去出力は Ctrl+B → [ のコピーモードで見ます。tmuxバッファとmacOSクリップボードは別物です。連携は tmux公式クリップボードガイドで別途設定します。
必要ならマウスとvi式コピーを次で有効にします。
set -g mouse on
setw -g mode-keys vi
再読込後、コピーモードでSpaceから選択し、Enterでtmuxバッファへコピーします。貼り付けは Ctrl+B → ]。全画面TUIのスクロールとtmuxのコピーモードも別です。
ローカルの画像クリップボードがSSH越しのClaude Codeへ自動転送されるわけではありません。画像ファイルの送信は SSH・tmux画像転送ガイドで扱います。
10. 韓国語入力・SSH・画面の問題を調べる
| 症状 | 最初の比較 |
|---|---|
| 入力方式切替直後の最初の韓国語が崩れる | 同じ入力方式で通常シェル、Claude単独、tmux内Claudeを比較 |
| 組み立て中の文字や候補位置がずれる | 別端末でも比較し、端末とCLIのカーソル報告を切り分ける |
| Shift+Enterが送信になる | tmux外で試し、拡張キーとバージョンを確認 |
| SSHでunknown terminal | リモートの xterm-ghostty terminfo |
| 点滅やスクロールの飛び | 各アプリのバージョン、ウィンドウ幅、TUI描画方式を分けて比較 |
入力の報告は実際にあります。Ghosttyの先頭文字報告には1.3.1も記載されていますが、受付方針による自動終了であり、保守者が確認した不具合や修正完了とは断定できません。Claude CodeのIME位置報告は重複として終了しています。Closedだけでは修正済みとは判断できません。 症状を比較してバージョン・入力方式・最小設定を残します。
SSHのterminfoは Ghostty公式ヘルプに従います。リモートに tic があれば項目を導入できます。user@server は実際の接続先に変えます。
infocmp -x xterm-ghostty | ssh user@server -- tic -x -
導入権限がなければ、1接続だけ TERM=xterm-256color ssh user@server を使う代案がありますが、一部機能は減ります。全シェルの TERM を上書きしないでください。確認時の ghostty +ssh は 1.4.0予定 の機能で、1.3.xにはありません。tipの説明と安定版を混同しないようにします。(SSH機能文書)
11. 日常の作業配置
最初は プロジェクトごとにtmuxセッション1つ、ウィンドウ2〜3枚。Claude Code、シェル・バージョン管理、必要なら開発サーバーを分けます。複数エージェントによる同じファイルの同時編集は、画面分割では解決しないため担当範囲も分けます。
短いローカルコマンドならGhosttyのタブだけで十分です。再接続が必要ならtmuxを足し、iTerm2のプロファイルや -CC が快適なら継続して構いません。GhosttyはCLIの画面と入力環境を改善する選択肢で、作業習慣まで自動で整えるものではありません。

Si usas Claude Code y otras CLI en Ghostty, distingue primero terminal, shell y tmux. Esta guía cubre controles de macOS, configuración mínima, reconexión, problemas de entrada coreana y SSH, y diferencias con iTerm2 y Warp.
Fuentes oficiales e informes públicos comprobados el 2026-10-26; los atajos y la sintaxis del ejemplo se verificaron con Ghostty 1.3.1 instalado. No se midió rendimiento ni se reprodujeron errores con todos los sistemas y teclados.
1. Qué hace Ghostty
Ghostty es un emulador de terminal: muestra programas y transmite el teclado. Busca una interfaz nativa macOS/Linux y renderizado rápido, con pestañas, divisiones y temas. Su desarrollador no afirma que gane todas las métricas. (Presentación oficial)
| Herramienta | Función | No sustituye |
|---|---|---|
| Ghostty | Ventanas, pestañas, texto y teclado | Modelo de IA o entorno del proyecto |
| Shell | Interpretar comandos e iniciar programas | Ventana de terminal |
| tmux | Sesiones, ventanas, paneles, separación y reconexión | Recuperación tras reiniciar el host |
| Claude Code | Investigar y modificar código con IA | Terminal o servidor tmux |
La estructura habitual es Ghostty → shell → tmux → shell → Claude Code. Puedes prescindir de tmux. Cambiar de terminal no aumenta las capacidades ni la cuota de Claude.
2. Comparación con iTerm2, Warp y Terminal
| Aplicación | Motivos para elegirla | Qué revisar |
|---|---|---|
| Ghostty | Controles nativos, pestañas/paneles y configuración de texto pequeña | Persistencia con otra herramienta; ajustes principalmente en archivos |
| iTerm2 | Perfiles, automatización e integración nativa de ventanas tmux | Si tu flujo funciona, no necesitas cambiar |
| Warp Terminal | Terminal y agentes de IA integrados | Costes, datos y compatibilidad de shell/plugins |
| Terminal de macOS | CLI, SSH y tmux sin instalar otra app | Si necesitas paneles nativos y funciones modernas de Ghostty |
Ghostty es un espacio para las CLI que ya elegiste. Warp puede convenirte más si buscas su flujo de IA. No lo describas como incompatible con tmux o como un producto que siempre envía todos los comandos: consulta su compatibilidad y privacidad según función y plan.
iTerm2 ofrece tmux -CC, que presenta ventanas tmux como ventanas o pestañas nativas. No es lo mismo que ejecutar tmux normalmente dentro de Ghostty. (Integración tmux)
Documentación oficial pública: la distinción es integrar la interfaz tmux, no solo dividir la pantalla. (Fuente, captura del 2026-10-26)
3. Instala y comprueba el entorno
Descarga el .dmg de Ghostty y muévelo a Aplicaciones. Con Homebrew configurado también puedes usar estos comandos; omite herramientas ya instaladas.
brew install --cask ghostty
brew install tmux
Si falta Claude Code, sigue su inicio rápido para instalar e iniciar sesión. Con Homebrew:
brew install --cask claude-code
Abre Ghostty y comprueba:
ghostty --version
tmux -V
claude --version
pwd
pwd muestra el directorio actual. Si solo falta ghostty, usa /Applications/Ghostty.app/Contents/MacOS/ghostty. Distingue PATH/shell de una instalación fallida. Actualiza Claude Code con su método de instalación; para Homebrew, sus comandos.
4. Controles básicos
Valores macOS de Ghostty 1.3.1; otros sistemas o configuraciones pueden variar. Cmd es Command y Option es ⌥.
| Acción | Atajo |
|---|---|
| Nueva ventana / pestaña | Cmd+N / Cmd+T |
| Dividir derecha / abajo | Cmd+D / Cmd+Shift+D |
| Panel anterior / siguiente | Cmd+[ / Cmd+] |
| Moverse por dirección | Cmd+Option+Arrow |
| Aumentar / reducir letra | Cmd++ / Cmd+- |
| Buscar | Cmd+F |
| Paleta de comandos | Cmd+Shift+P |
| Abrir / recargar ajustes | Cmd+, / Cmd+Shift+, |
Consulta ghostty +list-keybinds --default o busca acciones en la paleta. En la configuración, super significa Command. (Atajos)
5. Empieza con cuatro líneas
No cambies temas, fuentes y plugins a la vez. Abre el archivo activo con Cmd+,. El nombre actual es config.ghostty; el antiguo config sigue admitido.
- Ruta común:
~/.config/ghostty/config.ghostty - Ruta macOS:
~/Library/Application Support/com.mitchellh.ghostty/config.ghostty $XDG_CONFIG_HOMEcambia la ruta común. Si hay varios archivos, los ajustes macOS cargados después pueden sustituir los anteriores.
Captura oficial pública. Localiza tu archivo antes de crear varios. (Fuente, captura del 2026-10-26)
Añade o modifica estos valores sin sobrescribir el archivo existente:
font-size = 14
window-padding-x = 8
window-padding-y = 8
mouse-hide-while-typing = true
Guarda y pulsa Cmd+Shift+,. Algunas opciones necesitan un terminal nuevo. Valida con ghostty +validate-config; consulta la referencia. Usa macos-option-as-alt = left solo si necesitas atajos Option: también cambia caracteres especiales y no es obligatorio.
6. Prueba Claude Code por separado
Entra en tu proyecto; sustituye la ruta:
cd /path/to/your/project
claude
Empieza pidiendo explicar carpetas y ejecución sin modificar archivos. La comodidad del terminal es distinta de los permisos del agente para modificar o ejecutar. Sigue los avisos propios de Claude Code.
- Enter envía;
Ctrl+Jo\seguido de Enter inserta una línea. - La documentación actual indica que
Shift+Enterfunciona directamente en Ghostty; tmux puede necesitar ajustes adicionales. /themecambia Claude; su tema y el de Ghostty son independientes.
La guía de terminal de Claude Code no exige /terminal-setup como primer paso para todos los usuarios Ghostty.
7. Practica separar y recuperar sesiones
Una sesión reúne trabajo, una ventana es una pantalla y un panel una división. Al empezar, usa tmux para los paneles dentro de una pestaña Ghostty. Si ya estás en tmux, practica en otra pestaña para evitar anidarlo.
mkdir -p ~/Projects/ghostty-lab
cd ~/Projects/ghostty-lab
tmux new-session -A -s ghostty-lab
-A conecta si la sesión existe o la crea. Dentro:
printf 'shell pid: %s\n' "$$"
sleep 300
Anota el PID. Mientras corre sleep, pulsa y suelta Ctrl+B y después D. Separas la sesión, pero servidor y comando permanecen. Desde otra pestaña del mismo Mac:
tmux ls
tmux attach-session -t ghostty-lab
Si ves sleep, detén solo la prueba con Ctrl+C. Repite printf y compara el PID. Usa el mismo patrón para claude o un servidor en sesiones de proyectos. (Introducción tmux)
| Acción | Tecla tras pulsar y soltar Ctrl+B |
|---|---|
| Separar | d |
| Nueva ventana / lista | c / w |
| Paneles lado a lado / apilados | % / " |
| Cambiar panel / ampliarlo | Flechas / z |
| Modo copia / salir | [ / q |
| Pegar búfer | ] |
Cmd+D y Ctrl+B → % dividen capas distintas. Restaurar ventanas Ghostty no equivale a mantener procesos. tmux no garantiza ejecución continua si su host duerme, se reinicia o apaga. Para persistencia remota, conecta por SSH y ejecuta tmux en el host de trabajo. Consulta la guía del Mac mini remoto.
8. Ajusta nuevas líneas y notificaciones en tmux
Claude Code recomienda estas entradas. Guarda una copia de ~/.tmux.conf y combínalas sin reemplazar el archivo.
set -g allow-passthrough on
set -g focus-events on
set -s extended-keys on
set -as terminal-features 'xterm*:extkeys'
tmux source-file ~/.tmux.conf
Separa y reconecta; reinicia Claude Code. Las teclas extendidas distinguen Shift+Enter, y passthrough transmite notificaciones/progreso compatibles. Si una opción falla, revisa tmux -V y la ruta antes de actualizar. La notificación final depende también de Ghostty y de permisos y ajustes macOS.
Captura oficial pública: ayuda a distinguir lo que funciona fuera de tmux pero falla dentro. (Fuente, captura del 2026-10-26)
9. Distingue desplazamiento, copia e imágenes
Para salidas normales, selección Ghostty, Cmd+C y Cmd+V. Para historial tmux, Ctrl+B → [. El búfer tmux y el portapapeles macOS son distintos. Configura su integración con la guía oficial.
Opcionalmente combina estas líneas para ratón y copia tipo vi:
set -g mouse on
setw -g mode-keys vi
Recarga; en modo copia, Space comienza la selección y Enter la copia al búfer. Ctrl+B → ] lo pega. Una TUI completa puede tener desplazamiento propio, separado de tmux.
Las imágenes locales no pasan automáticamente por SSH a Claude Code. La guía de imágenes SSH/tmux explica cómo enviar el archivo al entorno remoto.
10. Diagnostica entrada coreana, SSH y pantalla
| Síntoma | Primera comparación |
|---|---|
| Primer carácter coreano mal compuesto | Mismo método en shell, Claude solo y Claude dentro de tmux |
| Composición/candidatos mal colocados | Otro terminal para distinguir emulador y posición de cursor comunicada por CLI |
| Shift+Enter envía | Fuera de tmux primero; después teclas extendidas y versiones |
| SSH indica unknown terminal | Terminfo xterm-ghostty remoto |
| Parpadeos o saltos | Versiones, tamaño y renderizado TUI por separado |
Existen informes reales. El informe Ghostty de primer carácter menciona 1.3.1, pero se cerró automáticamente por la política de recepción: no prueba confirmación por mantenedores ni corrección. El informe IME de Claude Code se cerró como duplicado. Closed no equivale a corregido. Compara síntomas y registra versiones, entrada y ajustes mínimos.
Sigue la ayuda Ghostty para terminfo. Con tic en el destino puedes instalarlo; cambia user@server:
infocmp -x xterm-ghostty | ssh user@server -- tic -x -
Sin permiso de instalación, considera TERM=xterm-256color ssh user@server para una conexión, con menos funciones. No sobrescribas TERM globalmente. Según la documentación consultada, ghostty +ssh está previsto para 1.4.0, no 1.3.x. No confundas tip y estable. (Funciones SSH)
11. Organiza el trabajo diario
Empieza con una sesión tmux por proyecto y dos o tres ventanas: Claude Code, shell/control de versiones y, si procede, servidor. Dividir la pantalla no evita conflictos de varios agentes sobre el mismo archivo; divide también las tareas.
Para comandos locales breves bastan pestañas. Añade tmux para reconexión y conserva iTerm2 si perfiles y -CC te resultan cómodos. Ghostty mejora pantalla y entrada de las CLI; no crea por sí solo buenos hábitos.


