Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cat = CatTool{ Name: "cat", Description: "Display the contents of a file. Uses the linux command 'cat'.", Inputs: &pub_models.InputSchema{ Type: "object", Properties: map[string]pub_models.ParameterObject{ "file": { Type: "string", Description: "The file to display the contents of.", }, "number": { Type: "boolean", Description: "Number all output lines.", }, "showEnds": { Type: "boolean", Description: "Display $ at end of each line.", }, "squeezeBlank": { Type: "boolean", Description: "Suppress repeated empty output lines.", }, }, Required: []string{"file"}, }, }
View Source
var (
// Since the user called clai, we assume it's on path. If not, a bit of trouble
ClaiBinaryPath = "clai"
)
View Source
var ClaiCheck = &claiCheckTool{}
ClaiCheck - Check status
View Source
var ClaiHelp = &claiHelpTool{}
ClaiHelp - Run `clai help`
View Source
var ClaiResult = &claiResultTool{}
ClaiResult - Get result
View Source
var ClaiRun = &claiRunTool{}
ClaiRun - Spawn clai subprocess
View Source
var ClaiWaitForWorkers = &claiWaitForWorkersTool{}
ClaiWaitForWorkers waits for all current clai workers to finish. On timeout, it sends an interrupt signal to all running subprocesses. On success, it returns a tool response containing the output for each worker.
View Source
var Date = DateTool{ Name: "date", Description: "Get or format the current date and time. Wraps the linux 'date' command and is optimized for agentic workloads.", Inputs: &pub_models.InputSchema{ Type: "object", Required: make([]string, 0), Properties: map[string]pub_models.ParameterObject{ "format": { Type: "string", Description: "Optional format string passed to 'date +FORMAT'. Common example: '%Y-%m-%d %H:%M:%S'. If omitted, uses system default format.", }, "utc": { Type: "boolean", Description: "If true, returns time in UTC (equivalent to 'TZ=UTC date').", }, "rfc3339": { Type: "boolean", Description: "If true, returns time in RFC3339 format (e.g. 2006-01-02T15:04:05Z07:00). Overrides 'format' if both are set.", }, "unix": { Type: "boolean", Description: "If true, returns the current Unix timestamp in seconds. Overrides 'format' if set.", }, "args": { Type: "string", Description: "Raw argument string forwarded to the underlying 'date' command. Use only if other flags are not sufficient.", }, }, }, }
View Source
var FFProbe = FFProbeTool{ Name: "ffprobe", Description: "Analyze multimedia files and extract metadata using ffprobe. Provides detailed information about video, audio, and container formats.", Inputs: &pub_models.InputSchema{ Type: "object", Properties: map[string]pub_models.ParameterObject{ "file": { Type: "string", Description: "The multimedia file to analyze.", }, "format": { Type: "string", Description: "Output format: json, xml, csv, flat, ini, or default. Default is 'default'.", }, "showFormat": { Type: "boolean", Description: "Show format/container information.", }, "showStreams": { Type: "boolean", Description: "Show stream information (video, audio, subtitle tracks).", }, "showFrames": { Type: "boolean", Description: "Show frame information (use with caution on large files).", }, "selectStreams": { Type: "string", Description: "Select specific streams (e.g., 'v:0' for first video stream, 'a:0' for first audio stream).", }, "showEntries": { Type: "string", Description: "Show only specific entries (e.g., 'format=duration,size' or 'stream=codec_name,width,height').", }, }, Required: []string{"file"}, }, }
View Source
var FileTree = FileTreeTool{ Name: "file_tree", Description: "List the filetree of some directory. Uses linux command 'tree'.", Inputs: &pub_models.InputSchema{ Type: "object", Properties: map[string]pub_models.ParameterObject{ "directory": { Type: "string", Description: "The directory to list the filetree of.", }, "level": { Type: "integer", Description: "The depth of the tree to display.", }, }, Required: []string{"directory"}, }, }
View Source
var FileType = FileTypeTool{ Name: "file_type", Description: "Determine the file type of a given file. Uses the linux command 'file'.", Inputs: &pub_models.InputSchema{ Type: "object", Properties: map[string]pub_models.ParameterObject{ "file_path": { Type: "string", Description: "The path to the file to analyze.", }, "mime_type": { Type: "boolean", Description: "Whether to display the MIME type of the file.", }, }, Required: []string{"file_path"}, }, }
View Source
var Find = FindTool{ Name: "find", Description: "Search for files in a directory hierarchy. Uses linux command 'find'.", Inputs: &pub_models.InputSchema{ Type: "object", Properties: map[string]pub_models.ParameterObject{ "directory": { Type: "string", Description: "The directory to start the search from.", }, "name": { Type: "string", Description: "The name pattern to search for.", }, "type": { Type: "string", Description: "The file type to search for (f: regular file, d: directory).", }, "maxdepth": { Type: "integer", Description: "The maximum depth of directories to search.", }, }, Required: []string{"directory"}, }, }
View Source
var FreetextCmd = FreetextCmdTool{ Name: "freetext_command", Description: "Run any entered string as a terminal command.", Inputs: &pub_models.InputSchema{ Type: "object", Properties: map[string]pub_models.ParameterObject{ "command": { Type: "string", Description: "The freetext comand. May be any string. Will return error on non-zero exit code.", }, }, Required: []string{"command"}, }, }
View Source
var Git = GitTool{ Name: "git", Description: "Run read-only git commands like log, diff, show, blame and status.", Inputs: &pub_models.InputSchema{ Type: "object", Properties: map[string]pub_models.ParameterObject{ "operation": { Type: "string", Description: "The git operation to run.", Enum: &[]string{"log", "diff", "show", "status", "blame"}, }, "file": { Type: "string", Description: "Optional file path used by diff, show or blame.", }, "commit": { Type: "string", Description: "Optional commit hash used by show or diff.", }, "range": { Type: "string", Description: "Optional revision range for log or diff.", }, "n": { Type: "integer", Description: "Number of log entries to display.", }, "dir": { Type: "string", Description: "Directory containing the git repository (optional).", }, }, Required: []string{"operation"}, }, }
View Source
var Go = GoTool{ Name: "go", Description: "Run Go commands like 'go test' and 'go run' to compile, test, and run Go programs. Run 'go help' to get details of this tool.", Inputs: &pub_models.InputSchema{ Type: "object", Properties: map[string]pub_models.ParameterObject{ "command": { Type: "string", Description: "The Go command to run (e.g., 'run', 'test', 'build').", }, "args": { Type: "string", Description: "Additional arguments for the Go command (e.g., file names, flags).", }, "dir": { Type: "string", Description: "The directory to run the command in (optional, defaults to current directory).", }, }, Required: []string{"command"}, }, }
View Source
var LS = LsTool{ Name: "ls", Description: "List the files in a directory. Uses the Linux command 'ls'.", Inputs: &pub_models.InputSchema{ Type: "object", Properties: map[string]pub_models.ParameterObject{ "directory": { Type: "string", Description: "The directory to list the files of.", }, "all": { Type: "boolean", Description: "Show all files, including hidden files.", }, "long": { Type: "boolean", Description: "Use a long listing format.", }, }, Required: []string{"directory"}, }, }
View Source
var LineCount = LineCountTool{ Name: "line_count", Description: "Count the number of lines in a file.", Inputs: &pub_models.InputSchema{ Type: "object", Properties: map[string]pub_models.ParameterObject{ "file_path": { Type: "string", Description: "The path to the file to count lines of.", }, }, Required: []string{"file_path"}, }, }
View Source
var Pwd = PwdTool{ Name: "pwd", Description: "Print the current working directory. Uses the Linux command 'pwd'.", Inputs: &pub_models.InputSchema{ Type: "object", Required: make([]string, 0), Properties: map[string]pub_models.ParameterObject{}, }, }
View Source
var RipGrep = RipGrepTool{ Name: "rg", Description: "Search for a pattern in files using ripgrep.", Inputs: &pub_models.InputSchema{ Type: "object", Properties: map[string]pub_models.ParameterObject{ "pattern": { Type: "string", Description: "The pattern to search for.", }, "path": { Type: "string", Description: "The path to search in.", }, "case_sensitive": { Type: "boolean", Description: "Whether the search should be case sensitive.", }, "line_number": { Type: "boolean", Description: "Whether to show line numbers.", }, "hidden": { Type: "boolean", Description: "Whether to search hidden files and directories.", }, }, Required: []string{"pattern"}, }, }
View Source
var RowsBetween = RowsBetweenTool{ Name: "rows_between", Description: "Fetch the lines between two line numbers (inclusive) from a file.", Inputs: &pub_models.InputSchema{ Type: "object", Properties: map[string]pub_models.ParameterObject{ "file_path": { Type: "string", Description: "The path to the file to read.", }, "start_line": { Type: "integer", Description: "First line to include (1-based, inclusive).", }, "end_line": { Type: "integer", Description: "Last line to include (1-based, inclusive).", }, }, Required: []string{"file_path", "start_line", "end_line"}, }, }
View Source
var Sed = SedTool{ Name: "sed", Description: "Perform a basic regex substitution on each line or within a specific line range of a file (like 'sed s/pattern/repl/g'). Overwrites the file.", Inputs: &pub_models.InputSchema{ Type: "object", Properties: map[string]pub_models.ParameterObject{ "file_path": { Type: "string", Description: "The path to the file to modify.", }, "pattern": { Type: "string", Description: "The regex pattern to search for.", }, "repl": { Type: "string", Description: "The replacement string.", }, "start_line": { Type: "integer", Description: "Optional. First line to modify (1-based, inclusive).", }, "end_line": { Type: "integer", Description: "Optional. Last line to modify (1-based, inclusive).", }, }, Required: []string{"file_path", "pattern", "repl"}, }, }
View Source
var WebsiteText = WebsiteTextTool{ Name: "website_text", Description: "Get the text content of a website by stripping all non-text tags and trimming whitespace.", Inputs: &pub_models.InputSchema{ Type: "object", Properties: map[string]pub_models.ParameterObject{ "url": { Type: "string", Description: "The URL of the website to retrieve the text content from.", }, }, Required: []string{"url"}, }, }
View Source
var WriteFile = WriteFileTool{ Name: "write_file", Description: "Write content to a file. Creates the file if it doesn't exist, or overwrites it if it does.", Inputs: &pub_models.InputSchema{ Type: "object", Properties: map[string]pub_models.ParameterObject{ "file_path": { Type: "string", Description: "The path to the file to write to.", }, "content": { Type: "string", Description: "The content to write to the file.", }, "append": { Type: "boolean", Description: "If true, append to the file instead of overwriting it.", }, }, Required: []string{"file_path", "content"}, }, }
Functions ¶
This section is empty.
Types ¶
type CatTool ¶
type CatTool pub_models.Specification
func (CatTool) Specification ¶
func (c CatTool) Specification() pub_models.Specification
type DateTool ¶
type DateTool pub_models.Specification
func (DateTool) Specification ¶
func (d DateTool) Specification() pub_models.Specification
type FFProbeTool ¶
type FFProbeTool pub_models.Specification
func (FFProbeTool) Call ¶
func (f FFProbeTool) Call(input pub_models.Input) (string, error)
func (FFProbeTool) Specification ¶
func (f FFProbeTool) Specification() pub_models.Specification
type FileTreeTool ¶
type FileTreeTool pub_models.Specification
func (FileTreeTool) Call ¶
func (f FileTreeTool) Call(input pub_models.Input) (string, error)
func (FileTreeTool) Specification ¶
func (f FileTreeTool) Specification() pub_models.Specification
type FileTypeTool ¶
type FileTypeTool pub_models.Specification
func (FileTypeTool) Call ¶
func (f FileTypeTool) Call(input pub_models.Input) (string, error)
func (FileTypeTool) Specification ¶
func (f FileTypeTool) Specification() pub_models.Specification
type FindTool ¶
type FindTool pub_models.Specification
func (FindTool) Specification ¶
func (f FindTool) Specification() pub_models.Specification
type FreetextCmdTool ¶
type FreetextCmdTool pub_models.Specification
func (FreetextCmdTool) Call ¶
func (r FreetextCmdTool) Call(input pub_models.Input) (string, error)
func (FreetextCmdTool) Specification ¶
func (r FreetextCmdTool) Specification() pub_models.Specification
type GitTool ¶
type GitTool pub_models.Specification
func (GitTool) Specification ¶
func (g GitTool) Specification() pub_models.Specification
type GoTool ¶
type GoTool pub_models.Specification
func (GoTool) Specification ¶
func (g GoTool) Specification() pub_models.Specification
type LineCountTool ¶
type LineCountTool pub_models.Specification
func (LineCountTool) Call ¶
func (l LineCountTool) Call(input pub_models.Input) (string, error)
func (LineCountTool) Specification ¶
func (l LineCountTool) Specification() pub_models.Specification
type LsTool ¶
type LsTool pub_models.Specification
func (LsTool) Specification ¶
func (f LsTool) Specification() pub_models.Specification
type PwdTool ¶
type PwdTool pub_models.Specification
func (PwdTool) Specification ¶
func (p PwdTool) Specification() pub_models.Specification
type RipGrepTool ¶
type RipGrepTool pub_models.Specification
func (RipGrepTool) Call ¶
func (r RipGrepTool) Call(input pub_models.Input) (string, error)
func (RipGrepTool) Specification ¶
func (r RipGrepTool) Specification() pub_models.Specification
type RowsBetweenTool ¶
type RowsBetweenTool pub_models.Specification
func (RowsBetweenTool) Call ¶
func (r RowsBetweenTool) Call(input pub_models.Input) (string, error)
func (RowsBetweenTool) Specification ¶
func (r RowsBetweenTool) Specification() pub_models.Specification
type SedTool ¶
type SedTool pub_models.Specification
func (SedTool) Specification ¶
func (s SedTool) Specification() pub_models.Specification
type WebsiteTextTool ¶
type WebsiteTextTool pub_models.Specification
func (WebsiteTextTool) Call ¶
func (w WebsiteTextTool) Call(input pub_models.Input) (string, error)
func (WebsiteTextTool) Specification ¶
func (w WebsiteTextTool) Specification() pub_models.Specification
type WriteFileTool ¶
type WriteFileTool pub_models.Specification
func (WriteFileTool) Call ¶
func (w WriteFileTool) Call(input pub_models.Input) (string, error)
func (WriteFileTool) Specification ¶
func (w WriteFileTool) Specification() pub_models.Specification
Source Files
¶
- bash_tool_cat.go
- bash_tool_date.go
- bash_tool_ffprobe.go
- bash_tool_file.go
- bash_tool_find.go
- bash_tool_freetext_command.go
- bash_tool_ls.go
- bash_tool_pwd.go
- bash_tool_rg.go
- bash_tool_tree.go
- clai_tool_check.go
- clai_tool_help.go
- clai_tool_result.go
- clai_tool_run.go
- clai_tool_wait_for_workers.go
- programming_tool_git.go
- programming_tool_go.go
- programming_tool_line_count.go
- programming_tool_rows_between.go
- programming_tool_sed.go
- programming_tool_write_file.go
- web_tool_website_text.go
Click to show internal directories.
Click to hide internal directories.