stats

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

Documentation

Overview

Package stats implements the ctx system stats subcommand.

It displays per-session token usage statistics from stats JSONL files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cmd

func Cmd() *cobra.Command

Cmd returns the "ctx system stats" subcommand.

Returns:

  • *cobra.Command: Configured stats subcommand

func Run

func Run(cmd *cobra.Command) error

Run executes the stats subcommand, reading and displaying per-session token usage statistics from JSONL state files. Supports filtering by session, limiting output count, JSON output, and live follow mode.

Parameters:

  • cmd: Cobra command for flag access and output

Returns:

  • error: Non-nil on stats directory read failure

Types

This section is empty.

Jump to

Keyboard shortcuts

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