feat: support file paths for --system-prompt option

- Check if --system-prompt argument is a valid file path
- Load file contents if it exists, otherwise use as literal text
- Works in both interactive and single-shot modes
- Project context and datetime still appended automatically
- Document in README with examples
This commit is contained in:
Mario Zechner 2025-11-12 23:10:56 +01:00
parent 79ee33c3fc
commit a0fa254107
2 changed files with 46 additions and 3 deletions

View file

@ -251,8 +251,12 @@ Model ID. Default: `claude-sonnet-4-5`
**--api-key <key>**
API key (overrides environment variables)
**--system-prompt <text>**
Custom system prompt (overrides default coding assistant prompt)
**--system-prompt <text|file>**
Custom system prompt. Can be:
- Inline text: `--system-prompt "You are a helpful assistant"`
- File path: `--system-prompt ./my-prompt.txt`
If the argument is a valid file path, the file contents will be used as the system prompt. Otherwise, the text is used directly. Project context files and datetime are automatically appended.
**--mode <mode>**
Output mode for non-interactive usage. Options: