惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

G
Google Developers Blog
Apple Machine Learning Research
Apple Machine Learning Research
小众软件
小众软件
Recent Announcements
Recent Announcements
阮一峰的网络日志
阮一峰的网络日志
IT之家
IT之家
A
About on SuperTechFans
量子位
Engineering at Meta
Engineering at Meta
B
Blog
The Cloudflare Blog
博客园 - 【当耐特】
Hugging Face - Blog
Hugging Face - Blog
Y
Y Combinator Blog
J
Java Code Geeks
D
DataBreaches.Net
aimingoo的专栏
aimingoo的专栏
T
Tailwind CSS Blog
H
Help Net Security
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
V
V2EX
Stack Overflow Blog
Stack Overflow Blog
C
Check Point Blog
酷 壳 – CoolShell
酷 壳 – CoolShell

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Building a Complete Developer Terminal Setup for Claude C...
Avinash Seet · 2026-04-26 · via DEV Community

By Avinash, GenAI Practice Lead | Part 1 | Part 2 | Part 3 | Part 4 | Part 5 of 6


The terminal environment around Claude Code matters as much as Claude Code itself. You spend hours in this environment — the less friction it has, the more thinking you can direct at the actual work.

This part covers everything outside Claude Code: iTerm2, tmux, starship, fzf, and zsh plugins.


iTerm2

Replace macOS Terminal with iTerm2. The reasons that matter for this setup specifically are true 24-bit color rendering (ANSI color gradients in the statusline render correctly), better escape code support (the blinking compaction warning needs this), and mouse support in tmux.

brew install --cask iterm2

Enter fullscreen mode Exit fullscreen mode

Two settings to configure immediately after installing:

Font — install JetBrains Mono Nerd Font for starship icons and powerline segments:

brew install --cask font-jetbrains-mono-nerd-font

Enter fullscreen mode Exit fullscreen mode

Then in iTerm2: Settings → Profiles → Text → Font → set to JetBrainsMono Nerd Font, size 13.

Terminal type — in iTerm2: Settings → Profiles → Terminal → Report Terminal Type → set to xterm-256color.

Color theme — download and import the tokyo-night theme:

curl -L -o ~/Downloads/tokyo-night.itermcolors "https://raw.githubusercontent.com/folke/tokyonight.nvim/main/extras/iterm/tokyonight_night.itermcolors"

Enter fullscreen mode Exit fullscreen mode

Then Settings → Profiles → Colors → Color Presets → Import → select the file → apply.


tmux

tmux is a terminal multiplexer. For Claude Code development the value is twofold: persistent sessions that survive terminal restarts, and multiple panes visible simultaneously without switching tabs.

brew install tmux

Enter fullscreen mode Exit fullscreen mode

My standard 3-pane layout:

┌─────────────────────┬──────────────┐
│                     │  Logs/Watch  │
│    Claude Code      ├──────────────┤
│                     │     Git      │
└─────────────────────┴──────────────┘

Enter fullscreen mode Exit fullscreen mode

Claude Code runs in the large left pane. Test output or log watching runs top right. Git and manual commands run bottom right. Everything visible at once — no tab switching mid-flow.

Essential config — add to ~/.tmux.conf:

set -g mouse on              # trackpad scrolling
set -g history-limit 50000   # large scrollback buffer
set -sg escape-time 0        # no delay for escape key — important for Claude Code

Enter fullscreen mode Exit fullscreen mode

Session persistence — install tmux-resurrect and tmux-continuum:

git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm

Enter fullscreen mode Exit fullscreen mode

Add to ~/.tmux.conf:

set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @continuum-restore 'on'
set -g @resurrect-capture-pane-contents 'on'
run '~/.tmux/plugins/tpm/tpm'

Enter fullscreen mode Exit fullscreen mode

Press Ctrl+B then I inside tmux to install plugins. Save layout with Ctrl+B then Ctrl+S. After this, closing iTerm2 and reopening it restores your exact layout — pane positions, working directories, and running processes.


Starship Prompt

The default macOS prompt tells you almost nothing. Starship shows git branch, git status, Python version, and time directly in your prompt:

ocr-eval-framework on  main [x!?] via 🐍 v3.12.9  18:43

Enter fullscreen mode Exit fullscreen mode

The [x!?] git status indicators: x = staged changes, ! = unstaged modifications, ? = untracked files. At a glance you know your exact repo state without running git status.

brew install starship
starship preset tokyo-night -o ~/.config/starship.toml
echo 'eval "$(starship init zsh)"' >> ~/.zshrc
source ~/.zshrc

Enter fullscreen mode Exit fullscreen mode


fzf

fzf replaces linear Ctrl+R command history search with an interactive fuzzy finder. Type any fragment of a previous command and it filters in real time across your entire history. For long evaluation commands with specific flags you ran three sessions ago, this is invaluable.

brew install fzf
$(brew --prefix)/opt/fzf/install  # say y to all three prompts
source ~/.zshrc

Enter fullscreen mode Exit fullscreen mode

Three shortcuts now available:

  • Ctrl+R — fuzzy search command history
  • Ctrl+T — fuzzy search files, paste path to prompt
  • Alt+C — fuzzy search directories and cd into selected

zsh Plugins

Two additions that change daily terminal use immediately:

zsh-autosuggestions shows previous commands in grey as you type based on history. Right arrow to accept the suggestion. After a day of use your muscle memory adapts and you stop retyping long paths from scratch.

zsh-syntax-highlighting colors commands green (valid) or red (invalid) as you type. Catches typos before you press Enter.

brew install zsh-autosuggestions zsh-syntax-highlighting
echo 'source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh' >> ~/.zshrc
echo 'source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh' >> ~/.zshrc
source ~/.zshrc

Enter fullscreen mode Exit fullscreen mode


The Full Visual Stack

With everything configured, your terminal looks like this:

  • Dark navy tokyo-night background in iTerm2
  • JetBrains Mono Nerd Font rendering icons cleanly
  • tmux status bar at the bottom showing session name and time
  • Starship prompt showing directory, git branch, git status, Python version
  • Claude Code statusline above the prompt showing tokens, cost, rate limits
  • Grey autosuggestions completing commands as you type
  • Green/red syntax highlighting on every command

Every layer of information has a deliberate place. Nothing is decorative.


All configuration files are at https://github.com/ai-with-avinash/claude-code-best-setup.

Back to Part 4 | Continue to Part 6 → Dotfiles and Wrap-up