Skip to content
shpitdevPublic

About

Excalidraw AI + 'Rough' Icon theming + OpenCode Plugin/Tools: supports creating 4 types of digrams (more soon), modifying existing diagrams, png extract, visual grading

Topics

Resources

Stars

13 stars

Watchers

0 watching

Forks

Latest commit

 

History

1,400 Commits

Folders and files

Repository files navigation

Sketchi

Sketchi

Excalidraw diagrams from a description.
Describe a system or a process in a sentence. Sketchi draws it with each product's logo, and every part stays editable.

Website npm version Nx Cloudflare Workers TypeScript Excalidraw MIT license


The Sketchi wordmark beside a hand-drawn architecture diagram Sketchi made: a Next.js app on Vercel and a GitHub webhook call an API on Cloudflare Workers, which reads Postgres and caches in Redis.

Sketchi works from a sentence, or from a typed spec that an agent or the CLI writes. A model's answer is never the drawing: it is parsed into a typed diagram, validated, laid out by code, converted to real Excalidraw elements, and stored with a PNG. It draws flowcharts (with groups, swimlanes and architecture zones), mindmaps, sequence diagrams, timelines, bar, line and pie charts, state machines, Gantt charts, ER diagrams, UML class diagrams, org charts, Venn diagrams, user journey maps, Sankey diagrams, UI wireframes and quadrant charts.

Use it

CLI. Install the sketchi command and turn a description into a PNG you can revise later. Generation needs no account or API key; authoring, editing and export work offline.

curl -fsSL https://sketchi.app/install.sh | sh   # or: npm install -g sketchi
sketchi generate --prompt "Deploy with GitHub Actions, Docker and Cloudflare Workers"

The CLI guide covers every command, and the changelog what changed.

Agents. Codex, Claude Code, Antigravity and OpenCode draw through the public MCP server at https://playground.sketchi.app/mcp, with no login or local browser. The agent quickstart installs the plugin or skill for each, and the Code Mode API page describes the server.

Browser. playground.sketchi.app drafts and edits diagrams in chat, and icons.sketchi.app is the icon library diagrams draw their logos from.

How it works

prompt ─▶ model candidate ─▶ typed diagram ─▶ deterministic layout ─▶ Excalidraw scene ─▶ stored artifact + PNG
                                  ▲
                       spec from the CLI or MCP
Package Owns
packages/diagrams family contracts, layout, readout, shared graph, build and generation
packages/cloudflare the AI Gateway binding adapter, the Jev Workers AI adapter and the stateless MCP host Studio and Icons share
packages/drawing Excalidraw conversion, real-scene validation and SVG import
tools/scenarios maintained scenarios and the scenario CLI
packages/editor-surface reusable React drawing surface (Nx editor-surface)
packages/icons/* the icon catalog and search, community icons, and hand-drawn logos
packages/observability best-effort request span export for Studio and Icons
packages/ui shadcn primitives, tokens and Sketchi's line icons for the Tailwind apps
packages/social-card the link-preview card images Web and Icons build
App (apps/) Nx project Serves
cli sketchi-cli the sketchi command
studio studio playground.sketchi.app: Studio, the HTTP API and the MCP server
web web sketchi.app: home, docs and agent setup
icons icons icons.sketchi.app
editor editor an internal Excalidraw workspace for checking real scenes

Every app except the CLI is a Cloudflare Worker. See the architecture guide and, for each family, adding a diagram family.

Development

mise pins Node and pnpm:

mise trust && mise install
pnpm install
pnpm dev                    # all four Worker apps
pnpm nx dev studio          # one app
App Local URL
Web http://127.0.0.1:6201
Editor http://127.0.0.1:6202
Icons http://127.0.0.1:6203
Studio http://127.0.0.1:6210

Both commands run the Alchemy stack with alchemy dev: each app in local workerd under Vite, with hot reload, on fixed ports that fail if taken. D1, R2 and Durable Objects are local. Web and Editor need no Cloudflare account. Icons and Studio bind Workers AI (and Studio Browser Run) remotely, so they need CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_API_TOKEN for the Sketchi account, e.g. in a gitignored mise.local.toml [env] table alongside INFISICAL_PROJECT_ID. To make Web link to local Icons and Studio, see Web's local setup.

pnpm ci:local is the gate: lint and format, typecheck with the native TypeScript 7 compiler, build and test for every project the change affects, plus the tooling and deploy checks. Remote CI on a pull request is one Nx-affected typecheck. AGENTS.md lists the full gate required for signoff and the checks some changes add.

For optional visual review, pnpm storybook starts the diagram family gallery and pnpm build-storybook builds it locally.

A CLI change that should ship gets a changeset (pnpm changeset); merging the Version Packages pull request publishes it.

Graded evals run outside this repository against the scenarios in tools/scenarios. pnpm sanity runs three end-to-end checks against production or a preview.

Deployment

Production is an Alchemy stack: a push to main deploys the apps its changes reach, with their Cloudflare resources and custom domains. A pull request gets preview Workers when it carries the preview label; see preview and production deployments.

License

MIT. See LICENSE.

About

Excalidraw AI + 'Rough' Icon theming + OpenCode Plugin/Tools: supports creating 4 types of digrams (more soon), modifying existing diagrams, png extract, visual grading

Topics

Resources

Stars

13 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages