Skip to main content
GitHub Desktop can launch your preferred terminal shell to work with Git repositories from the command line. Shells can be opened from the Repository menu or toolbar.

Requirements

For a shell to be supported by GitHub Desktop, it must meet these criteria:
1

Discoverable

GitHub Desktop must be able to detect if the shell is installed on the user’s machine.
2

Launchable

The shell must be launchable using the operating system’s APIs.
3

Stable interface

The shell must have stable command-line arguments that don’t change between updates.

Supported Shells

Windows

These are defined in the shell enumeration:
app/src/lib/shells/win32.ts

macOS

Supported terminal applications on macOS:
  • Terminal (default macOS terminal)
  • iTerm2
  • Hyper
  • PowerShell Core
  • Kitty
  • Alacritty
  • Tabby
  • WezTerm
  • Warp
  • Ghostty
app/src/lib/shells/darwin.ts

Linux

Linux users can choose from these terminal emulators:
  • GNOME Terminal
  • Ptyxis
  • MATE Terminal
  • Tilix
  • Terminator
  • Rxvt Unicode (urxvt)
  • Konsole (KDE)
  • XTerm
  • Terminology
  • Ghostty
app/src/lib/shells/linux.ts

Shell Detection

Windows: Registry and File System

On Windows, shells are detected using registry lookups and file system checks:
app/src/lib/shells/win32.ts
Built-in shells like Command Prompt and PowerShell are always available on Windows and don’t require detection.

macOS: Bundle Identifiers

On macOS, shells are discovered using their application bundle identifiers:
app/src/lib/shells/darwin.ts
The detection process:
app/src/lib/shells/darwin.ts

Linux: Executable Paths

Linux shells are located by checking known executable paths:
app/src/lib/shells/linux.ts

Launching Shells

Windows Launch Arguments

Each shell requires specific command-line arguments to open in the repository directory:
app/src/lib/shells/win32.ts
Path arguments are properly quoted to handle directories with spaces.

macOS Launch with open

On macOS, shells are launched using the open command with the bundle identifier:
app/src/lib/shells/darwin.ts
This approach allows macOS to:
  • Use the default application for that bundle ID
  • Handle application launching properly
  • Support multiple versions of the same shell

Linux Launch Arguments

Linux shells use various working directory flags:
app/src/lib/shells/linux.ts

Getting Available Shells

GitHub Desktop detects all installed shells at startup:

Custom Shell Integration

GitHub Desktop supports custom shell configurations:
app/src/lib/shells/darwin.ts
Custom integrations use argument expansion:

Shell Parsing

The parse() function converts shell names to enum values:

Adding a New Shell

To add support for a new shell:
1

Add enum entry

Add a new entry to the Shell enum in the appropriate platform file with a user-friendly name.
2

Implement detection

Windows: Add a finder function that checks registry or file system:
macOS: Add bundle ID to getBundleIDs():
Linux: Add path to getShellPath():
3

Update getAvailableShells()

Add your shell to the detection logic in getAvailableShells().
4

Implement launch logic

Add launch arguments to the launch() function:
5

Update parse function

Add parsing logic if needed (usually automatic with parseEnumValue).

Contributing

Want to add support for your favorite shell? Check out the shell integration technical documentation for detailed contribution guidelines.