Documentation
¶
Overview ¶
Package status implements the "ctx status" command for displaying context health and summary information.
The status command reads context files from .context/ and displays file counts, token estimates, modification times, and task completion ratios. Output can be in human-readable (default) or JSON format.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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
Click to show internal directories.
Click to hide internal directories.