{"id":17910874,"url":"https://github.com/inancgumus/screen","last_synced_at":"2025-04-07T12:06:54.640Z","repository":{"id":45664148,"uuid":"160840297","full_name":"inancgumus/screen","owner":"inancgumus","description":"Little helper for clearing the screen using pure Go in a cross-platform way","archived":false,"fork":false,"pushed_at":"2024-01-27T21:08:49.000Z","size":4,"stargazers_count":83,"open_issues_count":3,"forks_count":12,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-31T10:08:11.079Z","etag":null,"topics":["bash","go","golang","windows"],"latest_commit_sha":null,"homepage":"","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/inancgumus.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":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-12-07T15:20:07.000Z","updated_at":"2025-01-19T10:57:43.000Z","dependencies_parsed_at":"2024-10-28T19:52:02.208Z","dependency_job_id":null,"html_url":"https://github.com/inancgumus/screen","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inancgumus%2Fscreen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inancgumus%2Fscreen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inancgumus%2Fscreen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inancgumus%2Fscreen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inancgumus","download_url":"https://codeload.github.com/inancgumus/screen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247648977,"owners_count":20972945,"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":["bash","go","golang","windows"],"created_at":"2024-10-28T19:35:08.381Z","updated_at":"2025-04-07T12:06:54.621Z","avatar_url":"https://github.com/inancgumus.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Screen\n\nThe screen package provides an easy way for clearing the screen, moving the cursor and getting the size of the current window in a cross-platform way (Linux, OS X and Windows).\n\n## Installation\n\n```\n$ go get -u github.com/inancgumus/screen\n```\n\n## Clearing the Screen\n\nYou can clear the screen and move the cursor to the top-left corner of the screen. This is good enough to create an animated program (such as an always updating clock or a progress bar).\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/inancgumus/screen\"\n)\n\nfunc main() {\n\t// Clear all the characters on the screen\n\tscreen.Clear()\n\n\tfor {\n\t\t// Moves the cursor to the top-left position of the screen\n\t\tscreen.MoveTopLeft()\n\n\t\t// Animate the time always in the same position\n\t\tfmt.Println(time.Now())\n\n\t\ttime.Sleep(time.Second)\n\t}\n}\n```\n\n## Getting the Width and Height\n\nYou can get the current terminal width and height. Actually, you don't have to use this package to do that. It's just a simple wrapper over [terminal](https://godoc.org/golang.org/x/crypto/ssh/terminal) package.\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/inancgumus/screen\"\n)\n\nfunc main() {\n\tw, h := screen.Size()\n    \n\tfmt.Printf(\"Width: %d Height: %d\\n\", w, h)\n}\n```\n\n---\n\n_MIT License_","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Financgumus%2Fscreen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Financgumus%2Fscreen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Financgumus%2Fscreen/lists"}