> ## Documentation Index
> Fetch the complete documentation index at: https://docs.monolex.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# CCForecast (Legacy)

> Inspect the final CCForecast 0.2.1 contract and migrate its Claude cache-cost workflows to Monometer Claude.

CCForecast was the original standalone Claude Code cache-cost analyzer. Its
Rust CLI was renamed to `monometer-claude` on 2026-04-26, so new workflows
should use the maintained Monometer provider package.

*Final compatibility contract: `ccforecast 0.2.1`, OpenCLIs build
`2026-04-19-102848`. The public release contains one signed
`darwin-aarch64` artifact. The current successor is `monometer-claude 0.5.0`,
OpenCLIs build `2026-05-01-045146`.*

<Warning>
  Do not choose CCForecast for a new installation. Use
  `openclis install monometer-claude`. The legacy package remains documented so
  old scripts, archived results, and the still-downloadable 0.2.1 artifact can
  be understood without pretending it is a separate current product.
</Warning>

## Name and Lifecycle

```text theme={null}
ccforecast 0.2.1
      │ same Claude cache-analysis command set
      │ renamed and moved into the provider suite
      ▼
monometer-claude 0.3.0
      │ maintained releases
      ▼
monometer-claude 0.5.0
```

The final CCForecast binary exposes **38 analytic commands** plus Clap's
built-in `help` entry. That is why its historical skill describes 39 command
entries. The 38 analytic names match the current `monometer-claude` surface.

## Inspect or Migrate

```bash theme={null}
# Reproduce an old environment only
openclis install ccforecast
ccforecast --version
ccforecast --help

# Current path
openclis install monometer-claude
monometer-claude --version
monometer-claude --help
```

Use `--help` for automation. The final CCForecast payload prints Clap help to
stderr and exits non-zero when invoked without a command.

## Global Controls

| Flag                    | Contract                                                              |
| ----------------------- | --------------------------------------------------------------------- |
| `--days <n>`            | Analysis window ending today; default is 30 days.                     |
| `--project <substring>` | Restricts rows by project/source-file substring.                      |
| `--json`                | Machine output is promised for `scan` only in 0.2.1.                  |
| `--watch <seconds>`     | Repeats the selected command and clears the screen until interrupted. |
| `-h`, `--help`          | Prints root or subcommand help.                                       |
| `-V`, `--version`       | Prints `ccforecast 0.2.1`.                                            |

Global flags precede the command, for example `ccforecast --days 7 scan`.

## Cost and Session Commands

| Command       | What it answers                                                                                           |
| ------------- | --------------------------------------------------------------------------------------------------------- |
| `scan`        | What did the selected window cost, and what were its hit rate, leverage, and capture efficiency?          |
| `hit-curve`   | How does cost change from 0% to 100% cache hit rate?                                                      |
| `classify`    | Which of the 16 dominant and multi-label micro-session anchors occurred?                                  |
| `ttl-compare` | What would all-5-minute, observed mixed, and all-1-hour cache TTL policies cost?                          |
| `sensitivity` | How does a ±50% change in cache-read, cache-creation, or output pricing affect cost?                      |
| `drift`       | How are weekly messages, cost, hit rate, leverage, and 1-hour share changing?                             |
| `models`      | Which models produced the messages, cost, leverage, and hit rate?                                         |
| `misses`      | Which 15 events combine a large cache-read drop with a cache-write spike?                                 |
| `estimate`    | What would a hypothetical session cost? Use `--msgs` (100), `--context-k` (500), and `--hit-rate` (0.98). |

## Pattern Commands

| Command        | What it answers                                                                       |
| -------------- | ------------------------------------------------------------------------------------- |
| `fingerprints` | What are each anchor's count, median size/leverage, total cost, and cost per message? |
| `response`     | How does each anchor respond when cache hit rate falls?                               |
| `markov`       | What is the anchor-to-anchor transition matrix?                                       |
| `rewrite`      | What cache-write penalty appears at the 5m, 15m, 30m, and 1h boundaries?              |
| `score`        | What is the composite OTP score?                                                      |
| `stationary`   | What long-run anchor distribution follows from the Markov model?                      |
| `load-test`    | How much does removing each anchor class change the result?                           |
| `redundancy`   | Which anchor pairs overlap?                                                           |

## Temporal Commands

| Command          | What it answers                                                   |
| ---------------- | ----------------------------------------------------------------- |
| `time-of-day`    | How is work distributed across KST time blocks?                   |
| `weekly-anchors` | How does the anchor mix change by week?                           |
| `weekly-markov`  | How do weekly Markov models and their divergence change?          |
| `daily-ttl`      | What are each day's cache TTL share and cost?                     |
| `weekly-ces`     | What is each week's capture-efficiency score?                     |
| `daily-otp`      | What is each day's OTP composite?                                 |
| `entry-patterns` | How do day-start sessions differ from post-break sessions?        |
| `weekly-kl`      | What is the KL divergence between weeks?                          |
| `covariates`     | Which weekly TTL, hit-rate, and leverage variables move together? |

## Project and Model Commands

| Command           | What it answers                                 |
| ----------------- | ----------------------------------------------- |
| `projects`        | Which projects account for the most cost?       |
| `project-anchors` | Which anchors dominate each project?            |
| `project-drift`   | How does each project's weekly behavior change? |
| `model-anchors`   | Which anchors appear for each model?            |

## Advanced Commands

| Command              | What it answers                                                              |
| -------------------- | ---------------------------------------------------------------------------- |
| `trajectory`         | How does cost develop within sessions of each anchor?                        |
| `gradient`           | How does the curve interpolate between required `--from` and `--to` anchors? |
| `pairs`              | What is the cost-delta matrix for every anchor pair?                         |
| `bootstrap`          | What are the bootstrap confidence intervals for fingerprints?                |
| `quality`            | What tool-acceptance evidence is available from session JSONL?               |
| `gap-metrics`        | What characterizes unclassified regions?                                     |
| `acceleration`       | Where does marginal cost begin accelerating?                                 |
| `bootstrap-response` | What are the bootstrap confidence intervals for the response matrix?         |

## Data and Failure Boundaries

```text theme={null}
Claude session JSONL
        ↓ monometer daemon
legacy Monolex monometer.db
        ↓ read-only
ccforecast analysis
```

The final payload reads
`~/Library/Application Support/Monolex/protocols/niia/database/monometer.db`.
It never writes that database. A missing database returns exit status 1 and
instructs the user to run the Monometer daemon. An existing but stale database
can still be analyzed, but it cannot contain sessions the daemon has not yet
ingested.

The release archive SHA-256 for `darwin-aarch64` is
`4b1ff149c5f8d7cbcd199ad07c0d27d53f3066b0d3b0c9ce9ba356ad541ea488`.
No Linux, Windows, or Intel macOS artifact was published for 0.2.1.

## Relationships

| Tool                                  | Ownership                                                                                             |
| ------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| [Monometer Suite](/ai-clis/monometer) | Owns the current database writer, cross-provider views, and maintained `monometer-claude` replacement |
| [MonoCLI](/ai-clis/monocli)           | Reads the provider-native conversations whose usage is summarized by the Monometer database           |
