{"id":15043226,"url":"https://github.com/snugfox/ansi-escapes","last_synced_at":"2025-04-14T21:13:09.413Z","repository":{"id":53781900,"uuid":"142790003","full_name":"snugfox/ansi-escapes","owner":"snugfox","description":"Collection of ANSI escapes for Go","archived":false,"fork":false,"pushed_at":"2021-03-14T14:02:53.000Z","size":13,"stargazers_count":14,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-14T21:13:04.405Z","etag":null,"topics":["ansi-escape-sequences","apple-terminal","go","golang","vt100","windows-10"],"latest_commit_sha":null,"homepage":null,"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/snugfox.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}},"created_at":"2018-07-29T19:34:07.000Z","updated_at":"2024-11-21T12:09:34.000Z","dependencies_parsed_at":"2022-09-02T12:30:23.560Z","dependency_job_id":null,"html_url":"https://github.com/snugfox/ansi-escapes","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snugfox%2Fansi-escapes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snugfox%2Fansi-escapes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snugfox%2Fansi-escapes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snugfox%2Fansi-escapes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/snugfox","download_url":"https://codeload.github.com/snugfox/ansi-escapes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248961237,"owners_count":21189993,"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":["ansi-escape-sequences","apple-terminal","go","golang","vt100","windows-10"],"created_at":"2024-09-24T20:48:43.676Z","updated_at":"2025-04-14T21:13:09.377Z","avatar_url":"https://github.com/snugfox.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ansi-scapes [![GoDoc](https://godoc.org/github.com/snugfox/ansi-escapes?status.svg)](https://godoc.org/github.com/snugfox/ansi-escapes)\nansi-scapes is a minimal Go library for ANSI escape sequences. It handles the\nsmall differences in the Apple's Terminal app, as well as enable and disable\nescape sequences on Windows 10 v1511 and later.\n\n🚧 ansi-escapes is still under development, and is subject to change 🚧\n\n## Features\n- Constants for simple escape sequences\n- Functions for sequences with parameters\n- Correct functionality across terminal emulators\n- Ability to enable/disable escape sequence processing on Windows v1511 and\nlater\n\n## Installation\nWith the [Go Programming Language](https://golang.org/),\n```console\n$ go get -u github.com/snugfox/ansi-escapes\n```\n\n## Usage\nGo's import mechanism does not allow package names to contain hyphens, so import\nthe package as `escapes`.\n```go\nimport escapes \"github.com/snugfox/ansi-escapes\"\n```\n\n## Example\n```go\npackage main\n\nimport (\n  \"bytes\"\n  \"fmt\"\n  \"os\"\n\n  escapes \"github.com/snugfox/ansi-escapes\"\n)\n\nfunc main() {\n  // Enable support on Windows for this application. It is safe to include on\n  // OSes other than Windows, as the functions will only return nil; thus\n  // compiled out.\n  escapes.EnableVirtualTerminal(escapes.Stdout)\n  defer escapes.DisableVirtualTerminal(escapes.Stdout)\n\n  // Erase the screen. Remember that fmt.Println would print the newline *after*\n  // the escape sequence.\n  fmt.Print(escapes.EraseScreen)\n\n  // Move the cursor one column to the right\n  fmt.Print(escapes.CursorForward)\n\n  // Move the cursor to (1, 1)\n  fmt.Print(escapes.CursorPos(1, 1))\n\n  // Display a super secret image\n  var buf bytes.Buffer\n  file, _ := os.Open(\"meow.jpg\")\n  buf.ReadFrom(file)\n  fmt.Print(escapes.Image(buf.Bytes()))\n}\n```\n\n## License\nMIT (c) Snug_Fox\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnugfox%2Fansi-escapes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnugfox%2Fansi-escapes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnugfox%2Fansi-escapes/lists"}