Skip to main content

kedge

CI PyPI Python Licence

Turn manual Excel processes into reviewable, reproducible marimo notebooks, with an AI copilot that operates the notebook through a controlled tool surface.

Status: under active construction. See PLAN.md for the full brief.

What it does

  1. Analyses a workbook offline — formula regions, dependency graph, SQL connections, Power Query M, cached values, and a findings list (circular refs, volatile functions, IFERROR swallowing, inconsistent formulas within a region).
  2. Plans the conversion — an AI-proposed, user-approved ProcessPlan describing stages, open questions, and what it intends to drop.
  3. Scaffolds a marimo notebook from the approved plan.
  4. Reconciles the generated Python against the values Excel last cached, so the translation checks itself against evidence rather than declaring itself finished.

Quick start

uv tool install kedge
kedge hub                  # a browser landing page: every workbook kedge has seen
kedge open process.xlsx    # straight to one, if you already know which

kedge hub starts the server with nothing open and puts a browser on the list. Add a workbook by browsing the filesystem, pasting a path, or dropping one on the page; each row shows whether the file is still there, whether a notebook and an approved plan exist, how many findings the analysis turned up and how much of the workbook the plan believes it can convert. Opening one runs the same sequence kedge open runs — clean up, analyse, plan, scaffold, spawn marimo, bootstrap the session — with the progress streamed into the page, and lands you in the chat-plus-notebook view. Where a marimo kedge started is still running, the hub offers to reattach rather than starting a second.

The AI half needs an endpoint. Open Settings on the hub and give it an OpenAI-compatible base URL, a key and a model — the hosted API, a gateway, or something local. The base URL and model go to ~/.kedge/config.toml; the key goes to the operating system's keyring and never to a file. Until a key is stored, workbooks open in demo mode, where a scripted agent answers and nothing is sent to a model — so the analysis, the scaffold and the notebook all work with no endpoint at all.

Reasoning is set in the same panel, and left unset by default. kedge prefers the responses API because it is the only one that carries a reasoning model's thinking across a tool call, and every kedge turn is tool calls. Neither that choice nor the reasoning setting can end a turn: an endpoint with no /responses route is discovered on the first call and spoken to in chat completions from then on, and a request refused over reasoning is retried without it. Pin api under [model] in ~/.kedge/config.toml to skip the probe.

Or, offline and standalone — the analyser is useful on its own:

kedge inspect process.xlsx --out analysis.json --report report.html

Design notes

  • Generated code is polars, never pandas — enforced in the validation gate.
  • Excel's semantics do not match polars' (rounding mode, empty-vs-null, divide-by-zero). kedge.xl is a registered polars namespace that makes each compatibility choice explicit and greppable: col("amount").xl.round(2).
  • Single-user, local, loopback-bound. No accounts, no server deployment.

Contributing

CONVENTIONS.md is binding — read it before opening a pull request. CLAUDE.md is the shortest useful orientation to the codebase, and RELEASING.md covers how a version tag becomes a release.

uv sync
uv run pytest                       # unit + corpus
uv run pytest -m contract           # live-kernel tests; spawns a real marimo
uv run ruff check . && uv run ruff format --check .
uv run python scripts/guardrails.py

Apache-2.0.

Release files for kedge 0.0.3

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

Source distribution (sdist)

Source distribution for kedge 0.0.3
File Size Uploaded
kedge-0.0.3.tar.gz 862.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kedge 0.0.3
File Interpreter ABI Platform
kedge-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 1.4 MB

Release files / kedge-0.0.3.tar.gz

Download URL kedge-0.0.3.tar.gz
Size 862.3 kB
Tags Source
SHA-256 checksum
How to use checksums
989f0e0894c917e2029c23118b35068646ee2d1070dd1da0a37fd8fbafd4f5a4
BLAKE2b-256 checksum
How to use checksums
119e1b15fb06fffe318594663c2562e226dadc3171f5c9a695caa3d00dc6cb7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 1, 2026.

Transparency log

Release files / kedge-0.0.3-py3-none-any.whl

Download URL kedge-0.0.3-py3-none-any.whl
Size 543.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
580e80c065672aaa00bf7aac58914ec361e259f64d7f4f3735e6807192aa2e1d
BLAKE2b-256 checksum
How to use checksums
70ac6b6ea189435047ce404baec310c6dac69650973a1f00386e6c5a2e1f0316
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 1, 2026.

Transparency log

Release history Release notifications | RSS feed

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

This release

0.0.3 This release

2 release files

0.0.1

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