@@ -374,7 +374,40 @@ export const commands: CommandDefinition[] = [
374374 name : "search" ,
375375 aliases : [ "s" ] ,
376376 group : "Other" ,
377- help : [ { usage : "search <query>" , description : "Search Are.na" } ] ,
377+ help : [
378+ { usage : "search <query>" , description : "Search Are.na" } ,
379+ {
380+ usage : "search <query> --type Image" ,
381+ description :
382+ "Filter by type (Text, Image, Link, Attachment, Embed, Channel, Block, User, Group)" ,
383+ } ,
384+ {
385+ usage : "search <query> --scope my" ,
386+ description : "Limit scope (all, my, following)" ,
387+ } ,
388+ {
389+ usage : "search <query> --sort created_at_desc" ,
390+ description :
391+ "Sort order (score_desc, created_at_desc, created_at_asc, updated_at_desc, updated_at_asc, name_asc, name_desc, connections_count_desc, random)" ,
392+ } ,
393+ {
394+ usage : "search <query> --ext pdf" ,
395+ description : "Filter by file extension" ,
396+ } ,
397+ {
398+ usage : "search <query> --after 2024-01-01T00:00:00Z" ,
399+ description : "Only results updated after timestamp (ISO 8601)" ,
400+ } ,
401+ {
402+ usage : "search <query> --channel-id 789" ,
403+ description :
404+ "Limit to a channel (--user-id, --group-id also available)" ,
405+ } ,
406+ {
407+ usage : "search <query> --sort random --seed 42" ,
408+ description : "Reproducible random ordering" ,
409+ } ,
410+ ] ,
378411 session : { args : "<query>" , desc : "Search Are.na" } ,
379412 render ( args , flags ) {
380413 const query = requireArg ( [ args . join ( " " ) ] , 0 , "query" ) ;
@@ -384,6 +417,14 @@ export const commands: CommandDefinition[] = [
384417 page = { optPage ( flags ) }
385418 per = { optPer ( flags ) }
386419 type = { flag ( flags , "type" ) }
420+ sort = { flagAs < SearchSort > ( flags , "sort" ) }
421+ scope = { flagAs < SearchScope > ( flags , "scope" ) }
422+ ext = { flagAs < FileExtension > ( flags , "ext" ) }
423+ after = { flag ( flags , "after" ) }
424+ seed = { intFlag ( flags , "seed" ) }
425+ userId = { intFlag ( flags , "user-id" ) }
426+ groupId = { intFlag ( flags , "group-id" ) }
427+ channelId = { intFlag ( flags , "channel-id" ) }
387428 />
388429 ) ;
389430 } ,
0 commit comments