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 ¶
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 ¶
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.
Click to show internal directories.
Click to hide internal directories.