Documentation
¶
Overview ¶
Package snapshot implements the ctx task snapshot subcommand.
It creates a point-in-time copy of TASKS.md without modifying the original, storing the snapshot in the archive directory.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Cmd ¶
Cmd returns the tasks snapshot subcommand.
The snapshot command creates a point-in-time copy of TASKS.md without modifying the original. Snapshots are stored in .context/archive/ with timestamped names.
Arguments:
- [name]: Optional name for the snapshot (defaults to "snapshot")
Returns:
- *cobra.Command: Configured snapshot subcommand
func Run ¶
Run executes the snapshot subcommand logic.
Creates a point-in-time copy of TASKS.md in the archive directory. The snapshot includes a header with the name and timestamp.
Parameters:
- cmd: Cobra command for output
- args: Optional snapshot name as first argument
Returns:
- error: Non-nil if TASKS.md doesn't exist or file operations fail
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.