Terminal

Integrated terminal with Ghostty and SwiftTerm backends

Overview

Agentastic includes a powerful integrated terminal with two backend options:

  • Ghostty - GPU-accelerated terminal rendering via Metal (recommended)
  • SwiftTerm - Pure Swift terminal implementation

Opening the Terminal

  • Press Cmd+Shift+Y to toggle the Utility Area
  • Click the Terminal tab in the Utility Area
  • New terminal tabs open with your default shell

Terminal Backends

Ghostty (Recommended)

Ghostty provides GPU-accelerated rendering using Metal, delivering excellent performance and smooth scrolling. It's the default backend on supported systems.

Features:

  • GPU-accelerated rendering
  • Smooth scrolling
  • Native macOS integration
  • Fast text rendering

SwiftTerm

SwiftTerm is a pure Swift implementation that works on all supported systems.

Features:

  • Native Swift implementation
  • Reliable fallback option
  • Good compatibility

Switching Backends

  1. Open Settings (Cmd+,)
  2. Navigate to Terminal
  3. Select your preferred backend under Terminal Emulator

Configuration

Shell Selection

Choose your shell in Settings > Terminal:

  • System Default - Uses your login shell
  • Bash - GNU Bash
  • Zsh - Z Shell (macOS default)
  • Custom - Specify a custom shell path

Appearance

SettingDescription
FontTerminal font face
Font SizeText size in points
Cursor StyleBlock, underline, or bar
Cursor BlinkEnable/disable blinking

Option as Meta Key

Enable Option as Meta Key to use the Option key as a Meta modifier in terminal applications like Emacs.

Multiple Terminals

Create multiple terminal tabs for different tasks:

  • Click the + button in the terminal tab bar
  • Each terminal maintains its own shell session
  • Right-click tabs for more options

Shell Integration

Agentastic automatically integrates with your shell to provide enhanced features.

Features

  • Tab titles - Shows current directory or running command
  • Working directory tracking - Navigator follows terminal location
  • Command notifications - Get notified when long-running commands complete
  • Process tracking - See running processes in the activity indicator

How It Works

When shell integration is enabled, Agentastic installs hooks into your shell:

  • Bash: Sources .codeedit_shell_integration.bash
  • Zsh: Sources integration scripts for different startup files

These hooks use preexec and precmd patterns to communicate with Agentastic.

Enabling/Disabling

Toggle shell integration in Settings > Terminal > Shell Integration.

Agent-Aware Terminals

Terminals are associated with their agent context:

  • Each agent has its own set of terminal tabs
  • Switching agents switches to that agent's terminals
  • Terminal state (scrollback, running processes) is preserved per agent
  • New terminals open in the current agent's directory

This means you can have different terminal sessions for different branches without interference.

Keyboard Shortcuts

ActionShortcut
New Terminal TabCmd+T
Toggle Utility AreaCmd+Shift+Y
Close TerminalDelete (when focused)

Input Features

  • Copy/Paste - Standard clipboard integration
  • Option as Meta - Use Option key as Meta in vim, emacs, etc.
  • Shift+Enter - Send literal newline (Ghostty)
  • Ctrl+J - Alternative newline input (Ghostty)
  • Image pasting - Paste images as file paths

Theme Integration

The terminal automatically uses your current Agentastic theme:

  • ANSI colors match your color scheme
  • Background and text colors sync with the editor
  • Cursor color follows your selection

Tips

  • Use Ghostty for best performance on Apple Silicon
  • Shell integration enables command completion notifications
  • Multiple tabs are great for parallel tasks (build, tests, server)
  • Agent terminals keep your contexts separate