[GH-ISSUE #1056] Improved output formatting #47030

Open
opened 2026-04-28 02:48:11 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @luceat-lux-vestra on GitHub (Nov 9, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/1056

https://github.com/charmbracelet/glow
I can use this as markdown formatter for seperated questions like

ollama run phind-codellama 'show me basic python example' | glow
ollama run phind-codellama 'another questions' | glow

I can get rendered output.

But it seems doesn't remember what we said, the context.

I want to set glow default output formatter for answers. like...

ollama set formatter --glow
ollama run phind-codellama

-> get formatted output in conversation by default.

Originally created by @luceat-lux-vestra on GitHub (Nov 9, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/1056 https://github.com/charmbracelet/glow I can use this as markdown formatter for seperated questions like `ollama run phind-codellama 'show me basic python example' | glow` `ollama run phind-codellama 'another questions' | glow` I can get rendered output. But it seems doesn't remember what we said, the context. I want to set glow default output formatter for answers. like... `ollama set formatter --glow` `ollama run phind-codellama ` -> get formatted output in conversation by default.
GiteaMirror added the feature request label 2026-04-28 02:48:11 -05:00
Author
Owner

@mxyng commented on GitHub (Nov 10, 2023):

Ollama cli reads stdin as the prompt, delimited by a new line. You can achieve the desired behaviour with something like this:

cat <<EOF | ollama run phind-codellama | glow
show me basic python example
another questions
EOF

This maintains the history since ollama interprets it as a single session. History is not persisted across sessions.

<!-- gh-comment-id:1805966115 --> @mxyng commented on GitHub (Nov 10, 2023): Ollama cli reads stdin as the prompt, delimited by a new line. You can achieve the desired behaviour with something like this: ``` cat <<EOF | ollama run phind-codellama | glow show me basic python example another questions EOF ``` This maintains the history since ollama interprets it as a single session. History is not persisted across sessions.
Author
Owner

@luceat-lux-vestra commented on GitHub (Nov 14, 2023):

It seems work, but not convenient as I thought.

<!-- gh-comment-id:1810126881 --> @luceat-lux-vestra commented on GitHub (Nov 14, 2023): It seems work, but not convenient as I thought.
Author
Owner

@jmorganca commented on GitHub (Nov 30, 2023):

Hi @luceat-lux-vestra thanks for the issue. I've repurposed this issue in sorts as an enhancement to improve the output formatting. Recently word wrap was added and there's quite a bit more we can do!

As for keeping the context, the easiest as of a recent change would most likely be to save it to a file and re-pipe it back in as a previous talking point:

ollama run codellama "show me basic python code" | ollama run codellama "what's wrong with this code?" | glow 
<!-- gh-comment-id:1833073318 --> @jmorganca commented on GitHub (Nov 30, 2023): Hi @luceat-lux-vestra thanks for the issue. I've repurposed this issue in sorts as an enhancement to improve the output formatting. Recently word wrap was added and there's quite a bit more we can do! As for keeping the context, the easiest as of a recent change would most likely be to save it to a file and re-pipe it back in as a previous talking point: ``` ollama run codellama "show me basic python code" | ollama run codellama "what's wrong with this code?" | glow ```
Author
Owner

@lukzmu commented on GitHub (Aug 28, 2025):

Since this is still open, do we have any timeline or maybe there is another solution by now?

<!-- gh-comment-id:3233553279 --> @lukzmu commented on GitHub (Aug 28, 2025): Since this is still `open`, do we have any timeline or maybe there is another solution by now?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#47030