https://github.com/mcclowes/vague-playground
https://github.com/mcclowes/vague-playground
data playground programming
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/mcclowes/vague-playground
- Owner: mcclowes
- Created: 2025-12-17T15:35:31.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2026-01-12T09:23:36.000Z (5 months ago)
- Last Synced: 2026-01-12T18:40:49.387Z (5 months ago)
- Topics: data, playground, programming
- Language: TypeScript
- Homepage: https://vague.mcclowes.com
- Size: 459 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Vague playground
A web-based playground for testing and experimenting with [Vague](https://github.com/mcclowes/vague), a constraint-based data generation language.
## Features
- Interactive code editor with syntax highlighting
- Real-time syntax validation with inline errors
- JSON/CSV output formats
- File import with automatic schema inference
- Code persistence (localStorage)
- Keyboard shortcuts (⌘/Ctrl+Enter to run)
- Preloaded example schemas
- Dark/light mode with system preference support
## Getting Started
```bash
npm install
npm run dev
```
Open [http://localhost:3000](http://localhost:3000) in your browser.
## Scripts
| Command | Description |
| ------------------ | ------------------------- |
| `npm run dev` | Start development server |
| `npm run build` | Create production build |
| `npm run start` | Start production server |
| `npm run lint` | Run ESLint |
| `npm run format` | Format code with Prettier |
| `npm run test` | Run tests (watch mode) |
| `npm run test:run` | Run tests once |
## Example Vague Code
```vague
schema Customer {
name: string,
status: 0.8: "active" | 0.2: "inactive"
}
schema Invoice {
customer: any of customers,
amount: decimal in 100..10000,
status: "draft" | "sent" | "paid",
assume amount > 0
}
dataset TestData {
customers: 50 of Customer,
invoices: 200 of Invoice
}
```
## Links
- [Vague Language Repository](https://github.com/mcclowes/vague)
- [vague-lang on npm](https://www.npmjs.com/package/vague-lang)