status

package
v0.1.1 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: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cmd

func Cmd() *cobra.Command

Cmd returns the status command.

Flags:

  • --json: Output as JSON for machine parsing
  • --verbose, -v: Include file content previews

Returns:

  • *cobra.Command: Configured status command with flags registered

Types

type FileStatus

type FileStatus struct {
	Name    string   `json:"name"`
	Tokens  int      `json:"tokens"`
	Size    int64    `json:"size"`
	IsEmpty bool     `json:"is_empty"`
	Summary string   `json:"summary"`
	ModTime string   `json:"mod_time"`
	Preview []string `json:"preview,omitempty"`
}

FileStatus represents a single file's status in JSON output.

Fields:

  • Name: Filename (e.g., "TASKS.md")
  • Tokens: Estimated token count for this file
  • Size: File size in bytes
  • IsEmpty: True if the file has no meaningful content
  • Summary: Brief description of file contents
  • ModTime: Last modification time (RFC3339 format)
  • Preview: Content preview lines (only with --verbose)

type Output

type Output struct {
	ContextDir  string       `json:"context_dir"`
	TotalFiles  int          `json:"total_files"`
	TotalTokens int          `json:"total_tokens"`
	TotalSize   int64        `json:"total_size"`
	Files       []FileStatus `json:"files"`
}

Output represents the JSON output format for the status command.

Fields:

  • ContextDir: Path to the .context/ directory
  • TotalFiles: Number of context files found
  • TotalTokens: Estimated total token count across all files
  • TotalSize: Total size in bytes across all files
  • Files: Individual file status entries

Jump to

Keyboard shortcuts

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