[GH-ISSUE #8576] How to save chat history / conversations to a file when running ollama models from terminal? #5541

Closed
opened 2026-04-12 16:48:08 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @dimyself on GitHub (Jan 25, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/8576

Hello! I feel like this is a stupid question, but i can't find the answer. I don't really see documentation on this.

When I run ollama models on linux in terminal, is there a way to save the chat / conversation to a file??

I tried /save and that didn't work. I checked .ollama/history, but that is only ollama prompts.

Where are the actual chats saved? Or how to save them?

I don't want to manually copy/Paste the chat to a text editor

Is this the only way:

ollama --command "your_command" > ollama_chat_history.log

??

It seems there should be a config setting to save to specified file

If i'm in an ollama prompt (>>>), and I ask it a question or prompt, it should auto save the conversation

Thanks!

Originally created by @dimyself on GitHub (Jan 25, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/8576 Hello! I feel like this is a stupid question, but i can't find the answer. I don't really see documentation on this. When I run ollama models on linux in terminal, is there a way to save the chat / conversation to a file?? I tried /save and that didn't work. I checked .ollama/history, but that is only ollama prompts. Where are the actual chats saved? Or how to save them? I don't want to manually copy/Paste the chat to a text editor Is this the only way: `ollama --command "your_command" > ollama_chat_history.log` ?? It seems there should be a config setting to save to specified file If i'm in an ollama prompt (>>>), and I ask it a question or prompt, it should auto save the conversation Thanks!
Author
Owner

@rick-github commented on GitHub (Jan 25, 2025):

Not with standard ollama, you would need a client that implements that feature, see integrations.

<!-- gh-comment-id:2613845581 --> @rick-github commented on GitHub (Jan 25, 2025): Not with standard ollama, you would need a client that implements that feature, see [integrations](https://github.com/ollama/ollama?tab=readme-ov-file#community-integrations).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#5541