{"id":13467667,"url":"https://github.com/charmbracelet/glamour","last_synced_at":"2025-05-14T07:07:48.656Z","repository":{"id":40611033,"uuid":"228939052","full_name":"charmbracelet/glamour","owner":"charmbracelet","description":"Stylesheet-based markdown rendering for your CLI apps 💇🏻‍♀️","archived":false,"fork":false,"pushed_at":"2025-05-05T09:39:59.000Z","size":6852,"stargazers_count":2763,"open_issues_count":87,"forks_count":203,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-05-07T06:59:48.573Z","etag":null,"topics":["cli","go","golang","hacktoberfest","markdown","tui"],"latest_commit_sha":null,"homepage":"","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/charmbracelet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-12-18T23:36:15.000Z","updated_at":"2025-05-05T09:39:55.000Z","dependencies_parsed_at":"2023-09-28T18:13:10.581Z","dependency_job_id":"900be429-214a-45c2-abb6-5a980f8eba92","html_url":"https://github.com/charmbracelet/glamour","commit_stats":{"total_commits":390,"total_committers":26,"mean_commits":15.0,"dds":"0.23589743589743595","last_synced_commit":"1b955add54bc14cf5b0d7459e7bccacce6e35add"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charmbracelet%2Fglamour","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charmbracelet%2Fglamour/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charmbracelet%2Fglamour/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charmbracelet%2Fglamour/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/charmbracelet","download_url":"https://codeload.github.com/charmbracelet/glamour/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254092648,"owners_count":22013290,"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":["cli","go","golang","hacktoberfest","markdown","tui"],"created_at":"2024-07-31T15:00:59.086Z","updated_at":"2025-05-14T07:07:48.607Z","avatar_url":"https://github.com/charmbracelet.png","language":"Go","funding_links":[],"categories":["开源类库","Go","CLI frameworks","Open source library","golang","Styling \u0026 Output","Programming","Repositories","cli"],"sub_categories":["文本处理","Word Processing","Golang"],"readme":"# Glamour\n\n\u003cp\u003e\n    \u003cimg src=\"https://github.com/user-attachments/assets/23aabf2a-8bd8-4e7b-bb50-993bce32541d\" width=\"300\" alt=\"Glamour Title Treatment\"\u003e\u003cbr\u003e\n    \u003ca href=\"https://github.com/charmbracelet/glamour/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/release/charmbracelet/glamour.svg\" alt=\"Latest Release\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://pkg.go.dev/github.com/charmbracelet/glamour?tab=doc\"\u003e\u003cimg src=\"https://godoc.org/github.com/golang/gddo?status.svg\" alt=\"GoDoc\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/charmbracelet/glamour/actions\"\u003e\u003cimg src=\"https://github.com/charmbracelet/glamour/workflows/build/badge.svg\" alt=\"Build Status\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://coveralls.io/github/charmbracelet/glamour?branch=master\"\u003e\u003cimg src=\"https://coveralls.io/repos/github/charmbracelet/glamour/badge.svg?branch=master\" alt=\"Coverage Status\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://goreportcard.com/report/charmbracelet/glamour\"\u003e\u003cimg src=\"https://goreportcard.com/badge/charmbracelet/glamour\" alt=\"Go ReportCard\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nStylesheet-based markdown rendering for your CLI apps.\n\n\u003cimg width=\"845\" src=\"https://github.com/user-attachments/assets/ec2ead40-c467-48cc-b6a8-f0f13709eeab\" alt=\"Glamour example\"\u003e\n\n`glamour` lets you render [markdown](https://en.wikipedia.org/wiki/Markdown)\ndocuments \u0026 templates on [ANSI](https://en.wikipedia.org/wiki/ANSI_escape_code)\ncompatible terminals. You can create your own stylesheet or simply use one of\nthe stylish defaults.\n\n## Usage\n\n```go\nimport \"github.com/charmbracelet/glamour\"\n\nin := `# Hello World\n\nThis is a simple example of Markdown rendering with Glamour!\nCheck out the [other examples](https://github.com/charmbracelet/glamour/tree/master/examples) too.\n\nBye!\n`\n\nout, err := glamour.Render(in, \"dark\")\nfmt.Print(out)\n```\n\n\u003cimg src=\"https://github.com/charmbracelet/glamour/raw/master/examples/helloworld/helloworld.png\" width=\"600\" alt=\"Hello World example\"\u003e\n\n### Custom Renderer\n\n```go\nimport \"github.com/charmbracelet/glamour\"\n\nr, _ := glamour.NewTermRenderer(\n    // detect background color and pick either the default dark or light theme\n    glamour.WithAutoStyle(),\n    // wrap output at specific width (default is 80)\n    glamour.WithWordWrap(40),\n)\n\nout, err := r.Render(in)\nfmt.Print(out)\n```\n\n## Styles\n\nYou can find all available default styles in our [gallery](https://github.com/charmbracelet/glamour/tree/master/styles/gallery).\nWant to create your own style? [Learn how!](https://github.com/charmbracelet/glamour/tree/master/styles)\n\nThere are a few options for using a custom style:\n\n1. Call `glamour.Render(inputText, \"desiredStyle\")`\n1. Set the `GLAMOUR_STYLE` environment variable to your desired default style or a file location for a style and call `glamour.RenderWithEnvironmentConfig(inputText)`\n1. Set the `GLAMOUR_STYLE` environment variable and pass `glamour.WithEnvironmentConfig()` to your custom renderer\n\n## Glamourous Projects\n\nCheck out these projects, which use `glamour`:\n\n- [Glow](https://github.com/charmbracelet/glow), a markdown renderer for\n  the command-line.\n- [GitHub CLI](https://github.com/cli/cli), GitHub’s official command line tool.\n- [GitLab CLI](https://gitlab.com/gitlab-org/cli), GitLab's official command line tool.\n- [Gitea CLI](https://gitea.com/gitea/tea), Gitea's official command line tool.\n- [Meteor](https://github.com/odpf/meteor), an easy-to-use, plugin-driven metadata collection framework.\n\n## Feedback\n\nWe’d love to hear your thoughts on this project. Feel free to drop us a note!\n\n- [Twitter](https://twitter.com/charmcli)\n- [The Fediverse](https://mastodon.social/@charmcli)\n- [Discord](https://charm.sh/chat)\n\n## License\n\n[MIT](https://github.com/charmbracelet/glamour/raw/master/LICENSE)\n\n---\n\nPart of [Charm](https://charm.sh).\n\n\u003ca href=\"https://charm.sh/\"\u003e\u003cimg alt=\"The Charm logo\" src=\"https://stuff.charm.sh/charm-badge.jpg\" width=\"400\"\u003e\u003c/a\u003e\n\nCharm热爱开源 • Charm loves open source\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharmbracelet%2Fglamour","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcharmbracelet%2Fglamour","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharmbracelet%2Fglamour/lists"}