Ship It Right: Schemas, Diffs, Cron, Licenses and Tokens
September 5, 2026 · DevTools
Contracts keep software shippable: schemas pin your data shapes, diffs pin your changes, cron pins your schedule, licenses pin what you may combine, and design tokens pin your visual language. These five tools generate each contract from its source: JSON Schema to TypeScript, Code Diff & Patch Generator, Crontab Natural Language & Heatmap, License Compatibility Matrix, and Design Tokens to Code.
From schema to interfaces without hand-typing
The compiler validates the schema first — supported type values, properties as an object, required as string arrays, anyOf/oneOf as arrays — then emits sorted export interface declarations with optional ? markers derived from required. It resolves local $ref pointers (#, #/$defs/…, #/definitions/… with ~0/~1 escapes), maps enum to string-literal unions, const to a single literal, arrays to T[], and additionalProperties to index signatures. Descriptions become JSDoc comments, and duplicate type names get numeric suffixes so nested address-style objects never collide.
// Input: { "type": "object", "properties": { "name": { "type": "string" } }, "required": ["name"] }
export interface User {
name: string;
}
Feed it the schema you already validate against at runtime and the generated types stay honest by construction.
Diffs you can apply, cron you can read
The diff generator builds hunks with a longest-common-subsequence table, 3 lines of context by default, ---/+++ headers, and @@ -a,b +c,d @@ markers including \ No newline at end of file. Applying is strict: context or removal mismatches throw with a line number instead of silently misapplying, and isUnifiedDiff detects patch text. Empty and new-file cases map to /dev/null correctly.
Cron gets the same rigor. The parser accepts five fields with lists, ranges, and steps plus aliases (@hourly, @daily, @weekly, @monthly, @yearly, @reboot), normalizes Sunday 7 to 0, and implements the classic day rule: month-day and week-day combine with OR when both are restricted, AND otherwise. describeCron turns 0 9 * * 1-5 into "at 09:00 on Monday, Tuesday, Wednesday, Thursday, Friday", getNextCronRuns lists the next 50 runs, and the heatmap bins them into a 24×60 grid so 3 a.m. pileups become visible before they page you.
Licenses and tokens: compatibility with receipts
The matrix covers 15 licenses across five families — permissive, weak-copyleft, copyleft, network-copyleft, and public-domain — and answers the one-way question "dependency X inside project Y". Permissive code (MIT, BSD, ISC) is permitted almost everywhere with notice preservation; Apache-2.0 is permitted in GPL-3.0-family projects but not GPL-2.0; GPL-2.0-only and GPL-3.0 demand the combined work carry their terms; AGPL-3.0 extends copyleft to network interaction. Each verdict ships a rationale plus the dependency's obligations, and checkMatrix grades a whole dependency list at once.
| Dependency → Project | Verdict |
|---|---|
| MIT → anything | Permitted, keep notices |
| Apache-2.0 → GPL-2.0 | Not compatible (patent terms) |
| GPL-3.0 → AGPL-3.0 | Permitted (copyleft preserved) |
| LGPL-3.0 → MIT | Not compatible |
The tokens tool consumes W3C-style JSON ($value, $type, $description) for colors, dimensions, font families/weights, shadows, and radii, resolving {path.to.token} aliases with cycle detection. It emits :root CSS variables, Tailwind v4 @theme blocks, tailwind.config extend objects, or SwiftUI extensions, converting sRGB components to hex along the way.
Try Them
- JSON Schema to TypeScript — compile schemas to interfaces with $ref support.
- Code Diff & Patch Generator — generate unified diffs and apply them safely.
- Crontab Natural Language & Heatmap — explain cron and preview the next 50 runs.
- License Compatibility Matrix — check GPL, MIT, and Apache combinations.
- Design Tokens to Code — convert W3C tokens to CSS, Tailwind, or Swift.