Documentation
¶
Overview ¶
Package root implements the ctx compact command.
It archives completed tasks and cleans up context files by removing empty sections and consolidating old content.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Cmd ¶
Cmd returns the "ctx compact" command for cleaning up context files.
The command moves completed tasks to a "Completed (Recent)" section, optionally archives old content, and removes empty sections from all context files.
Flags:
- --archive: Create .context/archive/ for old completed tasks
Returns:
- *cobra.Command: Configured compact command with flags registered
func Run ¶
Run executes the compact command logic.
Loads context, processes TASKS.md for completed tasks, and removes empty sections from all context files.
Parameters:
- cmd: Cobra command for output messages
- archive: If true, archive old completed tasks to .context/archive/
Returns:
- error: Non-nil if context loading fails or .context/ is not found
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.