Documentation
¶
Overview ¶
Package compact implements the "ctx compact" command for cleaning up and consolidating context files.
The compact command performs maintenance on .context/ files including moving completed tasks to a dedicated section, optionally archiving old content, and removing empty sections.
File Organization ¶
- compact.go: Command definition and flag registration
- run.go: Main execution logic and orchestration
- process.go: File processing and section manipulation
- task.go: Task extraction and completion detection
- sanitize.go: Content cleaning and normalization
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
- --no-auto-save: Skip auto-saving session before compact
Returns:
- *cobra.Command: Configured compact command with flags registered
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.