{"id":28544055,"url":"https://github.com/moby/term","last_synced_at":"2025-07-06T18:30:35.408Z","repository":{"id":49290017,"uuid":"246814856","full_name":"moby/term","owner":"moby","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-03T21:24:44.000Z","size":310,"stargazers_count":70,"open_issues_count":3,"forks_count":29,"subscribers_count":16,"default_branch":"main","last_synced_at":"2025-06-20T11:16:11.287Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moby.png","metadata":{"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":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-12T11:16:09.000Z","updated_at":"2025-05-24T19:01:10.000Z","dependencies_parsed_at":"2024-06-18T13:38:54.511Z","dependency_job_id":"26fe9ad2-3a23-463c-96af-f90b1a456ef5","html_url":"https://github.com/moby/term","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/moby/term","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moby%2Fterm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moby%2Fterm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moby%2Fterm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moby%2Fterm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moby","download_url":"https://codeload.github.com/moby/term/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moby%2Fterm/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262357770,"owners_count":23298484,"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":[],"created_at":"2025-06-09T22:06:40.466Z","updated_at":"2025-07-06T18:30:35.403Z","avatar_url":"https://github.com/moby.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# term - utilities for dealing with terminals\n\n![Test](https://github.com/moby/term/workflows/Test/badge.svg) [![GoDoc](https://godoc.org/github.com/moby/term?status.svg)](https://godoc.org/github.com/moby/term) [![Go Report Card](https://goreportcard.com/badge/github.com/moby/term)](https://goreportcard.com/report/github.com/moby/term)\n\nterm provides structures and helper functions to work with terminal (state, sizes).\n\n#### Using term\n\n```go\npackage main\n\nimport (\n\t\"log\"\n\t\"os\"\n\n\t\"github.com/moby/term\"\n)\n\nfunc main() {\n\tfd := os.Stdin.Fd()\n\tif term.IsTerminal(fd) {\n\t\tws, err := term.GetWinsize(fd)\n\t\tif err != nil {\n\t\t\tlog.Fatalf(\"term.GetWinsize: %s\", err)\n\t\t}\n\t\tlog.Printf(\"%d:%d\\n\", ws.Height, ws.Width)\n\t}\n}\n```\n\n## Contributing\n\nWant to hack on term? [Docker's contributions guidelines](https://github.com/docker/docker/blob/master/CONTRIBUTING.md) apply.\n\n## Copyright and license\nCode and documentation copyright 2015 Docker, inc. Code released under the Apache 2.0 license. Docs released under Creative commons.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoby%2Fterm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoby%2Fterm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoby%2Fterm/lists"}