Skip to main content

Artifact Editor Overview

AI-enhanced editor for creating diagrams, sketches, 3D models, and other artifacts from code. Provides a split-view interface with live preview and supports multiple artifact formats.

ResourceURL
Git Repositoryhttps://gitea.brrd.tech/rob/artifact-editor
Local Path~/PycharmProjects/artifact-editor

Core Concept

Artifact Editor provides a unified interface for creating visual artifacts from text-based specifications. Write PlantUML, Mermaid, OpenSCAD, or other formats and see live previews. AI can generate or modify artifacts from natural language descriptions.

┌─────────────────────────────────────────────────────────────────────────┐
│ Artifact Editor │
├─────────────────────────────────────────────────────────────────────────┤
│ │
│ ┌───────────────────────────┬───────────────────────────┐ │
│ │ Code Editor │ Live Preview │ │
│ │ ┌─────────────────────┐ │ ┌─────────────────────┐ │ │
│ │ │ @startuml │ │ │ ┌─────┐ │ │ │
│ │ │ class User { │ │ │ │User │ │ │ │
│ │ │ +name: string │ │ │ ├─────┤ │ │ │
│ │ │ +email: string │ │ │ │+name│ │ │ │
│ │ │ +login() │ │ │ │+email│ │ │ │
│ │ │ } │ │ │ │+login()│ │ │ │
│ │ │ @enduml │ │ │ └─────┘ │ │ │
│ │ └─────────────────────┘ │ └─────────────────────┘ │ │
│ │ │ │ │
│ │ [AI: "Add Order class"] │ [Renders automatically] │ │
│ └───────────────────────────┴───────────────────────────┘ │
│ │
│ ┌──────────────────────────────────────────────────────────────────┐ │
│ │ Formats: PlantUML │ Mermaid │ OpenSCAD │ Code │ SVG │ Excalidraw │ │
│ └──────────────────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────────────┘

Supported Formats

FormatDescriptionUse Case
PlantUMLUML diagramsClass, sequence, activity diagrams
MermaidFlowcharts, sequencesDocumentation, quick diagrams
OpenSCADParametric 3D CAD3D models, mechanical parts
Code500+ languagesSyntax-highlighted code snippets
SVGVector graphicsIcons, logos, interactive graphics
ExcalidrawHand-drawn styleInformal sketches, whiteboard

Key Features

FeatureDescription
Split ViewCode editor + live preview side by side
Live RenderingChanges render automatically
AI Generation"Describe what you want" → code
Interactive SVGClick, drag, resize elements
Format SwitchingChange formats, auto-update extension
100+ TemplatesPre-built diagram templates
Voice InputDictation with 10-second timer
Undo/RedoBoth code and visual changes
3D ControlsRotation, zoom for OpenSCAD
QScintillaProfessional syntax highlighting

Tech Stack

  • Python 3.10+ with PyQt6
  • QScintilla - Syntax highlighting
  • CmdForge - AI tool integration
  • PlantUML - Server or local rendering
  • Mermaid - JavaScript rendering
  • OpenSCAD - Local 3D rendering
  • Pygments - Code highlighting

CLI Tools

# Generate artifact from description
echo "Create a class diagram for a blog system" | artifact-ai --format plantuml

# Export artifact to image
artifact-export diagram.puml --output diagram.png --format png

Quick Start

# Install
cd ~/PycharmProjects/artifact-editor
pip install -e .

# Run GUI
artifact-editor

# Open specific file
artifact-editor diagram.puml

# Generate from CLI
artifact-ai "sequence diagram for user login" > login.puml