cacheplan 0.1.0a1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,8 @@
1
+ __pycache__/
2
+ *.egg-info/
3
+ .pytest_cache/
4
+ dist/
5
+ build/
6
+ .venv/
7
+ captures/
8
+ *.jsonl
@@ -0,0 +1,12 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0a1
4
+
5
+ First alpha.
6
+
7
+ - `report`: per-application diagnosis, cost forecast for each caching option (off, automatic,
8
+ planned breakpoints; 5-minute and 1-hour lifetimes), recommendation and findings CP001 to CP009.
9
+ - `diagnose`: prefix breaks with location, cause and tokens behind them.
10
+ - `verify`: live replay with one output token per request.
11
+ - `gaps`, `check`, `capture`, `rules`.
12
+ - Reads cacheplan captures, raw Anthropic request bodies and promptcachelint traces.
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ https://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ https://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,148 @@
1
+ Metadata-Version: 2.5
2
+ Name: cacheplan
3
+ Version: 0.1.0a1
4
+ Summary: Diagnose LLM prompt caching, forecast what each setting would cost, and plan the fix.
5
+ Project-URL: Homepage, https://github.com/shamiksaharcciit-oss/cacheplan
6
+ Project-URL: Issues, https://github.com/shamiksaharcciit-oss/cacheplan/issues
7
+ Author: Shamik Saha
8
+ License-Expression: Apache-2.0
9
+ License-File: LICENSE
10
+ Keywords: anthropic,cache,claude,cost,linter,llm,prompt caching
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Topic :: Software Development :: Quality Assurance
15
+ Requires-Python: >=3.10
16
+ Provides-Extra: dev
17
+ Requires-Dist: pytest>=8; extra == 'dev'
18
+ Description-Content-Type: text/markdown
19
+
20
+ # cacheplan
21
+
22
+ Diagnose LLM prompt caching, forecast what each setting would cost, and plan the fix.
23
+
24
+ Prompt caching can cut input cost by more than half, or raise it by a quarter. Which one
25
+ you get depends on how your application builds its prompts and how fast requests arrive.
26
+ `cacheplan` reads a log of your requests and tells you, per application:
27
+
28
+ - **where and why** the reusable prefix breaks (a timestamp in the system prompt, tools in
29
+ a different order, new turns inserted before content that was already sent);
30
+ - **what each option would cost**: caching off, automatic caching, planned breakpoints, with
31
+ the 5-minute or the 1-hour lifetime, from a local model of the provider's caching rules;
32
+ - **what to do**: the cheapest simple option, where to put the breakpoints, and whether a
33
+ small prompt change would unlock more;
34
+ - **whether the forecast is right**: an optional replay against the live API, one output
35
+ token per request.
36
+
37
+ It runs locally, has no dependencies, and needs no API key except for the live check.
38
+ Status: early alpha. Anthropic Messages API only.
39
+
40
+ ## Install
41
+
42
+ ```
43
+ pip install --pre cacheplan
44
+ ```
45
+
46
+ ## Use
47
+
48
+ ```
49
+ cacheplan report requests.jsonl
50
+ ```
51
+
52
+ Example output, abridged (LangChain's ReAct agent template):
53
+
54
+ ```
55
+ react-template
56
+ 17 requests, ~113,000 input tokens (estimate)
57
+ Layout changing content at the top of the prompt
58
+ Reusable 2% of input tokens repeat an earlier prefix as written
59
+ Pace median 4 s between requests; 6% of pauses over 5 minutes
60
+
61
+ Option Read Cost vs no caching
62
+ Caching off 0% 100% <- recommended
63
+ Automatic caching, 5-minute 0% 125%
64
+ Planned breakpoints, 5-minute 0% 100%
65
+ Prompt fix + breakpoints, 5-minute 62% 53%
66
+
67
+ Recommendation: leave caching off as the prompts stand.
68
+ With the prompt fix in the findings: 53%. It changes what the model reads,
69
+ so compare answer quality before adopting it.
70
+
71
+ Findings
72
+ CP001 system value <<system_time>> changes between requests; everything after it,
73
+ including the conversation history, cannot be reused
74
+ fix: move it to the latest user message, or make it change rarely
75
+ ```
76
+
77
+ No log yet? Record one. The proxy writes request bodies only; headers, and so your API
78
+ key, never reach the file.
79
+
80
+ ```
81
+ cacheplan capture --out requests.jsonl --app my-app
82
+ # in the shell that runs your application:
83
+ # ANTHROPIC_BASE_URL=http://127.0.0.1:8787
84
+ ```
85
+
86
+ | Command | What it does |
87
+ | --- | --- |
88
+ | `report LOG` | Diagnosis, forecast and recommendation per application. `--json`, `--no-content`, `--fail-on CP001,CP002`. |
89
+ | `diagnose LOG -v` | Every prefix break: where, what changed, how many tokens sit behind it. |
90
+ | `verify LOG --model M --yes` | Replays the recommended options against the live API and prints forecast next to measured. |
91
+ | `gaps LOG` | How the forecast changes as pauses between requests grow. |
92
+ | `check LOG --min-reusable 0.5` | For pipelines: exit status 1 when too little of the prompt is reusable. |
93
+ | `capture --out LOG` | Logging proxy. |
94
+ | `rules` | Rule ids. |
95
+
96
+ `--learn-from OTHER.jsonl` learns the breakpoint plan from one log and scores another, for
97
+ an out-of-sample forecast.
98
+
99
+ ### Log formats
100
+
101
+ One JSON object per line; formats can be mixed in one file:
102
+
103
+ - a `cacheplan capture` line;
104
+ - a raw Anthropic request body;
105
+ - a [promptcachelint](https://github.com/OsmnvAslan/promptcachelint) trace record.
106
+
107
+ ## What it found so far
108
+
109
+ Measured on 23 November 2026 with one model, short sessions. Cost is input cost relative to
110
+ the same prompts sent without caching.
111
+
112
+ | Application | Layout | Automatic caching | cacheplan | Source |
113
+ | --- | --- | --- | --- | --- |
114
+ | LangChain ReAct agent template | timestamp in the system prompt | 125% | 51% with the prompt fix | live API |
115
+ | Aider | finished turns inserted mid-prompt | 125% | 66% with planned breakpoints (Aider's own caching: 67%) | live API, plan learned on a different session |
116
+ | Claude Code | append-only conversation | 27% | 27%: nothing to change | local model |
117
+
118
+ The local model's forecast was within two points of the live measurement in every comparison.
119
+
120
+ ## Limits
121
+
122
+ - **Small evidence base.** Three applications, one or two short sessions each.
123
+ - **The forecast is a model.** It follows the documented caching rules; token counts are
124
+ estimated at three characters per token. Use `verify` before acting on a close call.
125
+ - **The minimum cacheable length varies by model.** The default is 1,024 tokens; set
126
+ `--min-tokens` for yours.
127
+ - **The prompt fix changes what the model reads.** It never drops content, but its effect on
128
+ answer quality is not measured. Treat it as a suggestion to implement and test yourself.
129
+ - **The 1-hour lifetime has had one live check.** The request was accepted and the read share matched the forecast; its price is taken from the documentation.
130
+ - **Plans are learned from the log you give it.** A short or unrepresentative log gives a
131
+ poor plan. Use `--learn-from` to test on a second log.
132
+ - **Anthropic only.** OpenAI and others are planned.
133
+
134
+ ## Related tools
135
+
136
+ [promptcachelint](https://github.com/OsmnvAslan/promptcachelint) and
137
+ [cachelint](https://github.com/Diafyx/cachelint) explain why a prompt cache missed, and both
138
+ support OpenAI as well. `cacheplan` overlaps with them on diagnosis and adds the forecast,
139
+ the breakpoint plan, the lifetime choice and live verification.
140
+
141
+ ## Development
142
+
143
+ ```
144
+ pip install -e ".[dev]"
145
+ python -m pytest -q
146
+ ```
147
+
148
+ Licence: Apache-2.0.
@@ -0,0 +1,129 @@
1
+ # cacheplan
2
+
3
+ Diagnose LLM prompt caching, forecast what each setting would cost, and plan the fix.
4
+
5
+ Prompt caching can cut input cost by more than half, or raise it by a quarter. Which one
6
+ you get depends on how your application builds its prompts and how fast requests arrive.
7
+ `cacheplan` reads a log of your requests and tells you, per application:
8
+
9
+ - **where and why** the reusable prefix breaks (a timestamp in the system prompt, tools in
10
+ a different order, new turns inserted before content that was already sent);
11
+ - **what each option would cost**: caching off, automatic caching, planned breakpoints, with
12
+ the 5-minute or the 1-hour lifetime, from a local model of the provider's caching rules;
13
+ - **what to do**: the cheapest simple option, where to put the breakpoints, and whether a
14
+ small prompt change would unlock more;
15
+ - **whether the forecast is right**: an optional replay against the live API, one output
16
+ token per request.
17
+
18
+ It runs locally, has no dependencies, and needs no API key except for the live check.
19
+ Status: early alpha. Anthropic Messages API only.
20
+
21
+ ## Install
22
+
23
+ ```
24
+ pip install --pre cacheplan
25
+ ```
26
+
27
+ ## Use
28
+
29
+ ```
30
+ cacheplan report requests.jsonl
31
+ ```
32
+
33
+ Example output, abridged (LangChain's ReAct agent template):
34
+
35
+ ```
36
+ react-template
37
+ 17 requests, ~113,000 input tokens (estimate)
38
+ Layout changing content at the top of the prompt
39
+ Reusable 2% of input tokens repeat an earlier prefix as written
40
+ Pace median 4 s between requests; 6% of pauses over 5 minutes
41
+
42
+ Option Read Cost vs no caching
43
+ Caching off 0% 100% <- recommended
44
+ Automatic caching, 5-minute 0% 125%
45
+ Planned breakpoints, 5-minute 0% 100%
46
+ Prompt fix + breakpoints, 5-minute 62% 53%
47
+
48
+ Recommendation: leave caching off as the prompts stand.
49
+ With the prompt fix in the findings: 53%. It changes what the model reads,
50
+ so compare answer quality before adopting it.
51
+
52
+ Findings
53
+ CP001 system value <<system_time>> changes between requests; everything after it,
54
+ including the conversation history, cannot be reused
55
+ fix: move it to the latest user message, or make it change rarely
56
+ ```
57
+
58
+ No log yet? Record one. The proxy writes request bodies only; headers, and so your API
59
+ key, never reach the file.
60
+
61
+ ```
62
+ cacheplan capture --out requests.jsonl --app my-app
63
+ # in the shell that runs your application:
64
+ # ANTHROPIC_BASE_URL=http://127.0.0.1:8787
65
+ ```
66
+
67
+ | Command | What it does |
68
+ | --- | --- |
69
+ | `report LOG` | Diagnosis, forecast and recommendation per application. `--json`, `--no-content`, `--fail-on CP001,CP002`. |
70
+ | `diagnose LOG -v` | Every prefix break: where, what changed, how many tokens sit behind it. |
71
+ | `verify LOG --model M --yes` | Replays the recommended options against the live API and prints forecast next to measured. |
72
+ | `gaps LOG` | How the forecast changes as pauses between requests grow. |
73
+ | `check LOG --min-reusable 0.5` | For pipelines: exit status 1 when too little of the prompt is reusable. |
74
+ | `capture --out LOG` | Logging proxy. |
75
+ | `rules` | Rule ids. |
76
+
77
+ `--learn-from OTHER.jsonl` learns the breakpoint plan from one log and scores another, for
78
+ an out-of-sample forecast.
79
+
80
+ ### Log formats
81
+
82
+ One JSON object per line; formats can be mixed in one file:
83
+
84
+ - a `cacheplan capture` line;
85
+ - a raw Anthropic request body;
86
+ - a [promptcachelint](https://github.com/OsmnvAslan/promptcachelint) trace record.
87
+
88
+ ## What it found so far
89
+
90
+ Measured on 23 November 2026 with one model, short sessions. Cost is input cost relative to
91
+ the same prompts sent without caching.
92
+
93
+ | Application | Layout | Automatic caching | cacheplan | Source |
94
+ | --- | --- | --- | --- | --- |
95
+ | LangChain ReAct agent template | timestamp in the system prompt | 125% | 51% with the prompt fix | live API |
96
+ | Aider | finished turns inserted mid-prompt | 125% | 66% with planned breakpoints (Aider's own caching: 67%) | live API, plan learned on a different session |
97
+ | Claude Code | append-only conversation | 27% | 27%: nothing to change | local model |
98
+
99
+ The local model's forecast was within two points of the live measurement in every comparison.
100
+
101
+ ## Limits
102
+
103
+ - **Small evidence base.** Three applications, one or two short sessions each.
104
+ - **The forecast is a model.** It follows the documented caching rules; token counts are
105
+ estimated at three characters per token. Use `verify` before acting on a close call.
106
+ - **The minimum cacheable length varies by model.** The default is 1,024 tokens; set
107
+ `--min-tokens` for yours.
108
+ - **The prompt fix changes what the model reads.** It never drops content, but its effect on
109
+ answer quality is not measured. Treat it as a suggestion to implement and test yourself.
110
+ - **The 1-hour lifetime has had one live check.** The request was accepted and the read share matched the forecast; its price is taken from the documentation.
111
+ - **Plans are learned from the log you give it.** A short or unrepresentative log gives a
112
+ poor plan. Use `--learn-from` to test on a second log.
113
+ - **Anthropic only.** OpenAI and others are planned.
114
+
115
+ ## Related tools
116
+
117
+ [promptcachelint](https://github.com/OsmnvAslan/promptcachelint) and
118
+ [cachelint](https://github.com/Diafyx/cachelint) explain why a prompt cache missed, and both
119
+ support OpenAI as well. `cacheplan` overlaps with them on diagnosis and adds the forecast,
120
+ the breakpoint plan, the lifetime choice and live verification.
121
+
122
+ ## Development
123
+
124
+ ```
125
+ pip install -e ".[dev]"
126
+ python -m pytest -q
127
+ ```
128
+
129
+ Licence: Apache-2.0.
@@ -0,0 +1,44 @@
1
+ [build-system]
2
+ requires = ["hatchling>=1.24"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "cacheplan"
7
+ dynamic = ["version"]
8
+ description = "Diagnose LLM prompt caching, forecast what each setting would cost, and plan the fix."
9
+ readme = "README.md"
10
+ license = "Apache-2.0"
11
+ license-files = ["LICENSE"]
12
+ requires-python = ">=3.10"
13
+ authors = [{ name = "Shamik Saha" }]
14
+ keywords = ["llm", "prompt caching", "anthropic", "claude", "cost", "cache", "linter"]
15
+ classifiers = [
16
+ "Development Status :: 3 - Alpha",
17
+ "Intended Audience :: Developers",
18
+ "Programming Language :: Python :: 3",
19
+ "Topic :: Software Development :: Quality Assurance",
20
+ ]
21
+ dependencies = []
22
+
23
+ [project.optional-dependencies]
24
+ dev = ["pytest>=8"]
25
+
26
+ [project.urls]
27
+ Homepage = "https://github.com/shamiksaharcciit-oss/cacheplan"
28
+ Issues = "https://github.com/shamiksaharcciit-oss/cacheplan/issues"
29
+
30
+ [project.scripts]
31
+ cacheplan = "cacheplan.cli:main"
32
+
33
+ [tool.hatch.version]
34
+ path = "src/cacheplan/__init__.py"
35
+
36
+ [tool.hatch.build.targets.wheel]
37
+ packages = ["src/cacheplan"]
38
+
39
+ [tool.hatch.build.targets.sdist]
40
+ include = ["src", "tests", "README.md", "LICENSE", "CHANGELOG.md"]
41
+
42
+ [tool.pytest.ini_options]
43
+ testpaths = ["tests"]
44
+ pythonpath = ["src", "."]
@@ -0,0 +1,3 @@
1
+ """cacheplan: diagnose LLM prompt caching, forecast what each setting would cost,
2
+ and plan the fix. See https://github.com/shamiksaharcciit-oss/cacheplan"""
3
+ __version__ = "0.1.0a1"
@@ -0,0 +1,3 @@
1
+ from .cli import main
2
+
3
+ raise SystemExit(main())