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: 11 Imported by: 0

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

func Cmd() *cobra.Command

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

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

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.

Jump to

Keyboard shortcuts

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