snapshot

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

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

func Cmd() *cobra.Command

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

func Run(cmd *cobra.Command, args []string) error

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.

Jump to

Keyboard shortcuts

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