Write gorgeous command-line tools with glamour!
glamour
lets you use markdown
templates to render user-friendly & stylish output on ANSI
compatible terminals.
import "github.com/charmbracelet/glamour"
in := `# Hello World
This is a simple example of glamour!
Check out the [other examples](https://github.com/charmbracelet/glamour/tree/master/examples).
Bye!
`
out, _ := glamour.Render(in, "dark")
fmt.Print(out)
import "github.com/charmbracelet/glamour"
r, _ := glamour.NewTermRenderer(
glamour.WithStandardStyle("dark"),
glamour.WithWordWrap(40),
)
out, _ := r.Render(in)
fmt.Print(out)
Check out Glow, a markdown renderer for
the command-line, which uses glamour
.