{"id":21275697,"url":"https://github.com/halimath/terminal","last_synced_at":"2026-01-12T02:50:40.124Z","repository":{"id":209163281,"uuid":"723384314","full_name":"halimath/terminal","owner":"halimath","description":"Extensions for golang.org/x/term","archived":false,"fork":false,"pushed_at":"2023-12-19T16:04:54.000Z","size":33,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-12-19T16:06:42.808Z","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/halimath.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}},"created_at":"2023-11-25T13:54:27.000Z","updated_at":"2024-01-04T15:27:05.160Z","dependencies_parsed_at":"2023-12-19T16:06:06.444Z","dependency_job_id":"94bfef22-59bf-4de3-be2d-38b3f421c467","html_url":"https://github.com/halimath/terminal","commit_stats":null,"previous_names":["halimath/termx"],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halimath%2Fterminal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halimath%2Fterminal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halimath%2Fterminal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halimath%2Fterminal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/halimath","download_url":"https://codeload.github.com/halimath/terminal/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243732303,"owners_count":20338839,"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":"2024-11-21T09:36:13.289Z","updated_at":"2026-01-12T02:50:40.117Z","avatar_url":"https://github.com/halimath.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# termx\n\nANSI terminal support for Go(lang)\n\n![CI Status][ci-img-url]\n[![Package Doc][package-doc-img-url]][package-doc-url] \n[![Releases][release-img-url]][release-url]\n\n[ci-img-url]: https://github.com/halimath/terminal/workflows/CI/badge.svg\n[package-doc-img-url]: https://img.shields.io/badge/GoDoc-Reference-blue.svg\n[package-doc-url]: https://pkg.go.dev/github.com/halimath/terminal\n[release-img-url]: https://img.shields.io/github/v/release/halimath/terminal.svg\n[release-url]: https://github.com/halimath/terminal/releases\n\n`terminal` provides a go module to access ANSI features of a (pseudo) terminal. The module provides packages\nthat support\n* colored output\n* raw input handling\n* application mode\n* alternative screen buffers\n* mouse support\n\nAll features are implemented to support xterm compatible terminals (no terminfo parsing is done). In addition\ncompatible features are tested to work on windows as well (if supported).\n\n# Installation\n\n`terminal` can be installed as a Go module\n\n```shell\ngo get github.com/halimath/terminal\n```\n\n# Usage\n\nThe `terminal` package provides a type `Terminal` which provides methods to deal with the terminal. \nThe `Terminal` type provides methods to\n\n* enter and exit raw mode\n* read and write strings, raw bytes as well as control sequences\n* read `input.Event`s which decode byte sequences into key presses and mouse events\n  \nThis module provides a package `csi` which contains _Control Sequence Introducer_ definitions that \nenable advanced terminal output operations, such as\n\n* moving the cursor\n* clearing (parts of) the screen\n* setting the terminal's window title\n* querying terminal information (i.e. cursor position, background color)\n\nThis module provides a package `sgr`, which contains definitions for _Select Graphic Rendition_\nwhich allows applications to format colored text or otherwise styled text output.\n\nSee the [`examples`](./examples) directory for small applications demonstrating how to use this module.\n\n# Useful resources\n\nA lot of information about the escape sequences and their treatment by different terminal applications has\nbeen gathered from the following resources which i highly recommend to anyone interested in the internals\nof `terminal`:\n\n* https://invisible-island.net/xterm/ctlseqs/ctlseqs.html\n* https://chrisyeh96.github.io/2020/03/28/terminal-colors.html\n\n# License\n\nCopyright 2023 Alexander Metzner.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalimath%2Fterminal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhalimath%2Fterminal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalimath%2Fterminal/lists"}