Skip to content

feat: add --prompt-file and --negative-prompt-file flags#1693

Open
grencez wants to merge 1 commit into
leejet:masterfrom
grencez:master
Open

feat: add --prompt-file and --negative-prompt-file flags#1693
grencez wants to merge 1 commit into
leejet:masterfrom
grencez:master

Conversation

@grencez

@grencez grencez commented Jun 22, 2026

Copy link
Copy Markdown

as an alternative to passing long strings to the --prompt and --negative-prompt flags.

Summary

What: Provide alternative flags that populate the prompt and negative_prompt variables from file content.
Why: Putting the prompts in files makes them easier to edit and leak less info on a multi-user system.

Granted, there are other ways to accomplish those goals, but I found this to be the best for my use case. I've been maintaining a patch locally for ~2 months now.

Related Issue / Discussion

#1199 was filed by someone else near the start of the year, so I'm probably not the only one who wants this feature.

Additional Information

I tested manually with good cases:

  • file exists
  • /dev/stdin

I also tested some error cases to make sure it doesn't crash or silently succeed:

  • file not found
  • no read permission
  • broken symlink
  • directory instead of file

Checklist

as an alternative to passing long strings
to the --prompt and --negative-prompt flags.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant