Run Squig locally
Build the editor and run a file companion with no database or hosted collaboration service.
Requirements and setup
Use Node.js 24 and pnpm 10. The companion runs on the same computer as the file and the agent. Install dependencies and build the editor from a Squig checkout. No environment variables or database are needed.
git clone https://github.com/pablostanley/squig.git
cd squig
pnpm install --frozen-lockfile
pnpm build:local
pnpm squig serve /absolute/path/canvas.squig.jsonLocal assets and offline use
pnpm build:local produces editor assets in out/. The companion checks the local-build marker before serving them and resolves assets and fonts from the checkout, even when started from another project. Once dependencies and assets are available, the editor, file saves and rendering can run without a hosted Squig service. An external model provider may still require internet access. Rebuild after updating Squig.
Files and history
Each process owns one selected file. Atomic writes, revision checks and an exclusive session lock protect concurrent access. History lives beside the document in a .squig.json.history directory and is capped at 50 snapshots and 16 MiB per file; older snapshots expire. The .squig.json.lock file identifies the active session. Keep separate backups of important work. Stopping the companion ends live access but leaves the document and retained history on the local disk.
Website deployment
The ordinary website build runs pnpm build and does not require a database migration or readiness check. New canvas storage is local to browsers or companions. Hosting and bandwidth still exist for the public website. Legacy database configuration is needed only if the operator retains recovery access to canvases saved by the old hosted service; it is not part of local operation.
Webxdc
make build-xdc packages the offline browser canvas separately. It does not run a Node companion inside Webxdc. Export a .squig.json to move between them. Webxdc and build:local both use out/, so rebuild the local editor after producing a Webxdc package before starting a companion.
Verify the workflow
Run pnpm lint, pnpm test, pnpm test:agent, pnpm build, pnpm build:local, pnpm test:agent:browser and make build-xdc. Install Chromium once with pnpm exec playwright install chromium. Verify browser edits reach the selected disk file, agent edits appear in the editor, stale writes preserve drafts, metadata survives, and restarting the companion reopens the saved content. Check bounded history and stdio/HTTP transport access with temporary local files. No paid service is required for these checks.