compact

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

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

func Cmd() *cobra.Command

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.

Jump to

Keyboard shortcuts

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