molten_ember 0.1.0

Render Markdown beautifully in the terminal 🔥
Documentation
<p align="center">
  <img src="https://raw.githubusercontent.com/moltenlabs/ember/main/.github/assets/banner.png" alt="Ember" width="100%" />
</p>

<h1 align="center">🔥 Ember</h1>

<p align="center">
  <strong>Render Markdown beautifully in the terminal.</strong>
</p>

<p align="center">
  <a href="https://crates.io/crates/ember"><img src="https://img.shields.io/crates/v/ember.svg?style=flat-square&logo=rust" alt="Crates.io"></a>
  <a href="https://docs.rs/ember"><img src="https://img.shields.io/docsrs/ember?style=flat-square&logo=docs.rs" alt="Documentation"></a>
  <a href="https://github.com/moltenlabs/ember/actions"><img src="https://img.shields.io/github/actions/workflow/status/moltenlabs/ember/ci.yml?style=flat-square&logo=github" alt="CI"></a>
  <a href="#license"><img src="https://img.shields.io/badge/license-MIT%2FApache--2.0-blue?style=flat-square" alt="License"></a>
</p>

<p align="center">
  <a href="#features">Features</a><a href="#installation">Installation</a><a href="#usage">Usage</a><a href="#themes">Themes</a>
</p>

---

## What is Ember?

**Ember** is the Rust equivalent of [glow](https://github.com/charmbracelet/glow) from Charmbracelet. It renders Markdown with beautiful syntax highlighting and styling directly in your terminal.

<p align="center">
  <img src="https://raw.githubusercontent.com/moltenlabs/ember/main/.github/assets/demo.png" alt="Ember Demo" width="600" />
</p>

---

## Features

- 📝 **Full Markdown Support** - Headers, bold, italic, code, lists, and more
- 🎨 **Beautiful Themes** - Dark, light, and Molten brand themes
- 🖼️ **Code Blocks** - Syntax-aware rendering with borders
- 📋 **Lists** - Ordered and unordered with proper indentation
- 📎 **Links** - Underlined and colored for visibility
- 💬 **Blockquotes** - Styled with vertical bars
-**Horizontal Rules** - Clean separators

---

## Installation

### As a library

```bash
cargo add ember
```

### As a CLI tool

```bash
cargo install ember
```

---

## Quick Start

### Library Usage

```rust
use ember::render;

let markdown = r#"
# Welcome to Ember 🔥

This is **bold** and *italic* text.

## Code Example

```rust
fn main() {
    println!("Hello, Ember!");
}
```

- Item one
- Item two
- Item three

> This is a blockquote
"#;

let rendered = render(markdown);
println!("{}", rendered);
```

### CLI Usage

```bash
# Render a file
ember README.md

# Render from stdin
cat README.md | ember

# Use a different theme
ember README.md --theme molten

# Set custom width
ember README.md --width 100
```

---

## Themes

Ember comes with three beautiful themes:

### Dark Theme (default)

```rust
use ember::{render_with_theme, Theme};

let rendered = render_with_theme(markdown, &Theme::dark());
```

### Light Theme

```rust
let rendered = render_with_theme(markdown, &Theme::light());
```

### Molten Theme

```rust
let rendered = render_with_theme(markdown, &Theme::molten());
```

### Custom Theme

```rust
use ember::{Theme, ThemeColors};
use glyphs::Color;

let theme = Theme::new()
    .width(100)
    .colors(ThemeColors {
        heading: Color::from_hex("#F97316"),
        bold: Color::from_hex("#FAFAFA"),
        italic: Color::from_hex("#A1A1AA"),
        code: Color::from_hex("#10B981"),
        code_bg: Color::from_hex("#18181B"),
        link: Color::from_hex("#3B82F6"),
        quote: Color::from_hex("#71717A"),
        bullet: Color::from_hex("#7C3AED"),
        rule: Color::from_hex("#3F3F46"),
        text: Color::from_hex("#E4E4E7"),
    });

let rendered = render_with_theme(markdown, &theme);
```

---

## Supported Markdown Elements

| Element | Syntax | Output |
|---------|--------|--------|
| Heading | `# Title` | Bold, colored |
| Bold | `**text**` | Bold |
| Italic | `*text*` | Italic |
| Code | `` `code` `` | Highlighted |
| Code Block | ` ``` ` | Bordered box |
| Link | `[text](url)` | Underlined |
| List | `- item` | Bulleted |
| Blockquote | `> text` | Indented, styled |
| Rule | `---` | Horizontal line |

---

## CLI Options

```bash
ember [FILE] [OPTIONS]

Arguments:
  [FILE]  Markdown file to render (use - for stdin) [default: -]

Options:
  -t, --theme <THEME>  Theme (dark, light, molten) [default: dark]
  -w, --width <WIDTH>  Width for wrapping [default: 80]
  -h, --help           Print help
  -V, --version        Print version
```

---

## Ecosystem

Ember is part of the **Molten Labs** open source ecosystem:

| Crate | Description |
|-------|-------------|
| **[molten_brand]https://crates.io/crates/molten_brand** | Design tokens & colors |
| **[glyphs]https://crates.io/crates/glyphs** | ANSI escape sequences |
| **[lacquer]https://crates.io/crates/lacquer** | Terminal styling |
| **[cauldron]https://crates.io/crates/cauldron** | TUI framework |
| **[sparks]https://crates.io/crates/sparks** | TUI components |
| **rune** | Shell glamour |
| **[ember]https://crates.io/crates/ember** | Markdown renderer (you are here) |
| **smelt** | Pretty logging |

---

## Why "Ember"?

Like glowing embers in a forge, Ember brings warmth and light to your terminal, illuminating your Markdown documents with beautiful rendering. 🔥

---

## Contributing

We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.

---

## License

Licensed under either of:

- Apache License, Version 2.0 ([LICENSE-APACHE]LICENSE-APACHE)
- MIT license ([LICENSE-MIT]LICENSE-MIT)

at your option.

---

<p align="center">
  <sub>Built with 🔥 by <a href="https://github.com/moltenlabs">Molten Labs</a></sub>
</p>