aws / aws/amazon-q-developer-cli

[Feature Request] Add CLI markdown rendering support using tools like glow

Open
#3,162 1 comment 0 reactions 0 assignees View on GitHub
😍 UX Feature request q chat
Dominant language
Rust
Stars
2k
Forks
439
PR merge metrics
No merged PRs in 30d

Description

### Checks

- [x] I have searched [github.com/aws/amazon-q-developer-cli/issues](https://github.com/aws/amazon-q-developer-cli/issues?q=) and there are no duplicates of my issue
- [x] I have run `q doctor` in the affected terminal session
- [x] I have run `q restart` and replicated the issue again

### Operating system

macOS 15.7.1 (24G231)

### Expected behaviour

Q CLI should be able to render markdown output using CLI markdown tools like glow, bat, or rich-cli for better formatted display of markdown responses

## Implementation Proposal: Configurable Markdown Display

### Configuration Settings
Add new settings to Q CLI's existing configuration system:

bash
q settings markdown.command "glow --pager=false --width=80 -"
q settings markdown.enabled true

### Available Configuration Options
- markdown.command - Full command to pipe markdown content to (e.g., "glow -", "bat --language=markdown -",
"pandoc -f markdown -t plain")
- markdown.enabled - Master toggle for markdown rendering

### CLI Flag Overrides
Allow temporary overrides via command flags:
bash
q chat --markdown-command "glow --style=dark -"
q chat --no-markdown

### Automatic Fallback Behavior
- If markdown.command tool is unavailable, automatically fall back to raw markdown
- Display warning message on CLI startup:
"Warning: Markdown renderer 'glow' not found, falling back to raw markdown"
- No additional configuration needed - fallback is built-in

### Priority Order
1. CLI flag --markdown-command (highest priority)
2. markdown.command setting with automatic fallback
3. Disabled if markdown.enabled=false

### Benefits
- Simple two-setting configuration
- Supports any user-specified markdown rendering tool
- Leverages existing Q settings infrastructure
- Automatic fallback with user notification
- Backward compatible with current behavior
- Per-session overrides via CLI flags

---

### Steps to reproduce

1. Ask Q CLI a question that generates markdown output
2. Notice the markdown syntax is displayed with minimal formatting provided by the CLI tool instead of fully formatted markdown
3. Compare with tools like glow that render markdown beautifully in terminal

### Environment

```yaml
[q-details]
version = "1.17.1"
hash = "b0ef39f91625c36c2ed6f065628e7165fae9012c"
date = "2025-09-30T22:01:25.726592Z (13d ago)"

[system-info]
os = "macOS 15.7.1 (24G231)"
chip = "Apple M1 Pro"
total-cores = 10
memory = "16.00 GB"

[environment]
cwd = "/Users/USER/Repos/mcp-servers/searxng-mcp"
cli-path = "/Users/USER/Repos/mcp-servers/searxng-mcp"
install-method = "unknown"

[env-vars]
PATH = "/Users/USER/Scripts:/Users/USER/.bun/bin:/Users/USER/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Applications/iTerm.app/Contents/Resources/utilities:/Users/USER/.local/bin:/opt/homebrew/bin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
QTERM_SESSION_ID = "18d7f2fdeb58411880b880816cce8cdf"
Q_SET_PARENT_CHECK = "1"
Q_TERM = "1.17.1"
Q_USING_ZSH_AUTOSUGGESTIONS = "1"
SHELL = "/bin/zsh"
TERM = "xterm-256color"
__CFBundleIdentifier = "com.googlecode.iterm2"

[chat-settings]

[chat-trusted_tools]
fs_read=trusted

[chat-failed_request_ids]
none

[chat-context]
current_profile=default
profile_context=
README.md
.amazonq/rules/**/*.md

files=
/Users/USER/Repos/mcp-servers/searxng-mcp/README.md, 190 tkns
total context size=190 tkns
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.