{"id":17001624,"url":"https://github.com/shresht7/go-cli-tools","last_synced_at":"2026-05-18T17:05:05.231Z","repository":{"id":39858915,"uuid":"453706818","full_name":"Shresht7/go-cli-tools","owner":"Shresht7","description":"Command-line tools and utilities for Go","archived":false,"fork":false,"pushed_at":"2024-05-02T10:56:54.000Z","size":81,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-22T08:48:46.573Z","etag":null,"topics":["cli","go"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/Shresht7/go-cli-tools","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/Shresht7.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}},"created_at":"2022-01-30T14:44:57.000Z","updated_at":"2024-05-02T10:56:57.000Z","dependencies_parsed_at":"2024-06-21T10:09:28.973Z","dependency_job_id":null,"html_url":"https://github.com/Shresht7/go-cli-tools","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Shresht7/go-cli-tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shresht7%2Fgo-cli-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shresht7%2Fgo-cli-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shresht7%2Fgo-cli-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shresht7%2Fgo-cli-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Shresht7","download_url":"https://codeload.github.com/Shresht7/go-cli-tools/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shresht7%2Fgo-cli-tools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33184769,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T09:27:30.708Z","status":"ssl_error","status_checked_at":"2026-05-18T09:27:28.300Z","response_time":71,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cli","go"],"created_at":"2024-10-14T04:25:34.453Z","updated_at":"2026-05-18T17:05:05.214Z","avatar_url":"https://github.com/Shresht7.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `go-cli-tools`\n\nCommand-line tools and utilities for Go projects.\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/Shresht7/go-cli-tools.svg)](https://pkg.go.dev/github.com/Shresht7/go-cli-tools)\n\n\u003cdetails\u003e\n\n\u003csummary\u003eTable of Contents\u003c/summary\u003e\n\n- [📦 ANSI Modules](#-ansi-modules)\n  - [🎨 Colors](#-colors)\n  - [💄 Styles](#-styles)\n  - [☝ Cursor](#-cursor)\n  - [🧼 Clear](#-clear)\n  - [🅰 RegExp](#-regexp)\n- [📚 Helpers](#-helpers)\n  - [🏭 Composition](#-composition)\n- [📃 Format](#-format)\n  - [Align](#align)\n  - [HereDoc](#heredoc)\n  - [Pad](#pad)\n- [📦 Layout](#-layout)\n- [✔ Symbols](#-symbols)\n- [✔ Status](#-status)\n- [📑 License](#-license)\n\n\u003c/details\u003e\n\n---\n\n## 📦 ANSI Modules\n\n### 🎨 Colors\n\nThe colors package allows you to style text with colors.\n\n```go\nimport \"github.com/Shresht7/go-cli-tools/ansi/colors\"\n\nfmt.Println(colors.Red(\"Giant\"))\nfmt.Println(colors.BgWhite(\"Dwarf\"))\nfmt.Println(colors.RGB(\"Supernova\", 224, 65, 137))\n```\n\n\u003cdiv align=\"right\"\u003e\n\n  [⬆ Back to Top][top]\n\n\u003c/div\u003e\n\n### 💄 Styles\n\nThe styles package allows you to format your text.\n\n```go\nimport \"github.com/Shresht7/go-cli-tools/ansi/styles\"\n\nfmt.Println(styles.Bold(\"GO\"))\nfmt.Println(styles.Hidden(\"Secret\"))\n```\n\n\u003cdiv align=\"right\"\u003e\n\n  [⬆ Back to Top][top]\n\n\u003c/div\u003e\n\n### ☝ Cursor\n\nThe cursor package provides helper function for cursor manipulation.\n\n```go\nimport \"github.com/Shresht7/go-cli-tools/ansi/cursor\"\n\nfmt.Print(cursor.ToPos(15, 20))\nfmt.Print(cursor.Up(3))\nfmt.Print(cursor.ToNextLine(5))\n```\n\n\u003cdiv align=\"right\"\u003e\n\n  [⬆ Back to Top][top]\n\n\u003c/div\u003e\n\n### 🧼 Clear\n\nThe clear package provides helper functions to clear the terminal.\n\n```go\nimport \"github.com/Shresht7/go-cli-tools/ansi/clear\"\n\nfmt.Println(clear.EntireLine)\nfmt.Println(clear.Screen)\n```\n\n\u003cdiv align=\"right\"\u003e\n\n  [⬆ Back to Top][top]\n\n\u003c/div\u003e\n\n### 🅰 RegExp\n\nRegular expressions to capture ansi codes. The `Strip` helper function can remove all ansi escape codes from a string.\n\n```go\nimport \"github.com/Shresht7/go-cli-tools/ansi/codes\"\n\nvar text string = \"...\"\ntext = codes.Strip(text)\nfmt.Println(text)\n```\n\n\u003cdiv align=\"right\"\u003e\n\n  [⬆ Back to Top][top]\n\n\u003c/div\u003e\n\n---\n\n## 📚 Helpers\n\n### 🏭 Composition\n\nComposition helpers provide two utility functions compose and pipe that allow you to combine many ansi functions together.\n\n```go\nimport \"github.com/Shresht7/go-cli-tools/helpers\"\nimport \"github.com/Shresht7/go-cli-tools/ansi/colors\"\nimport \"github.com/Shresht7/go-cli-tools/ansi/styles\"\n\nstyler = helpers.Compose(colors.Blue, styles.Bold, colors.BgWhite)\ntext = styler(\"Function Composition!\")\n```\n\n\u003cdiv align=\"right\"\u003e\n\n  [⬆ Back to Top][top]\n\n\u003c/div\u003e\n\n---\n\n## 📃 Format\n\n### Align\n\nAlign text to the left, center or right.\n\n```go\nimport \"github.com/Shresht7/go-cli-tools/format\"\nvar text string = \"...\"\nfmt.Println(format.Align(text, \u0026format.AlignOptions{ Mode: \"Center\" }))\n```\n\n\u003cdiv align=\"right\"\u003e\n\n  [⬆ Back to Top][top]\n\n\u003c/div\u003e\n\n### HereDoc\n\nHereDoc is a helper function to create a multi-line string.\n\n```go\nimport \"github.com/Shresht7/go-cli-tools/format\"\nvar text string = format.HereDoc(`\n    This is a multi-line string\n    that can be used to create\n      a template.\n`)\n// Output:\n// This is a multi-line string\n// that can be used to create\n//  a template.\n```\n\n\u003cdiv align=\"right\"\u003e\n\n  [⬆ Back to Top][top]\n\n\u003c/div\u003e\n\n### Pad\n\nApply padding around the text.\n\n```go\nimport \"github.com/Shresht7/go-cli-tools/format\"\nvar text string = \"...\"\nfmt.Println(format.Pad(text, \" \", 5))\n```\n\n\u003cdiv align=\"right\"\u003e\n\n  [⬆ Back to Top][top]\n\n\u003c/div\u003e\n\n---\n\n## 📦 Layout\n\nCreate a table.\n\n```go\nimport \"github.com/Shresht7/go-cli-tools/layout\"\n\nvar data [][]string // ...\ntable := layout.NewTable(data)\nfmt.Println(table.String())\n```\n\n---\n\n## ✔ Symbols\n\nUnicode symbols for the terminal\n\n```\n✔ ℹ ⚠ ✖ ☰ ↑ ↓ ← → ♪ ♫ ■ ● ․ … › ▲ ▴ ▼ ▾ ◂ ▸ ⌂ ♥ ↔ ↕ ≈ ≠ ≤ ≥ ≡ ∞ ෴ ★ ▶ ⬢\n```\n\n```go\nimport \"github.com/Shresht7/go-cli-tools/symbols\"\n\nfmt.Println(symbols.Warning, \"Are you sure?\")\n//  ⚠ Are you sure?\n\nfmt.Println(symbols.Tick, \"Done\")\n//  ✔ Done\n\nfmt.Println(\"Controls: \", symbols.ArrowUp, symbols.ArrowDown, symbol.ArrowLeft, symbols.ArrowRight)\n//  Controls: ↑ ↓ ← →\n```\n\n\u003cdiv align=\"right\"\u003e\n\n  [⬆ Back to Top][top]\n\n\u003c/div\u003e\n\n\n## ✔ Status\n\nThe `status` package includes some commonly used symbols with color.\n\n\u003c!-- TODO: Status Symbols Screenshot --\u003e\n\n```go\nimport \"github.com/Shresht7/go-cli-tools/status\"\n\nfmt.Println(status.Tick, \"Done\")  //  ✔ Done\n```\n\n\u003cdiv align=\"right\"\u003e\n\n  [⬆ Back to Top][top]\n\n\u003c/div\u003e\n\n---\n\n## 📑 License\n\nThis project is licensed under the [MIT License](LICENSE) - see the [LICENSE](LICENSE) file for details.\n\n\u003c!-- ====== --\u003e\n\u003c!-- FOOTER --\u003e\n\u003c!-- ====== --\u003e\n\n[top]: #go-cli-tools\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshresht7%2Fgo-cli-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshresht7%2Fgo-cli-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshresht7%2Fgo-cli-tools/lists"}