{"id":15042547,"url":"https://github.com/sindresorhus/macos-terminal-size","last_synced_at":"2025-10-19T19:30:35.740Z","repository":{"id":46626247,"uuid":"90478522","full_name":"sindresorhus/macos-terminal-size","owner":"sindresorhus","description":"Get the terminal window size on macOS","archived":false,"fork":false,"pushed_at":"2023-11-04T18:05:45.000Z","size":8,"stargazers_count":39,"open_issues_count":0,"forks_count":3,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-01-28T19:27:26.383Z","etag":null,"topics":["c","columns","macos","rows","size","terminal","tty"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sindresorhus.png","metadata":{"funding":{"github":"sindresorhus","open_collective":"sindresorhus","custom":"https://sindresorhus.com/donate"},"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-05-06T17:07:43.000Z","updated_at":"2025-01-07T20:11:29.000Z","dependencies_parsed_at":"2022-08-02T23:45:44.494Z","dependency_job_id":"2a85b376-4063-40b0-8c02-339037668532","html_url":"https://github.com/sindresorhus/macos-terminal-size","commit_stats":null,"previous_names":["sindresorhus/macos-terminal-size","sindresorhus/macos-term-size"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fmacos-terminal-size","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fmacos-terminal-size/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fmacos-terminal-size/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fmacos-terminal-size/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sindresorhus","download_url":"https://codeload.github.com/sindresorhus/macos-terminal-size/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237200688,"owners_count":19271196,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","columns","macos","rows","size","terminal","tty"],"created_at":"2024-09-24T20:47:29.097Z","updated_at":"2025-10-19T19:30:35.421Z","avatar_url":"https://github.com/sindresorhus.png","language":"C","funding_links":["https://github.com/sponsors/sindresorhus","https://opencollective.com/sindresorhus","https://sindresorhus.com/donate"],"categories":[],"sub_categories":[],"readme":"# macos-terminal-size\n\n\u003e Get the terminal window size on macOS\n\nWorks even when run [non-interactively](http://www.tldp.org/LDP/abs/html/intandnonint.html), for example, in a child process or when piped.\n\n## Install\n\n[Download](https://github.com/sindresorhus/macos-terminal-size/releases/latest) the binary and put it in `/usr/local/bin`.\n\n## Usage\n\n```\n$ terminal-size\n143\n24\n```\n\nWhere `143` are the number of columns and `24` are the number of rows.\n\n## Comparison\n\n```\n$ tput cols\n158\n$ tput cols \u0026\u003e x; cat x\n80\n```\n\n```\n$ terminal-size\n158\n25\n$ terminal-size \u0026\u003e x; cat x\n158\n25\n```\n\n## Build\n\n```sh\n./build\n```\n\n## Related\n\n- [terminal-size](https://github.com/sindresorhus/terminal-size) - Get the terminal window size, cross-platform\n- [windows-terminal-size](https://github.com/sindresorhus/windows-terminal-size) - Get the terminal window size on Windows\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsindresorhus%2Fmacos-terminal-size","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsindresorhus%2Fmacos-terminal-size","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsindresorhus%2Fmacos-terminal-size/lists"}