[GH-ISSUE #7405] Feature request: Add CLI argument to specify a system prompt #51221

Open
opened 2026-04-28 18:56:46 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @Kerrick on GitHub (Oct 28, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/7405

I'd like to be able to set the system prompt from the call to ollama in my shell, rather than in the conversation. For example:

ollama run llama3.1 --system="Your nickname is 'Grass' now"

...or...

ollama run llama3.1 -s "system" "Your nickname is 'Grass' now"

With this ability, I could set up aliases in my shell profile so that I can run system-prompt-customized versions of a model with a single command.

alias grass="ollama run llama3.1 --system=\"Your nickname is 'Grass' now\""

It'd be even better if I could also specify a path to a text file with a system prompt (e.g. ollama run llama3.1 --system-file="~/system_prompts/grass.txt", but that wouldn't be necessary.

This is unique from #807, whose fix only works in the conversation.

Originally created by @Kerrick on GitHub (Oct 28, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/7405 I'd like to be able to set the system prompt from the call to `ollama` in my shell, rather than in the conversation. For example: ```sh ollama run llama3.1 --system="Your nickname is 'Grass' now" ``` ...or... ```sh ollama run llama3.1 -s "system" "Your nickname is 'Grass' now" ``` With this ability, I could set up aliases in my shell profile so that I can run system-prompt-customized versions of a model with a single command. ```sh alias grass="ollama run llama3.1 --system=\"Your nickname is 'Grass' now\"" ``` It'd be even better if I could also specify a path to a text file with a system prompt (e.g. `ollama run llama3.1 --system-file="~/system_prompts/grass.txt"`, but that wouldn't be necessary. This is unique from #807, whose fix only works in the conversation.
GiteaMirror added the feature request label 2026-04-28 18:56:46 -05:00
Author
Owner

@captaincurrie commented on GitHub (Oct 29, 2024):

There was a pull request for this many months ago, #3134

<!-- gh-comment-id:2445393227 --> @captaincurrie commented on GitHub (Oct 29, 2024): There was a pull request for this many months ago, #3134
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#51221