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.13.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.13.0
File Size Uploaded
generic_ml_cache_cli-0.13.0.tar.gz 60.9 kB Details

Built distribution (wheel)

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

Total release size: 102.4 kB

Release files / generic_ml_cache_cli-0.13.0.tar.gz

Download URL generic_ml_cache_cli-0.13.0.tar.gz
Size 60.9 kB
Tags Source
SHA-256 checksum
How to use checksums
78e2977b96c5bded6be8ab85e03bdab8654050cb03ccdf3deb0823042cf4dc3a
BLAKE2b-256 checksum
How to use checksums
6cb39479942ac263b30cd33907ccbbc6794bb01dbfbc7f85833a3df5b6cbdb9b
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.13.0-py3-none-any.whl

Download URL generic_ml_cache_cli-0.13.0-py3-none-any.whl
Size 41.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f24881111a120d1357cbeb98e9c1b2c660b758f767aab8c3f877db190186594c
BLAKE2b-256 checksum
How to use checksums
07929246d871e781decf7d96f3dd8d4ea461aee4428d9e2e08d1b48c7af9b542
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

This release

0.13.0 This release

2 release files

0.12.0

2 release files

0.11.0

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