cmd

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: Apache-2.0 Imports: 26 Imported by: 0 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

Overview

Package cmd implements TaskSmith's command-line interface and commands built on github.com/spf13/cobra.

All commands communicate with the background TaskSmith Brain Daemon over its Unix domain socket using github.com/masterkeysrd/tasksmith/client and github.com/masterkeysrd/tasksmith/api, automatically starting the daemon on demand when not already running.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectOrStart

func ConnectOrStart(ctx context.Context, socketPath string, spawnArgs ...string) (*client.Client, []string, error)

ConnectOrStart connects to an existing Brain Daemon at socketPath, or spawns a detached background daemon process (`os.Executable() daemon serve --socket <socketPath>`) and polls `/v1/health` until ready.

When the running daemon was built from a different version than the client, ConnectOrStart restarts it only once every session is confirmed idle. In any other case — an active session or an unknown session state — the existing daemon is kept and the skew is returned as a user-facing notice so callers can surface it in their own UI; the user then restarts the daemon when it is safe instead of having work interrupted.

func Execute

func Execute(ctx context.Context) error

Execute builds and executes the root TaskSmith CLI command with ctx.

func NewRootCmd

func NewRootCmd() *cobra.Command

NewRootCmd constructs the root `tasksmith` Cobra command and attaches all subcommands (`repl`, `exec`, `daemon`).

Types

This section is empty.

Jump to

Keyboard shortcuts

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