macos-term-size
« Back to VersTracker
Description:
Get the terminal window size on macOS
Type: Formula  |  Tracked Since: Dec 28, 2025
Links: Homepage  |  @sindresorhus  |  formulae.brew.sh
Category: Developer tools
Tags: macos terminal cli utility swift
Install: brew install macos-term-size
About:
A native macOS command-line utility that retrieves the current dimensions of the active terminal window in rows and columns. It provides a simple and reliable way to programmatically access terminal size information, which is essential for creating responsive command-line interfaces and managing text-based layouts dynamically.
Key Features:
  • Native Swift implementation for high performance and reliability
  • Simple command-line interface for easy integration into scripts
  • Returns dimensions in both rows/columns and pixels
  • Zero dependencies and lightweight footprint
Use Cases:
  • Building responsive CLI applications that adapt to window size
  • Shell scripting for dynamic layout adjustments
  • Logging terminal dimensions for debugging or analytics
Alternatives:
  • tput – Standard Unix tool but may not always report accurate window size in all environments
  • stty – Another Unix utility for terminal settings, but more complex and less focused on just dimensions
Version History
Detected Version Rev Change Commit
Sep 16, 2025 2:40am 0 VERSION_BUMP 6816bd86