{"id":21540098,"url":"https://github.com/detectivekaktus/gocursors","last_synced_at":"2025-09-12T05:44:20.035Z","repository":{"id":251895591,"uuid":"838764764","full_name":"detectivekaktus/gocursors","owner":"detectivekaktus","description":"Ncurses-like library made with ANSI escape codes","archived":false,"fork":false,"pushed_at":"2024-08-17T20:50:48.000Z","size":47,"stargazers_count":5,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T04:43:41.982Z","etag":null,"topics":["cli","curses","go","gocursors","golang","library","module","ncurses","package","terminal","tui"],"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/detectivekaktus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"2024-08-06T09:47:05.000Z","updated_at":"2025-03-10T15:44:50.000Z","dependencies_parsed_at":"2024-08-15T10:58:57.794Z","dependency_job_id":null,"html_url":"https://github.com/detectivekaktus/gocursors","commit_stats":null,"previous_names":["detectivekaktus/gocursors"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/detectivekaktus%2Fgocursors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/detectivekaktus%2Fgocursors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/detectivekaktus%2Fgocursors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/detectivekaktus%2Fgocursors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/detectivekaktus","download_url":"https://codeload.github.com/detectivekaktus/gocursors/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248150633,"owners_count":21055955,"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":["cli","curses","go","gocursors","golang","library","module","ncurses","package","terminal","tui"],"created_at":"2024-11-24T04:17:21.726Z","updated_at":"2025-04-10T03:30:21.648Z","avatar_url":"https://github.com/detectivekaktus.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GoCursors\nGoCursors is an ncurses-like library written in Go for everyone who's tired of absurdly complex workflows, rules and interfaces that other popular Go TUI libraries have. It's important to notice that GoCursors is not the copy of ncurses with Go syntax but rather is a library inspired by ncurses and its simplicity.\n\nAny knowledge of ncurses is welcome and can help a lot while exploring the features of the library.\n\nIn order to use this library successfully you need a terminal or a terminal emulator which supports ANSI escape codes. To install the library, use `go get github.com/detectivekaktus/gocursors`.\n\nThe library depends on the `golang.org/x/term v0.22.0` module.\n\n## Demonstration\n- Hello world. The program that prints *Hello, World!* and waits for the user input and then exits normally.\n```go\npackage main\n\nimport \"github.com/detectivekaktus/gocursors/pkg/gocursors\"\n\nfunc main() {\n  root := gocursors.GoCursors()\n  gocursors.CbreakStart()\n\n  defer gocursors.CbreakRestore()\n  defer gocursors.EndCursors()\n\n  root.OutString(\"Hello, World!\")\n  root.GetChar()\n}\n```\n\n- Text editor. The program has a border around and can output and clear the characters. Once ESCAPE is pressed, the program exits normally.\n```go\npackage main\n\nimport \"github.com/detectivekaktus/gocursors/pkg/gocursors\"\n\nfunc main() {\n  root := gocursors.GoCursors()\n  gocursors.CbreakStart()\n\n  defer gocursors.CbreakRestore()\n  defer gocursors.EndCursors()\n\n  root.Border()\n  for {\n    c := root.GetChar()\n    if c == 27 { // 27 is ESCAPE character.\n      break\n    } else if c == 8 || c == 127 || c == '\\b'{ // 8, 127 and '\\b' are BACKSPACE characters.\n      root.CurAdd(-1, 0)\n      root.OutChar(' ')\n      root.CurAdd(-1, 0)\n    } else {\n      root.OutChar(c)\n    }\n  }\n}\n```\n\n## Projects using GoCursors\n- [GopherGit](https://github.com/detectivekaktus/GopherGit). Git TUI client written in Go with use of GoCursors library. The project is maintained by [detectivekaktus](https://github.com/detectivekaktus).\n\nIf you want to add your project to the list, please submit a pull request!\n\n## Contributing\nIn order to contribute to the project, you must follow the [guidelines](https://github.com/detectivekaktus/GoCursors/blob/main/CONTRIBUTING.md). Any deviations won't probably be merged.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdetectivekaktus%2Fgocursors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdetectivekaktus%2Fgocursors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdetectivekaktus%2Fgocursors/lists"}