{"id":13409939,"url":"https://github.com/mattn/go-isatty","last_synced_at":"2025-05-13T22:05:24.156Z","repository":{"id":15578904,"uuid":"18314451","full_name":"mattn/go-isatty","owner":"mattn","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-03T07:07:53.000Z","size":63,"stargazers_count":858,"open_issues_count":14,"forks_count":110,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-05-11T08:34:27.177Z","etag":null,"topics":["cygwin","go","golang","isatty","msys2","website"],"latest_commit_sha":null,"homepage":"http://godoc.org/github.com/mattn/go-isatty","language":"Go","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/mattn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"mattn","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2014-04-01T01:53:09.000Z","updated_at":"2025-05-05T18:08:16.000Z","dependencies_parsed_at":"2023-01-13T18:29:34.926Z","dependency_job_id":"e5df3856-af01-4f1e-bc33-49592abfccac","html_url":"https://github.com/mattn/go-isatty","commit_stats":{"total_commits":94,"total_committers":29,"mean_commits":"3.2413793103448274","dds":0.5,"last_synced_commit":"a7c02353c47bc4ec6b30dc9628154ae4fe760c11"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattn%2Fgo-isatty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattn%2Fgo-isatty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattn%2Fgo-isatty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattn%2Fgo-isatty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mattn","download_url":"https://codeload.github.com/mattn/go-isatty/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253736102,"owners_count":21955782,"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":["cygwin","go","golang","isatty","msys2","website"],"created_at":"2024-07-30T20:01:04.141Z","updated_at":"2025-05-13T22:05:19.143Z","avatar_url":"https://github.com/mattn.png","language":"Go","funding_links":["https://github.com/sponsors/mattn"],"categories":["开源类库","Command Line","Open source library","Go","命令行","Build Automation","\u003cspan id=\"命令行-command-line\"\u003e命令行 Command Line\u003c/span\u003e","高级控制台UI`用于构建控制台应用程序和控制台用户界面的库.`","高级控制台UI"],"sub_categories":["命令行","Advanced Console UIs","Command Line","高级控制台用户界面","\u003cspan id=\"高级控制台用户界面-advanced-console-uis\"\u003e高级控制台用户界面 Advanced Console UIs\u003c/span\u003e","标准 CLI"],"readme":"# go-isatty\n\n[![Godoc Reference](https://godoc.org/github.com/mattn/go-isatty?status.svg)](http://godoc.org/github.com/mattn/go-isatty)\n[![Codecov](https://codecov.io/gh/mattn/go-isatty/branch/master/graph/badge.svg)](https://codecov.io/gh/mattn/go-isatty)\n[![Coverage Status](https://coveralls.io/repos/github/mattn/go-isatty/badge.svg?branch=master)](https://coveralls.io/github/mattn/go-isatty?branch=master)\n[![Go Report Card](https://goreportcard.com/badge/mattn/go-isatty)](https://goreportcard.com/report/mattn/go-isatty)\n\nisatty for golang\n\n## Usage\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/mattn/go-isatty\"\n\t\"os\"\n)\n\nfunc main() {\n\tif isatty.IsTerminal(os.Stdout.Fd()) {\n\t\tfmt.Println(\"Is Terminal\")\n\t} else if isatty.IsCygwinTerminal(os.Stdout.Fd()) {\n\t\tfmt.Println(\"Is Cygwin/MSYS2 Terminal\")\n\t} else {\n\t\tfmt.Println(\"Is Not Terminal\")\n\t}\n}\n```\n\n## Installation\n\n```\n$ go get github.com/mattn/go-isatty\n```\n\n## License\n\nMIT\n\n## Author\n\nYasuhiro Matsumoto (a.k.a mattn)\n\n## Thanks\n\n* k-takata: base idea for IsCygwinTerminal\n\n    https://github.com/k-takata/go-iscygpty\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattn%2Fgo-isatty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattn%2Fgo-isatty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattn%2Fgo-isatty/lists"}