Skip to content

Commit e854000

Browse files
committed
feat: add --system argument to cli
1 parent 7268028 commit e854000

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

crates/rullm-cli/src/args.rs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,6 @@ pub struct Cli {
124124
#[command(subcommand)]
125125
pub command: Option<Commands>,
126126

127-
/// The user query/prompt
128-
#[arg(value_name = "QUERY")]
129-
pub query: Option<String>,
130-
131127
/// Model to use in format: provider/model-name (e.g., openai/gpt-4, gemini/gemini-pro, anthropic/claude-3-sonnet)
132128
#[arg(short, long, add = ArgValueCompleter::new(model_completer))]
133129
pub model: Option<String>,
@@ -141,7 +137,7 @@ pub struct Cli {
141137
pub option: Vec<(String, String)>,
142138

143139
/// Verbose output
144-
#[arg(short, long, global = true)]
140+
#[arg(long, global = true)]
145141
pub verbose: bool,
146142

147143
/// Quiet output (only show errors)
@@ -151,6 +147,14 @@ pub struct Cli {
151147
/// Disable streaming output (stream tokens by default)
152148
#[arg(long, global = true)]
153149
pub no_streaming: bool,
150+
151+
/// System prompt
152+
#[arg(long, global = true)]
153+
pub system: Option<String>,
154+
155+
/// The user query/prompt
156+
#[arg(value_name = "QUERY")]
157+
pub query: Option<String>,
154158
}
155159

156160
pub struct Models {

crates/rullm-cli/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ pub async fn run() -> Result<()> {
9494
let (system_prompt, final_query) = if let Some(template_name) = &cli.template {
9595
resolve_template_prompts(template_name, query, &cli_config.config_base_path)?
9696
} else {
97-
(None, query.clone())
97+
(cli.system, query.clone())
9898
};
9999

100100
commands::run_single_query(

0 commit comments

Comments
 (0)