{"id":13393546,"url":"https://github.com/jroimartin/gocui","last_synced_at":"2025-05-08T22:21:33.102Z","repository":{"id":12947047,"uuid":"15625102","full_name":"jroimartin/gocui","owner":"jroimartin","description":"Minimalist Go package aimed at creating Console User Interfaces.","archived":false,"fork":false,"pushed_at":"2025-05-01T12:16:55.000Z","size":258,"stargazers_count":10214,"open_issues_count":59,"forks_count":621,"subscribers_count":130,"default_branch":"master","last_synced_at":"2025-05-08T20:54:40.154Z","etag":null,"topics":["cui","go","gocui","gui"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"e0404/matRad","license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jroimartin.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":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-01-04T02:50:20.000Z","updated_at":"2025-05-08T03:53:45.000Z","dependencies_parsed_at":"2022-07-14T07:10:32.001Z","dependency_job_id":"4d05e7fa-9d8c-4c92-8e73-ebb53fa71a06","html_url":"https://github.com/jroimartin/gocui","commit_stats":{"total_commits":249,"total_committers":20,"mean_commits":12.45,"dds":0.09236947791164662,"last_synced_commit":"de100503e6c3afcfd3ed101e7263ada4166f634c"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jroimartin%2Fgocui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jroimartin%2Fgocui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jroimartin%2Fgocui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jroimartin%2Fgocui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jroimartin","download_url":"https://codeload.github.com/jroimartin/gocui/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253155548,"owners_count":21862717,"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":["cui","go","gocui","gui"],"created_at":"2024-07-30T17:00:55.698Z","updated_at":"2025-05-08T22:21:33.068Z","avatar_url":"https://github.com/jroimartin.png","language":"Go","funding_links":[],"categories":["HarmonyOS","命令行","Go","Misc","Command Line","User Interaction","Repositories","\u003cspan id=\"命令行-command-line\"\u003e命令行 Command Line\u003c/span\u003e","Interaction","Uncategorized","Go 程序设计","Build Automation","Programming Languages","Table of Contents","高级控制台UI`用于构建控制台应用程序和控制台用户界面的库.`","高级控制台UI"],"sub_categories":["Windows Manager","高级控制台用户界面","Advanced Console UIs","Command Line Interface","\u003cspan id=\"高级控制台用户界面-advanced-console-uis\"\u003e高级控制台用户界面 Advanced Console UIs\u003c/span\u003e","Command Line","Uncategorized","网络服务_其他","Go","标准 CLI"],"readme":"# GOCUI - Go Console User Interface\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/jroimartin/gocui.svg)](https://pkg.go.dev/github.com/jroimartin/gocui)\n\nMinimalist Go package aimed at creating Console User Interfaces.\n\n## Features\n\n* Minimalist API.\n* Views (the \"windows\" in the GUI) implement the interface io.ReadWriter.\n* Support for overlapping views.\n* The GUI can be modified at runtime (concurrent-safe).\n* Global and view-level keybindings.\n* Mouse support.\n* Colored text.\n* Customizable edition mode.\n* Easy to build reusable widgets, complex layouts...\n\n## Installation\n\nExecute:\n\n```sh\ngo get github.com/jroimartin/gocui\n```\n\n## Documentation\n\nExecute:\n\n```sh\ngo doc github.com/jroimartin/gocui\n```\n\nOr visit [pkg.go.dev](https://pkg.go.dev/github.com/jroimartin/gocui) to read\nit online.\n\n## Example\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\n\t\"github.com/jroimartin/gocui\"\n)\n\nfunc main() {\n\tg, err := gocui.NewGui(gocui.OutputNormal)\n\tif err != nil {\n\t\tlog.Panicln(err)\n\t}\n\tdefer g.Close()\n\n\tg.SetManagerFunc(layout)\n\n\tif err := g.SetKeybinding(\"\", gocui.KeyCtrlC, gocui.ModNone, quit); err != nil {\n\t\tlog.Panicln(err)\n\t}\n\n\tif err := g.MainLoop(); err != nil \u0026\u0026 err != gocui.ErrQuit {\n\t\tlog.Panicln(err)\n\t}\n}\n\nfunc layout(g *gocui.Gui) error {\n\tmaxX, maxY := g.Size()\n\tif v, err := g.SetView(\"hello\", maxX/2-7, maxY/2, maxX/2+7, maxY/2+2); err != nil {\n\t\tif err != gocui.ErrUnknownView {\n\t\t\treturn err\n\t\t}\n\t\tfmt.Fprintln(v, \"Hello world!\")\n\t}\n\treturn nil\n}\n\nfunc quit(g *gocui.Gui, v *gocui.View) error {\n\treturn gocui.ErrQuit\n}\n```\n\n## Screenshots\n\n![r2cui](https://cloud.githubusercontent.com/assets/1223476/19418932/63645052-93ce-11e6-867c-da5e97e37237.png)\n\n![_examples/demo.go](https://cloud.githubusercontent.com/assets/1223476/5992750/720b84f0-aa36-11e4-88ec-296fa3247b52.png)\n\n![_examples/dynamic.go](https://cloud.githubusercontent.com/assets/1223476/5992751/76ad5cc2-aa36-11e4-8204-6a90269db827.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjroimartin%2Fgocui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjroimartin%2Fgocui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjroimartin%2Fgocui/lists"}