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
Markdown
# π 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