A fun, cat-themed programming language with a live web playground. Write code using meow(), purr(), catnap(), and more!
- 📢 Print —
meow("Hello!")to display output - 📦 Variables —
x = 42with full arithmetic support - 🔀 Conditionals —
if (x > 10) { ... } - 🔄 Loops —
while (x < 50) { ... } - 😴 Delays —
catnap(2)pauses execution - 😸 Purring —
purr()because every cat should purr - 🛡️ Error handling —
try { ... } scratch { ... } - 💬 Comments —
~ purr purr this is a comment
Head to the live playground and start coding — no setup needed.
# Clone the repo
git clone https://github.com/harshitt13/meowscript.git
cd meowscript
# Start the frontend
cd Frontend
npm install
npm run dev
# In another terminal — start the backend
cd Backend
npm install
node server.jsFrontend runs at http://localhost:5173, backend at http://localhost:3001.
~ purr purr this is a comment
x = 10
y = 25
sum = x + y
meow("Total: " + sum)
if (x > 10) {
meow("Big number!")
}
i = 0
while (i < 5) {
meow("Meow #" + i)
i = i + 1
}
meow("Getting sleepy...")
catnap(2)
meow("Awake!")
try {
meow(oops)
} scratch {
meow("Caught an error! 😼")
}
~ purr purr Welcome to MeowScript!
x = 5
y = 10
z = x + y
meow("The sum is: " + z)
if (z > 10) {
meow("😺 " + z + " is greater than 10!")
}
purr()
while (z < 20) {
z = z + 2
meow("z is now: " + z)
}
Output:
The sum is: 15
😺 15 is greater than 10!
😸 Purring...
z is now: 17
z is now: 19
z is now: 21
meowscript/
├── Backend/
│ ├── interpreter.js # MeowScript interpreter (safe expression parser)
│ ├── server.js # Express API server
│ ├── vercel.json # Vercel deployment config
│ └── package.json
├── Frontend/
│ ├── src/
│ │ ├── App.jsx # Main playground UI
│ │ ├── components/
│ │ │ └── Documentation.jsx # Language reference cards
│ │ ├── styles.css # App styles
│ │ ├── index.css # Global styles & design tokens
│ │ └── main.jsx # Entry point
│ ├── public/ # Static assets
│ ├── index.html
│ └── package.json
└── README.md
The interpreter uses a custom recursive descent parser for evaluating expressions — no eval() or Function() calls. User-submitted code runs in a sandboxed context with:
- Iteration limit — max 10,000 iterations per execution
- Execution timeout — 5 second hard limit
- Input validation — max 5,000 characters
- Rate limiting — 15 requests per minute per IP
Both frontend and backend are deployed on Vercel:
- Frontend — auto-deploys from
Frontend/directory - Backend — auto-deploys from
Backend/directory as a serverless function
To deploy your own:
- Fork this repo
- Import each directory as a separate Vercel project
- Set the backend URL in the frontend via the
VITE_API_URLenvironment variable
PRs and issues are welcome! Whether it's a bug fix, new language feature, or UI improvement — feel free to contribute. 🐾
If you like MeowScript, give it a ⭐ on GitHub!