Metadata-Version: 2.5
Name: crudecode
Version: 0.1.0a2
Summary: Decline-curve forecast echo and valuation economics for oil & gas wells, run in your own sandbox. Pairs with the Crude Code MCP data server.
Project-URL: Homepage, https://crudecode.dev
Author: Crude Code
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: decline curve,llm,mcp,npv,oil and gas,valuation
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.11
Requires-Dist: numpy>=1.26
Requires-Dist: python-dateutil>=2.8
Description-Content-Type: text/markdown

# crudecode

The calculator half of Crude Code. The [Crude Code MCP server](https://crudecode.dev)
serves US well data from state filings; this package is what an LLM (any LLM
with a Python sandbox) runs on that data: the decline-curve forecast echo and
the valuation economics. It takes the same two inputs the old server-side tools
took and prints the same results; only where the code runs changed.

```bash
pip install --break-system-packages crudecode==0.1.0a2
crudecode forecast forecasts.json     # commit decline curves, print the echo
crudecode value params.json           # NPV by status, plus wells_monthly.csv, parameters.csv, README.txt
crudecode doctrine                    # the forecasting method (optional reference)
```

* `forecasts.json` is the list of forecast entries (a well or a cohort: `wells`,
  `oil` / `gas` `{qi, di, b}`, `anchor_month`, `uptime_factor`, `struck_months`,
  `rationale`, `analog_cohort`). The well facts come from the server's
  `deal_inputs` tool, saved as `deal_inputs.json`. Committed curves are kept in
  `crudecode_run.json`; re-asserting a well replaces just that well.
* `params.json` is the deal terms (`interest_type`, `interest`, `asset_list`,
  `economics_overrides`). Flat price deck only; there is no futures strip.
* The field-by-field forms are the `get_toolkit` tool's description on the server.

Two dependencies (numpy, python-dateutil), no network calls, plain JSON/CSV
outputs. Apache-2.0. The tests carry results frozen from the old engine
(`tests/golden/`).
