UNPKG

promptlang

Version:

PromptLang β€” compile simple design prompts into HTML (Tailwind) and optionally use Gemini to translate freeform prompts into the DSL.

111 lines (80 loc) β€’ 2.38 kB
# 🌐 PromptLang – AI Powered Website Builder PromptLang is an **AI-first CLI tool** that generates complete websites from a natural language prompt. It uses **Google Gemini AI** and **UI templates (React, Vue, HTML)** to scaffold projects instantly. --- ## πŸš€ Features - Generate full websites by typing a **single prompt** - Choose from **React, Vue, or HTML templates** - AI customizes UI: hero sections, features, footers, colors, etc. - Outputs a ready-to-run project (`./output/`) - Open source & community-driven --- ## πŸ“¦ Installation ### From npm (after publish): ```bash npm install -g promptlang ``` ### From source: ```bash git clone https://github.com/yourusername/promptlang.git cd promptlang npm install npm link # test globally ``` --- ## πŸ”‘ Setup API Key PromptLang uses the **Google Gemini API**. Get your key here: [Google AI Studio](https://makersuite.google.com/app/apikey) Then set it: ```bash export GEMINI_API_KEY="your_api_key_here" ``` (Windows PowerShell) ```powershell $env:GEMINI_API_KEY="your_api_key_here" ``` --- ## πŸ–₯ Usage ### Generate a project: ```bash promptlang --ai "create a dark portfolio site with a hero titled 'AI Designer' and 3 project cards" ``` ### Output: - Gemini chooses a template (React/Vue/HTML). - Template is unpacked into `./output/`. - AI applies overrides β†’ finished website. --- ## πŸ“‚ Example Workflow ```bash promptlang --ai "make a SaaS landing page in React with hero 'AI Builder', dark theme, and features section" ``` **Result:** - `output/package.json` - `output/src/App.jsx` (overridden by AI) - `output/src/components/Hero.jsx` (generated by AI) --- ## πŸ›  Development Run locally: ```bash node ./src/cli.js --ai "your prompt here" ``` Test with npm link: ```bash npm link promptlang --ai "create a portfolio in html" ``` --- ## 🀝 Contributing We’re building a **template library**! πŸš€ You can contribute by: - Adding new templates (React, Vue, HTML, Next.js, etc.) - Creating design variations (Tailwind, Bootstrap, Chakra UI) - Improving AI prompt instructions πŸ‘‰ Star ⭐ the repo and open a PR with your template or improvements. --- ## πŸ“œ License MIT License – free to use, modify, and share. --- ## πŸ™Œ Acknowledgements - [Google Gemini API](https://ai.google.dev/) - Open source contributors