{"id":23968698,"url":"https://github.com/vutran/ansi","last_synced_at":"2025-07-23T16:09:06.232Z","repository":{"id":144202066,"uuid":"105210063","full_name":"vutran/ansi","owner":"vutran","description":"ANSI utilities for Go (golang)","archived":false,"fork":false,"pushed_at":"2017-10-09T00:57:12.000Z","size":69,"stargazers_count":11,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-13T15:45:48.179Z","etag":null,"topics":["ansi","ascii","code","escape","golang","loader","spinner"],"latest_commit_sha":null,"homepage":"https://godoc.org/github.com/vutran/ansi","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/vutran.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,"zenodo":null}},"created_at":"2017-09-28T23:53:55.000Z","updated_at":"2025-02-20T23:14:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"ff83d266-1666-40ef-9727-ef111bcbbf65","html_url":"https://github.com/vutran/ansi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vutran/ansi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vutran%2Fansi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vutran%2Fansi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vutran%2Fansi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vutran%2Fansi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vutran","download_url":"https://codeload.github.com/vutran/ansi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vutran%2Fansi/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266708514,"owners_count":23971946,"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","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","ascii","code","escape","golang","loader","spinner"],"created_at":"2025-01-07T00:15:58.724Z","updated_at":"2025-07-23T16:09:06.210Z","avatar_url":"https://github.com/vutran.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ansi\n\n\u003e ANSI utilities\n\n## Install\n\nTo get started, you need a working Go environment. Once available, grab the package here:\n\n```\n$ go get github.com/vutran/ansi\n```\n\n## Usage\n\n### Cursor\n\nTo be documented.\n\n### Display\n\nTo be documented.\n\n### Style\n\nSimple functions to apply a style to a string of text.\n\n```go\npackage main\n\nimport (\n\t\"github.com/vutran/ansi/styles\"\n)\n\nfunc main() {\n\tmsg: = styles.Bold(\"Hello, world\")\n\tfmt.Print(msg)\n}\n```\n\n### Colors\n\nSimple functions to apply a foreground or background color to a string of text.\n\n```go\npackage main\n\nimport (\n\t\"github.com/vutran/ansi/colors\"\n)\n\nfunc main() {\n\tmsg := colors.Blue(\"Hello, world\")\n\tfmt.Print(msg)\n}\n```\n\n### Loaders\n\nDisplay an animated progress loader.\n\n![loader](loader.gif)\n\n```go\npackage main\n\nimport (\n\t\"github.com/vutran/ansi\"\n\t\"github.com/vutran/ansi/loaders\"\n\t\"time\"\n)\n\nfunc main() {\n\ts := ansi.Loader(loaders.Dots, 100)\n\ts.SetValue(\"Loading\")\n\ts.Start()\n\ttime.Sleep(2 * time.Second)\n\ts.SetValue(\"Finalizing...\")\n\ttime.Sleep(2 * time.Second)\n\ts.Stop()\n}\n```\n\n#### Available Loaders\n\n- Circle\n- Clock\n- Dots\n- Lines\n- Moon\n- Triangle\n\n### Mix and Match\n\nYou can mix and decorate your text however you prefer.\n\n```go\npackage main\n\nimport (\n\t\"github.com/vutran/ansi/colors\"\n\t\"github.com/vutran/ansi/styles\"\n)\n\nfunc main() {\n\t// bold, blue text\n\tmsg := styles.Bold(colors.Blue(\"Hello, world\"))\n\tfmt.Print(msg)\n}\n```\n\n## License\n\nMIT © [Vu Tran](https://github.com/vutran/srgnt)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvutran%2Fansi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvutran%2Fansi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvutran%2Fansi/lists"}