An intelligent design system manager that bridges Figma, tokens, and code - enabling conversational component discovery, safe token syncing, and UI consistency across development cycles.
- Token Intelligence Core - Enhanced Figma β Code sync with validation
- Design System Knowledge Base - YAML-based rules converted to AI-consumable JSON
- Component Token Mapping - Track which components use which tokens
- Comprehensive Auditing - Detect unused tokens, naming issues, and contrast violations
- AI Chat Interface - Chat with your design system inside Figma
- Component Suggestion Engine - AI recommends existing components or identifies gaps
- Design Assembly Bot - Auto-compose layouts from existing components
- Component Lock System - Mark tokenized components as production-safe
- Code Generation Templates - Export components as React/Tailwind code
- Sync Workflow Integration - One command to sync everything
- Standalone Plugin Package - For non-Cursor users
- Export Package for Developers - Download sync scripts + token files
- Monetization Setup - License system and usage analytics
# Clone the repository
git clone https://github.com/your-username/design-system-gpt.git
cd design-system-gpt
# Install dependencies
npm install
# Build the knowledge base
npm run build# Sync tokens from Figma to code
npm run ds-gpt sync
# Audit design tokens for issues
npm run ds-gpt audit
# Build knowledge base and component mappings
npm run ds-gpt build
# Show design system status
npm run ds-gpt status
# Get help
npm run ds-gpt help- Open Figma
- Go to Plugins β Development β Import plugin from manifest
- Select the manifest file for the plugin you want:
figma-plugin/chat/manifest.jsonfor Design System GPT Chatfigma-plugin/variable-updater/manifest.jsonfor Variable Updaterfigma-plugin/token-sync/manifest.jsonfor Token Sync
- Run the plugin
- Start using your design system!
design-system-gpt/
βββ figma-plugin/ # Figma plugin files
β βββ chat-ui.html # Chat interface
β βββ chat-plugin.js # Plugin logic
β βββ manifest.json # Plugin manifest
βββ scripts/ # Core scripts
β βββ sync-figma-to-tokens.ts # Token sync engine
β βββ audit-tokens.ts # Token validation
β βββ build-knowledge-base.ts # Knowledge base builder
β βββ map-component-tokens.ts # Component mapper
β βββ token-validator.ts # Validation utilities
βββ docs/ # Documentation
β βββ rules/ # YAML rule definitions
β βββ generated/ # Generated knowledge base
βββ cli/ # Command-line interface
β βββ ds-gpt.ts # Main CLI
βββ src/ # Generated outputs
βββ styles/ # CSS token files
βββ components/ # Generated component code
The system uses a multi-layered knowledge base:
- YAML Rules (
docs/rules/) - Human-readable design rules - JSON Knowledge Base (
docs/generated/) - AI-consumable format - Component Token Map (
docs/component-token-map.json) - Component dependencies - AI Context (
docs/generated/ai-context.json) - Condensed for AI
- Brand Colors - Primary, secondary, accent
- KPI Colors - Positive, negative, warning, neutral
- Surface Colors - Base, elevated, overlay, interactive
- Text Colors - Primary, secondary, tertiary, inverse
- Interactive Colors - Hover, active, disabled states
- Scale - xs (4px) to 3xl (64px)
- Categories - Component internal, external, layout
- Responsive - Mobile, tablet, desktop multipliers
- Font Families - Inter (primary), JetBrains Mono (code)
- Scale - xs (12px) to 6xl (60px)
- Weights - Regular (400) to Bold (700)
- Line Heights - Tight (1.25) to Relaxed (1.75)
- Layout - Container, Grid, Stack, Flex, Spacer
- Navigation - Header, Navigation, Breadcrumb, Pagination, Tabs
- Forms - Input, Textarea, Select, Checkbox, Radio, Button
- Data Display - Card, Table, List, Badge, Tag, Avatar, KPI
- Feedback - Alert, Toast, Modal, Tooltip, Progress, Spinner
Edit scripts/figma-sync.config.json:
{
"figma": {
"collection": "Tokens",
"fileHint": "Design System GPT base"
},
"paths": {
"tokensCss": "src/styles/tokens.css",
"themeCss": "src/styles/theme.css",
"backupDir": "scripts/backups"
},
"prefix": "pi",
"modes": {
"light": "Light",
"dark": "Dark"
},
"types": {
"color": ["color.", "kpi.", "brand.", "surface.", "text."],
"number": ["radius.", "space.", "elevation.", "opacity."],
"string": ["font."]
},
"tailwind": {
"writeTheme": true,
"colorKeys": ["primary","success","warning","danger","info","surface","foreground"],
"radiusKeys": ["md","lg","xl","2xl"]
}
}# Run token audit
npm run audit
# Test sync (dry run)
SYNC_DRY_RUN=1 npm run sync
# Build and test everything
npm run build
npm run ds-gpt statussrc/styles/tokens.css- CSS custom propertiessrc/styles/theme.css- Tailwind theme configuration
docs/generated/design-system-knowledge.json- Full knowledge basedocs/generated/design-system-guide.md- Human-readable guidedocs/generated/ai-context.json- AI context
docs/component-token-map.json- Component dependenciesdocs/component-token-report.md- Usage report
scripts/backups/- Token change backupsscripts/backups/changelog.*.md- Change logs
The system is designed to work with OpenAI's GPT models:
- Knowledge Base - Provides context about design rules and tokens
- Component Mapping - Shows which components use which tokens
- Chat Interface - Natural language interaction with design system
- Suggestion Engine - AI-powered component recommendations
- "What component should I use for displaying KPIs?"
- "Show me all components using Brand Primary"
- "How do I display a success state?"
- "What tokens should a new card component use?"
- "Create a dashboard layout with metrics"
- Enhanced token sync with validation
- Design system knowledge base
- Component token mapping
- Comprehensive auditing system
- Chat interface UI
- Basic plugin logic
- OpenAI API integration
- Component suggestion engine
- Design assembly bot
- Component lock system
- Code generation templates
- Sync workflow integration
- Git integration
- Standalone plugin package
- Export package system
- License and payment system
- Usage analytics
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Figma Plugin API for the plugin framework
- OpenAI API for AI capabilities
- Tailwind CSS for utility-first CSS
- Commander.js for CLI interface
- π§ Email: support@designsystemgpt.com
- π Issues: GitHub Issues
- π¬ Discussions: GitHub Discussions
Made with β€οΈ for design systems that scale