{"id":26568183,"url":"https://github.com/hougesen/terminal_link","last_synced_at":"2025-10-13T05:16:16.663Z","repository":{"id":283407019,"uuid":"951339255","full_name":"hougesen/terminal_link","owner":"hougesen","description":"Easily create clickable terminal hyperlinks in Gleam programs","archived":false,"fork":false,"pushed_at":"2025-03-20T04:30:51.000Z","size":10,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-11T20:03:51.035Z","etag":null,"topics":["cli","gleam","terminal"],"latest_commit_sha":null,"homepage":"https://hex.pm/packages/terminal_link","language":"Gleam","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/hougesen.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2025-03-19T14:23:57.000Z","updated_at":"2025-07-05T23:11:21.000Z","dependencies_parsed_at":"2025-03-21T04:32:54.449Z","dependency_job_id":null,"html_url":"https://github.com/hougesen/terminal_link","commit_stats":null,"previous_names":["hougesen/terminal_link"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/hougesen/terminal_link","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hougesen%2Fterminal_link","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hougesen%2Fterminal_link/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hougesen%2Fterminal_link/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hougesen%2Fterminal_link/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hougesen","download_url":"https://codeload.github.com/hougesen/terminal_link/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hougesen%2Fterminal_link/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279013695,"owners_count":26085390,"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-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":["cli","gleam","terminal"],"created_at":"2025-03-22T19:31:52.152Z","updated_at":"2025-10-13T05:16:16.617Z","avatar_url":"https://github.com/hougesen.png","language":"Gleam","funding_links":[],"categories":[],"sub_categories":[],"readme":"# terminal_link\n\n[![Package Version](https://img.shields.io/hexpm/v/terminal_link)](https://hex.pm/packages/terminal_link)\n[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/terminal_link/)\n\nEasily create clickable terminal hyperlinks in Gleam programs.\n\n`terminal_link` is a loose port of [https://github.com/mainrs/terminal-link-rs](https://github.com/mainrs/terminal-link-rs) and [https://github.com/zkat/supports-hyperlinks](https://github.com/zkat/supports-hyperlinks) to Gleam.\n\n```bash\ngleam add terminal_link\n```\n\n## Printing a hyperlink to terminal\n\n```gleam\nimport gleam/io\nimport gleam/option.{type Option, None}\nimport terminal_link.{\n  TerminalLink, terminal_link_to_string, terminal_supports_links,\n}\n\nfn main() {\n  let destination = \"https://github.com/hougesen\"\n  let text = \"github.com/hougesen\"\n  let id: Option(String) = None\n\n  let link = TerminalLink(destination, text, id)\n\n  io.println(terminal_link_to_string(link))\n}\n```\n\n## Validating a terminal supports terminal links\n\n```gleam\nimport gleam/io\nimport gleam/option.{None}\nimport terminal_link.{TerminalLink, terminal_link_to_string}\n\nfn main() {\n  let destination = \"https://github.com/hougesen\"\n\n  let link = TerminalLink(destination, \"github.com/hougesen\", None)\n\n  case terminal_supports_links() {\n    // Print the clickable link if the terminal supports it\n    True -\u003e io.println(terminal_link_to_string(link))\n    // Or use the full link as fallback\n    False -\u003e io.println(destination)\n  }\n}\n```\n\nFurther documentation can be found at \u003chttps://hexdocs.pm/terminal_link\u003e.\n\n## Development\n\n```bash\n# Run the project\ngleam run\n\n# Run the tests\ngleam test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhougesen%2Fterminal_link","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhougesen%2Fterminal_link","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhougesen%2Fterminal_link/lists"}