KnitPlot is a local-first, open-source colourwork chart maker for knitters. Draw charts stitch by stitch, turn an image into a limited-colour chart, preview the result as knitted fabric, and follow it row by row in Knit Mode.
The core app is free to use and does not need an account or API key. Optional accounts add private cross-device chart saves. Image generation and prompt-based editing use each user's own OpenAI API key.
Open the hosted chart maker at knitplot.art. Every non-AI tool works without an account and saves the current workspace in that browser. An optional account adds a private My Charts library, cross-device saves, and a secure connection for a personal OpenAI API key.
- Draw, erase, flood-fill, and fill rectangular selections
- Choose up to eight custom colours
- Work with charts up to 100 stitches by 100 rows
- Set stitch gauge, row gauge, and centimetres or inches
- Zoom the editable chart and use optional live-symmetry guides
- Flip, rotate, undo, and redo chart changes
- Work on up to eight charts in browser tabs
- Import PNG, JPEG, or WebP images, then crop, position, resize, and reduce them to a stitch palette
- Preview normal or mirrored repeats as textured knitted fabric
- Create printable charts and written row-by-row colour sequences
- Choose stranded, intarsia, or duplicate stitch instructions
- Use Knit Mode with row and stitch progress, optional design-only cropping, and stitch markers
- Download chart and preview PNGs or save an editable
.knitplotproject file
- Generate a new chart from a text prompt
- Include a reference image while generating
- Revise the generated draft with another prompt before importing it
- Edit the currently open chart with a prompt
AI requests consume credits on the OpenAI account connected to your key. The app always labels those actions before it sends a request.
You need Node.js 20 or newer.
Download or clone this repository, open a terminal in the KnitPlot project folder, and run:
npm install
cp .env.example .env.local
npm run devOpen the local address shown in the terminal, usually http://localhost:3000.
Without any environment variables, the full non-AI chart maker works locally. For a private local installation, AI can use a server-side key:
OPENAI_API_KEY=your_key_hereNever commit or share .env.local. It is ignored by Git.
KnitPlot uses Clerk for optional accounts and Neon Postgres for private chart storage. The editor itself does not depend on either service.
- Create or connect Clerk and Neon resources. Vercel Marketplace can inject their environment variables automatically.
- Run
database/migrations/001_accounts_and_cloud_charts.sqlagainst the Neon database. - Set the Clerk and Neon values from
.env.examplein.env.localand in Vercel. GenerateOPENAI_KEY_ENCRYPTION_SECRETwithopenssl rand -base64 32and never change or expose it while saved API keys exist.
CLERK_SECRET_KEY, DATABASE_URL, and OPENAI_KEY_ENCRYPTION_SECRET are server-only secrets. Never prefix them with NEXT_PUBLIC_ or commit them.
On a public deployment, leave ENABLE_SHARED_OPENAI_KEY=false. This requires each signed-in user to connect their own OpenAI key instead of spending the site owner's credits.
- Your open chart workspace and Knit Mode position are saved automatically in that browser's local storage.
- Signed-in users can choose Save to My Charts. After the first cloud save, that chart is kept in sync while it remains open.
- Save chart downloads the active chart as an editable
.knitplotfile. It does not bundle every open browser tab. - Ordinary image importing and colour reduction happen in your browser.
- When you use an AI feature, its prompt and any attached or current-chart image are sent through KnitPlot's server to OpenAI using your connected key.
- Connected OpenAI keys are encrypted with AES-256-GCM before Neon storage and are never returned to the browser. Only the final four characters are shown for identification.
- KnitPlot stores no AI prompts or generated images in the account database. It stores request timestamps only for the 30-per-hour safety limit.
- KnitPlot has no analytics.
Browser storage is convenient, but it is not a backup. Download important charts as .knitplot files.
npm run typecheck
npm run buildRun both with:
npm run checkBug reports, feature ideas, documentation fixes, and code contributions are welcome. See CONTRIBUTING.md before opening a pull request. Please report sensitive security problems as described in SECURITY.md.
KnitPlot is free and open source. If it is useful to you, an optional support link may be added here in the future. There will never be a payment requirement inside the chart maker.
KnitPlot's source code is available under the MIT License. The knitted-preview texture is described in public/textures/LICENSE.md.