# add checkpoint token comparison

`19ca13e`→[main](/content/gh/entireio/cli/commits/main/index.html)

## Sessions

cea04e74bd49View transcript

## Changes

2

- cmd/entire/cli
  
  - Mcheckpoint_tokens.go+182/-13

```
4 unmodified lines

16 unmodified lines

229 unmodified lines

1856 unmodified lines

```

func newCheckpointTokensCmd() *cobra.Command {
    var jsonFlag bool
    var compareFlag string

cmd := &cobra.Command{
        Use:   "tokens <checkpoint-id>",
    }
}

func runCheckpointTokens(ctx context.Context, cmd *cobra.Command, checkpointIDPrefix string, jsonOutput bool) error {
    cpID, lookup, err := resolveExplainCheckpointID(ctx, cmd.ErrOrStderr(), explainExportOptions{target: checkpointIDPrefix})
}

func writeCheckpointTokensJSON(w io.Writer, report checkpointTokensReport) error {
    enc := json.NewEncoder(w)
    enc.SetIndent("", "  ")
}

func buildCheckpointTokensComparison(target, baseline checkpointTokensReport) *checkpointTokensComparison {
    comparison := &checkpointTokensComparison{
        BaselineCheckpointID: baseline.CheckpointID,
        TargetCheckpointID:   target.CheckpointID,
    }
}

func formatCheckpointMetricDelta(delta *checkpointTokensMetricDelta, formatValue func(int) string) string {
    if delta == nil {
        return "unavailable"
    }
}

```
