Skip to main content

gmlcache

Detached ML Execution Cache — the terminal client

License: Apache 2.0 Status: Alpha

gmlcache runs, records, and replays detached ML workloads — record a real client (or API) call once, replay it forever by its content key, offline and byte-for-byte.

Single-user, local — not a gateway. gmlcache runs on your machine, as you, across the subscriptions and APIs you already hold. It is not a multi-user router and not a way to share one subscription — see Positioning.

gmlcache: a miss records the real client call; the same command again is served instantly from cache, byte-identical

Detached + live streamingrun --detach returns an id; execution watch follows the client's live progress to the result

gmlcache run --detach, then execution watch streaming the client's live thinking and tool calls to the result

Install

pip install generic-ml-cache-cli

This installs the gmlcache command and pulls in the engine, generic-ml-cache-core.

Use

gmlcache run    --client claude --model sonnet --prompt "…"            # record on a miss, replay on a hit
gmlcache check  --client claude --model sonnet --prompt "…"            # forecast: is this exact call cached?
gmlcache run    --client claude --model sonnet --prompt "…" --detach   # run detached → prints an execution id
gmlcache alias  claude -- -p "…" --model sonnet                        # thin wrapper: cache a raw native call
gmlcache execution watch <id>                                         # follow a detached run's live progress
gmlcache session report <id>                                          # token usage by provider/model for a workflow
gmlcache encrypt                                                      # encrypt the whole store at rest
gmlcache export --tag eval -o data.jsonl                              # export the (input, output) dataset corpus
gmlcache list | tags | stats | inspect <key>                          # browse stored executions
gmlcache doctor | models | status | init                             # environment & configuration helpers

What it does

  • Records a real agentic CLI client (claude, codex, cursor-agent) or an API call — stdout, stderr, exit code, generated files, and token usage.
  • Replays an identical request instantly and offline, byte-for-byte — gmlcache adds nothing to the client's output, so it is a transparent drop-in.
  • Reports — list, group, inspect, and measure stored executions and their savings.
  • And more — group a workflow's runs into sessions with per-provider/model usage reports, encrypt the whole store at rest, run detached (--detach) with a live progress stream, and export an (input, output) dataset.

Built on a reusable engine

gmlcache is the terminal client — one inbound driver over the engine. The whole cache logic and every adapter live in generic-ml-cache-core, a stateless library. To embed the cache in your own application instead of driving it from a terminal, depend on the core and inject your own data source — you never reimplement the adapters.

Links

License

Apache-2.0 — see LICENSE and NOTICE.

Release files for generic-ml-cache-cli 0.11.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for generic-ml-cache-cli 0.11.0
File Size Uploaded
generic_ml_cache_cli-0.11.0.tar.gz 56.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for generic-ml-cache-cli 0.11.0
File Interpreter ABI Platform
generic_ml_cache_cli-0.11.0-py3-none-any.whl Python 3 none any Details

Total release size: 95.0 kB

Release files / generic_ml_cache_cli-0.11.0.tar.gz

Download URL generic_ml_cache_cli-0.11.0.tar.gz
Size 56.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0357f62aac820d9a3a1246f1f4a187554770bd2f7e0d3a634bd2ae1a2e50109b
BLAKE2b-256 checksum
How to use checksums
1b63c29731e63a32ba5ab9ef47a91ed1558bfedfbcddf5f9b8129ef4c33b9c58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 25, 2026.

Transparency log

Release files / generic_ml_cache_cli-0.11.0-py3-none-any.whl

Download URL generic_ml_cache_cli-0.11.0-py3-none-any.whl
Size 39.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
57a37e919bb3be633541c413f67aa1b660e128ca80fe6d6e04c922c4537cc33d
BLAKE2b-256 checksum
How to use checksums
75530b8ebc09f8ca79afee337e38c30e683567a93af7129a14cd6bf3d70b92ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 25, 2026.

Transparency log

Release history Release notifications | RSS feed

1.0.0

2 release files

0.28.2

2 release files

0.26.0

2 release files

0.25.0

2 release files

0.24.0

2 release files

0.23.0

2 release files

0.22.0

2 release files

0.21.0

2 release files

0.20.0

2 release files

0.19.0

2 release files

0.18.0

2 release files

0.17.0

2 release files

0.16.0

2 release files

0.15.0

2 release files

0.14.0

2 release files

0.13.0

2 release files

0.12.0

2 release files

This release

0.11.0 This release

2 release files

0.10.0

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page