root

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package root implements the ctx watch command.

It watches AI tool output for context-update commands and applies them to the .context/ directory.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cmd

func Cmd() *cobra.Command

Cmd returns the watch command.

Flags:

  • --log: Log file to watch (default: stdin)
  • --dry-run: Show updates without applying

Returns:

  • *cobra.Command: Configured watch command with flags registered

func Run

func Run(cmd *cobra.Command, logPath string, dryRun bool) error

Run executes the watch command logic.

Sets up a reader from either a log file (logPath) or stdin, then processes the stream for context update commands. Displays status messages and respects the dryRun flag.

Parameters:

  • cmd: Cobra command for output
  • logPath: Path to the log file, or empty for stdin
  • dryRun: If true, show what would be updated without making changes

Returns:

  • error: Non-nil if the context directory is missing, the log file cannot be opened, or stream processing fails

Types

This section is empty.

Jump to

Keyboard shortcuts

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