@@ -38,6 +38,10 @@ export interface PullOptions {
3838 quiet ?: boolean ;
3939 /** Model override in provider/model format (e.g., "anthropic/claude-sonnet-4-20250514") */
4040 model ?: string ;
41+ /** Skip confirmation prompts (auto-accept remote references) */
42+ skipConfirm ?: boolean ;
43+ /** Progress callback for external spinner updates */
44+ onProgress ?: ( message : string ) => void ;
4145}
4246
4347export interface PullResult {
@@ -131,13 +135,22 @@ export async function pullHandler(options: PullOptions): Promise<PullResult> {
131135 force = false ,
132136 verbose = false ,
133137 quiet = false ,
138+ skipConfirm = false ,
139+ onProgress,
134140 } = options ;
135141 const referenceName = options . reference ?. trim ( ) || undefined ;
136142 const { provider, model } = parseModelFlag ( options . model ) ;
137143 const config = loadConfig ( ) ;
138144 const isReferenceOverride = Boolean ( referenceName ) ;
139145
140- const s = createSpinner ( { silent : quiet } ) ;
146+ // If onProgress is provided, use a callback-based spinner that updates in place
147+ const s = onProgress
148+ ? {
149+ start : ( msg ?: string ) => onProgress ( msg ?? "" ) ,
150+ stop : ( _msg ?: string ) => { } ,
151+ message : ( msg : string ) => onProgress ( msg ) ,
152+ }
153+ : createSpinner ( { silent : quiet } ) ;
141154
142155 // Helper to conditionally log
143156 const log = quiet ? ( ) => { } : ( msg : string ) => p . log . info ( msg ) ;
@@ -266,9 +279,9 @@ export async function pullHandler(options: PullOptions): Promise<PullResult> {
266279 : `https://offworld.sh/${ source . fullName } ` ;
267280 log ( `Preview: ${ previewUrl } ` ) ;
268281
269- // In quiet mode, auto-accept remote references
282+ // In quiet mode or skipConfirm , auto-accept remote references
270283 let useRemote = true ;
271- if ( ! quiet ) {
284+ if ( ! quiet && ! skipConfirm ) {
272285 const confirmResult = await p . confirm ( {
273286 message : "Download this reference from offworld.sh?" ,
274287 initialValue : true ,
0 commit comments