glyphsmith
v0.1.1
Published
Agent-native SVG editor powered by Geometry AST and patch-based editing.
Readme
GlyphSmith is an SVG editor designed for both manual editing and AI-assisted editing. Instead of asking agents to rewrite whole SVG strings, GlyphSmith imports SVG into a Geometry AST, applies targeted patch operations, and exports SVG only at the boundary.

SVG
↓ Import
Geometry AST
↓ Patch Operations
Geometry AST
↓ Export
SVGStatus
GlyphSmith is in early development. The current release is CLI-first and focuses on local editor sessions, project files, SVG export, and MCP-based agent workflows.
Quick Start
Install GlyphSmith:
npm install -g glyphsmithStart a new project:
glyphsmith my-logoThis opens ./my-logo.gs.json. If the file does not exist, GlyphSmith creates it automatically.
You can also run it without a global install:
npx glyphsmith my-logoAgent Workflow
GlyphSmith keeps the Geometry AST as the source of truth. AI agents should modify projects through patch operations or MCP tools instead of regenerating SVG files.
Default local MCP endpoint:
http://127.0.0.1:6202/mcpRegister the local MCP endpoint:
glyphsmith mcp install codex --url http://127.0.0.1:6202/mcp
glyphsmith mcp install claude --url http://127.0.0.1:6202/mcpInstall GlyphSmith skills:
glyphsmith skills install codex
glyphsmith skills install claudeProject Files
GlyphSmith project files use the .gs.json extension and can contain multiple pages. One page maps to one SVG-equivalent Geometry AST document.
Examples:
examples/playground.gs.json
examples/glyphsmith.gs.jsonCLI path resolution is deterministic:
glyphsmith -> ./glyphsmith.gs.json
glyphsmith logo -> ./logo.gs.json
glyphsmith logo.gs.json -> ./logo.gs.jsonIf the resolved project file does not exist, the CLI creates it and continues.
Repository Layout
apps/
├ cli/ Local host, CLI entrypoint, MCP coordination
└ web/ SvelteKit editor UI
packages/
├ ast/ Geometry AST definitions
├ editor/ Reusable editor interaction logic
├ kernel/ Geometry operations
├ mcp/ MCP server implementation
└ svg/ SVG import/exportREADME Assets
README images live in docs/images. App runtime assets live in apps/web/static.
Current README assets:
docs/images/app-icon.svg
docs/images/editor.pngDeveloper Workflow
Install dependencies:
pnpm installRun GlyphSmith from this repository:
pnpm run build:cli
node apps/cli/dist/index.js my-logoRun the default development project:
pnpm run devDevelopment defaults:
Project: examples/playground.gs.json
UI: http://localhost:6201
Host: ws://localhost:6202/ws
MCP: http://localhost:6202/mcpRun the official GlyphSmith icon project:
pnpm run dev:iconsExport Icons
Export the icon project into the web app static directory:
pnpm run export:iconsThe generated SVG files are written to:
apps/web/static/iconsRunning the command again overwrites the generated icon output.
Package
Build the publishable CLI package:
pnpm run build:cliCreate a local npm tarball for inspection:
pnpm run pack:cliThe package is written to artifacts/npm and contains the bundled CLI, built web UI, and GlyphSmith skills.
