You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enrich command and flag descriptions for AI agent consumption
Merge the detailed flag descriptions from PR #15 (max lengths, type format
hints, behavioral details, category explanations) with the examples and
Long descriptions from the search_by_contract work. Every Short, Long,
and flag help string is now maximally descriptive so AI agents can
select the right commands and flags without ambiguity.
Copy file name to clipboardExpand all lines: cmd/query/run.go
+13-10Lines changed: 13 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -13,24 +13,27 @@ import (
13
13
funcnewRunCmd() *cobra.Command {
14
14
cmd:=&cobra.Command{
15
15
Use: "run <query-id>",
16
-
Short: "Execute a saved query and display results",
17
-
Long: "Execute a saved DuneSQL query by its numeric ID and display results.\n\n"+
18
-
"By default, polls every 5 seconds for up to ~5 minutes waiting for completion.\n"+
19
-
"Use --no-wait to submit the execution and exit immediately; then fetch\n"+
20
-
"results later with 'dune execution results <execution-id>'.\n\n"+
16
+
Short: "Execute a saved Dune query by its ID and display results",
17
+
Long: "Execute a saved Dune query by its numeric ID. By default, waits for the\n"+
18
+
"execution to complete (polling every 2 seconds) and displays the result rows.\n"+
19
+
"Use --no-wait to submit the execution and exit immediately with just the\n"+
20
+
"execution ID; then fetch results later with 'dune execution results <execution-id>'.\n\n"+
21
+
"Credits are consumed based on actual compute resources used. Use --performance\n"+
22
+
"to select the engine size (medium or large).\n\n"+
21
23
"Examples:\n"+
22
24
" dune query run 12345\n"+
23
25
" dune query run 12345 --param wallet=0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 --param days=30\n"+
24
26
" dune query run 12345 --performance large --limit 100\n"+
25
-
" dune query run 12345 --no-wait",
27
+
" dune query run 12345 --no-wait\n"+
28
+
" dune query run 12345 --timeout 600",
26
29
Args: cobra.ExactArgs(1),
27
30
RunE: runRun,
28
31
}
29
32
30
-
cmd.Flags().StringArray("param", nil, "query parameter in key=value format (repeatable)")
31
-
cmd.Flags().String("performance", "medium", `performance tier: "medium" (default) or "large" for higher compute resources`)
32
-
cmd.Flags().Int("limit", 0, "maximum number of rows to display (0 = all)")
33
-
cmd.Flags().Bool("no-wait", false, "submit execution and exit without waiting for results")
33
+
cmd.Flags().StringArray("param", nil, "typed query parameter in key=value format (repeatable); numbers are stringified, datetimes use YYYY-MM-DD HH:mm:ss")
34
+
cmd.Flags().String("performance", "medium", `engine size for the execution: "medium" (default) or "large"; credits are consumed based on actual compute resources used`)
35
+
cmd.Flags().Int("limit", 0, "maximum number of result rows to return (0 = all available rows)")
36
+
cmd.Flags().Bool("no-wait", false, "submit the execution and exit immediately, printing only the execution ID and state")
34
37
cmd.Flags().Int("timeout", 300, "maximum seconds to wait for the execution to complete before timing out")
cmd.Flags().String("sql", "", "DuneSQL query to execute (required)")
28
+
cmd.Flags().String("sql", "", "the SQL query text in DuneSQL dialect (required)")
27
29
_=cmd.MarkFlagRequired("sql")
28
-
cmd.Flags().StringArray("param", nil, "query parameter in key=value format (repeatable)")
29
-
cmd.Flags().String("performance", "medium", `performance tier: "medium" (default) or "large" for higher compute resources`)
30
-
cmd.Flags().Int("limit", 0, "maximum number of rows to display (0 = all)")
31
-
cmd.Flags().Bool("no-wait", false, "submit execution and exit without waiting for results")
30
+
cmd.Flags().StringArray("param", nil, "typed query parameter in key=value format (repeatable); numbers are stringified, datetimes use YYYY-MM-DD HH:mm:ss")
31
+
cmd.Flags().String("performance", "medium", `engine size for the execution: "medium" (default) or "large"; credits are consumed based on actual compute resources used`)
32
+
cmd.Flags().Int("limit", 0, "maximum number of result rows to return (0 = all available rows)")
33
+
cmd.Flags().Bool("no-wait", false, "submit the execution and exit immediately, printing only the execution ID and state")
32
34
cmd.Flags().Int("timeout", 300, "maximum seconds to wait for the execution to complete before timing out")
0 commit comments