Documentation
¶
Overview ¶
Package root implements the ctx sync command.
It reconciles context with the codebase by scanning for changes that should be reflected in context files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Cmd ¶
Cmd returns the "ctx sync" command for reconciling context with the codebase.
The command scans the codebase for changes that should be reflected in context files, such as new directories, package manager files, and configuration files.
Flags:
- --dry-run: Show what would change without modifying files
Returns:
- *cobra.Command: Configured sync command with flags registered
func Run ¶
Run executes the sync command logic.
Loads context, detects discrepancies between codebase and documentation, and displays suggested actions. In dry-run mode, only shows what would be suggested without prompting for changes.
Parameters:
- cmd: Cobra command for output stream
- dryRun: If true, only show suggestions without prompting for changes
Returns:
- error: Non-nil if context loading fails or .context/ is not found
Types ¶
This section is empty.