A successful clone printed a bare, timestamped app path that wrapped mid-word
in the terminal, so users' `cd` failed and `npm install && npm run dev` ran in
the wrong directory — a confusing failure from a successful clone. Plus there
was no first-party "see it locally" path, no central docs page, "clone" was
conflated with `git clone`, and key hygiene wasn't stated.
CLI (compiler):
- Add compiler/src/cliSummary.ts: a copy-paste-safe success block on stderr — a
single QUOTED `cd "<app>" && npm install && npm run dev` line that survives
terminal wrapping — plus the AGENTS.md safe-to-edit pointers (content.ts,
components/). The machine-readable {"event":"done",...} JSON stays on stdout.
- Add --serve (npm install + npm run dev in the generated app) and --open
(also open the browser at the detected dev URL). Wired into single + multi.
- Add writeLatestPointer(): refresh a runs/<site>/latest symlink to the newest
run so there's a stable, timestamp-free cd/script target. The reuse/regen
scanners already filter to digit-prefixed run dirs, so `latest` is ignored.
- Tests: cliSummary (quoting, single-line command, Next/Vite roots, stable-path
preference, --serve/--open hint) and runsLayout (symlink write + in-place
refresh, timestamp-free stable path).
Docs:
- Add docs/README.md as a central documentation index.
- State prominently that ditto "cloning" = generating a codebase from a live
URL, NOT `git clone` (no source repo required), in README + docs hub.
- Add "keys are secrets: use $DITTO_API_KEY, never inline/commit, rotate
anytime" beside the key/auth examples in README + docs/SERVICE.md.
- Document --serve/--open and the latest symlink in README + compiler/README.
Note: the live ditto.site/docs web route and the dashboard's inline-token
snippet live in the marketing-site repo and still need a change there.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
4.8 KiB
4.8 KiB
Changelog
All notable changes to this project are documented here. The format is based on Keep a Changelog; this project is pre-1.0, so minor/patch semantics are not yet guaranteed.
[Unreleased]
Changed — Local CLI success output and orientation
- The
clone-staticCLI now prints a copy-paste-safe success summary to stderr: a single quotedcd "<app>" && npm install && npm run devline (survives terminal wrapping — no more brokencdfrom a wrapped timestamped path) plus the keyAGENTS.mdsafe-to-edit pointers (src/app/content.ts,src/app/components/). The machine-readable{ "event": "done", ... }JSON line on stdout is unchanged (now also carryingstableApp). - Added
--serve(runnpm install+npm run devin the generated app) and--open(also launch the browser at the dev URL) so "see it locally" is one flag. - In the default runs layout, each clone now refreshes a
runs/<site>/latestsymlink pointing at the newest run, giving a stable, timestamp-free path forcdand scripts.
Added — Docs hub and terminology/secret-hygiene clarifications
- Added
docs/README.mdas a central documentation index. - Clarified prominently that ditto.site "cloning" means generating a codebase from a
live URL, not
git clone(no source repo required), in the README and docs hub. - Added an explicit "API keys are secrets — use
$DITTO_API_KEY, never inline/commit, rotate anytime" note beside the key/auth examples in the README anddocs/SERVICE.md.
Added — ditto unpack CLI
packages/cli— a zero-dependencydittocommand-line helper.ditto unpack <clone.json|-> <out-dir>turns thefilesmap returned byPOST /v1/clones(orGET /v1/clones/:id/result) into a real project tree on disk: text files written inline, binary assets materialized from inline base64 or fetched from their reference URL ($DITTO_API_URL/$DITTO_API_KEY), with path-traversal guards andsha256integrity checks. Reads from stdin so acurlresponse can be piped straight in. Documented next to the REST examples in the README anddocs/SERVICE.md.
Added — Open-source readiness
- Added support, release, responsible-use, CODEOWNERS, and gitattributes files.
- Made workspace package metadata explicit for license and repository scanners.
- Tightened contributor and PR checklists around runtime audit, documentation, responsible use, and committed artifacts.
Changed — Generated app dependency templates
- Updated generated Next apps to the current Next 15 line with React 19.
- Updated generated Vite apps to Vite 6.4 with React 19, keeping the generated
app Node floor compatible with the repo's
>=20engine policy.
Added — Service layer (REST + MCP API)
A hosted service around the deterministic compiler, as an npm-workspaces monorepo
(packages/*). The compiler's clone behavior is unchanged — only a library boundary
was added.
packages/core— the sole compiler adapter:runCloneJob(temp-dir lifecycle, optional verify),collectFileMap,cacheKey.packages/db— Drizzle schema + migrations (jobs/clones/cache/apiKeys), repo, and a pg-boss queue.packages/storage—ArtifactStore(local disk or S3/R2 via presigned URLs), deterministictgz/zipbundles.packages/api— Hono app: REST routes + MCP (Streamable-HTTP), API-key auth, rate limiting, and SSRF protection.packages/worker— queue consumer with isolated per-workerverifybuild harness; supports multi-page (clone_site) jobs.- Freshness-bounded caching (
CACHE_STALE_AFTER,noCache), Docker images +docker-compose(Postgres + MinIO), CI, and Railway/Neon/R2 deploy docs. - Root CLI passthrough scripts so the compiler CLI runs from the repo root too.
See docs/SERVICE.md and README.md.
Changed — Component extraction keeps styling out of the content model
- Extracted components no longer pull per-instance
classNamestrings into the editable content model (content.ts). When a node's class varies across instances, the tokens common to all instances are baked into the component skeleton and only the per-instance diff is emitted — to a separate_styles.tsplumbing module (alongside_cids.ts), merged back at render time with a generatedcn()helper.content.tsnow holds only semantic fields (text, href, src, alt, …). Render-identical (token order doesn't affect computed style); gates 0–6 and site/determinism unaffected. Swapcnfortailwind-mergeif you want conflict-aware merging when hand-editing the overrides.
Notes
- The deterministic compiler predates this changelog; the current architecture is
summarized in
README.md, with operational service details indocs/SERVICE.md.