Deterministic, not generative
Rewrites come from a reviewed template catalog, so the same input always produces the same output. Nothing invents a Dockerfile instruction that wasn't vetted first.
Rules catalogOffline-first container optimization
CODI analyzes your Dockerfiles, rewrites them with vetted stack-aware templates, and hands you a signed-off audit trail for every change — running entirely inside your own network.
MIT licensed · Python 3.12 · Node, Python & Java stacks
Before
320 MB
18 layers
FROM node:20 WORKDIR /app COPY . . RUN npm install RUN apt-get update USER root CMD npm start
After −35.9%
205 MB
12 layers
FROM node:20-slim AS build WORKDIR /app COPY package*.json ./ RUN npm ci --omit=dev FROM node:20-slim USER codi CMD ["node","server.js"]
Dry-run estimate from a sample run · results vary by project
The problem
Most teams know their images are too big — bloated base layers, dev dependencies shipped to production, secrets sitting in the build context. The tools that fix it well tend to want your Dockerfile on somebody else's server. If you work under a compliance regime, that's a non-starter.
Rewrites come from a reviewed template catalog, so the same input always produces the same output. Nothing invents a Dockerfile instruction that wasn't vetted first.
Rules catalogEach run writes a Markdown and HTML report with diffs, policy notes, projected metrics, and the rationale for every substitution — ready to hand to a reviewer.
ReportingAir-gap mode is on out of the box. Outbound HTTP is blocked at the client layer, and only hosts you explicitly allowlist can ever be reached.
Security model
Identical capability through the codi CLI and a
FastAPI service, so a laptop, a CI job, and an internal portal
all behave the same way.
How it works
One command runs the whole pipeline and stores every input, candidate, metric, and log under a timestamped run directory you can diff, archive, or audit later.
A tolerant parser reads the Dockerfile, detects the application stack, and flags quality and security smells.
Parser · stack detectorJinja2 templates from the rules catalog generate optimized candidates, with rationale comments inline.
rules.yml · templatesA dry-run estimator projects size, layer, and timing changes, then persists the artifacts for the run.
metrics.json · run storeOptional: a local LLM ranks the candidates and drafts human-readable rationales without any network call.
Optional · on-hostBuilt for regulated environments
CODI was designed for teams who cannot send source artifacts to a third party — defense, finance, healthcare, and anyone running a disconnected data center.
AIRGAP=true blocks outbound HTTP; unapproved hosts
raise an error rather than failing open.
AIRGAP_ALLOWLIST — no wildcards.
codi user.
$ codi run ./checkout-service
✓ stack detected node / next
✓ smells found 4 (1 high, 3 medium)
! runs as root — hardening applied
✓ candidates rendered 3
✓ size 320 MB → 205 MB -35.9%
✓ layers 18 → 12 -6
network blocked (AIRGAP=true)
artifacts runs/20260916T1412Z-node/
report runs/.../reports/report.html
done in 0.65s
Two deployment footprints
Both ship as containers and expose the same CLI and API. Start with Slim in CI; add Complete where you want written rationales without a cloud dependency.
The deterministic engine on its own. Small, fast, and predictable — the right fit for CI pipelines and disconnected stages.
Everything in Slim, plus an embedded llama.cpp runtime that ranks candidates and writes the reasoning behind each recommendation.
/modelsGet started
CODI is open source under the MIT license. Clone it, set up the environment, and point it at a project — the first run works offline with no configuration and no account.
# 1 — clone
$ git clone https://github.com/KiniunCorp/codi.git
$ cd codi
# 2 — set up the environment
$ make setup
$ source .venv/bin/activate
# 3 — optimize and report
$ codi all ./my-service
✓ report written to
runs/<timestamp>/reports/report.html
See it in action
A tour of the pipeline end to end, and a closer look at how the optional local model fits in.
Documentation
Architecture, the rules catalog, the security model, the API contract, and the LLM internals — all documented, all public.
What CODI does, how to install it, and a cheat sheet for the commands you'll use daily.
OverviewModule-by-module design, the technology stack, and the supported deployment models.
System designDay-two runbooks, the security posture, performance budgets, and the reporting artifacts.
OperationsAdd rules, support a new stack, or train and mount your own adapter for the local model.
Rules & templatesPart of KiniunCorp
CODI is built by KiniunCorp, which makes tools for structured, reliable AI-driven engineering. The through line across all three: determinism over cleverness, evidence instead of claims, and a human holding the approvals.
Rewrites Dockerfiles from a vetted template catalog and emits a full audit trail for every change. Runs air-gapped.
Get startedA lightweight process layer around your existing AI chat client — stages, approval gates, and persistent state, so work that needs design doesn't get coded first.
spec-to-ship.com
An agentic software factory, managed by a human. Its
bramo-verify CLI audits a git diff and reports
what it observed — never what an agent claimed.
Get in touch
We work with teams putting CODI into regulated and disconnected environments — air-gapped deployments, custom rule catalogs, and adapters tuned to your own base images. Tell us what you're building and we'll get back to you.
Open source under MIT · built by KiniunCorp