cmdutil

package
v0.1.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2026 License: MIT Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallTool added in v0.1.21

func CallTool(cmd *cobra.Command, tool string, args map[string]any, view any) (json.RawMessage, error)

CallTool calls a Dune MCP tool and, when view is not nil, decodes the result into it. It returns the result as the tool sent it, for JSON output.

func ClientFromCmd

func ClientFromCmd(cmd *cobra.Command) dune.DuneClient

ClientFromCmd extracts the DuneClient stored in the command's context.

func FileFlag added in v0.1.21

func FileFlag(cmd *cobra.Command, name string) ([]byte, error)

FileFlag returns the value of a string flag. A value that starts with @ names a file to read the value from, and @- reads standard input.

func JSONFlag added in v0.1.21

func JSONFlag(cmd *cobra.Command, name string, v any) error

JSONFlag decodes a flag that holds JSON, read as FileFlag reads it.

func MCPFromCmd added in v0.1.21

func MCPFromCmd(cmd *cobra.Command) dunemcp.Caller

MCPFromCmd extracts the Dune MCP caller stored in the command's context.

func SetClient

func SetClient(cmd *cobra.Command, client dune.DuneClient)

SetClient stores a DuneClient in the command's context.

func SetMCP added in v0.1.21

func SetMCP(cmd *cobra.Command, c dunemcp.Caller)

SetMCP stores a Dune MCP caller in the command's context.

func SetStartTime added in v0.1.1

func SetStartTime(cmd *cobra.Command, t time.Time)

SetStartTime stores the command start time in the command's context.

func SetTracker added in v0.1.1

func SetTracker(cmd *cobra.Command, t *tracking.Tracker)

SetTracker stores a Tracker in the command's context.

func StartTimeFromCmd added in v0.1.1

func StartTimeFromCmd(cmd *cobra.Command) time.Time

StartTimeFromCmd extracts the command start time from the command's context.

func ToolArgs added in v0.1.21

func ToolArgs(cmd *cobra.Command, names map[string]string) map[string]any

ToolArgs returns Dune MCP tool arguments for the flags the user set, so the server applies its own defaults to the rest. names maps flag names to the argument each one fills.

func TrackerFromCmd added in v0.1.1

func TrackerFromCmd(cmd *cobra.Command) *tracking.Tracker

TrackerFromCmd extracts the Tracker stored in the command's context.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL