Telar
A declarative programming language for the web with Spanish syntax. It compiles into HTML and CSS from human-readable code, with no configuration required.
🧠 The Idea
Telar was born out of frustration with modern web development.
To build a simple app today, you need to choose from dozens of frameworks, configure webpack, write JSX, manage dependencies… all before you’ve solved the real problem.
The hypothesis: what if you could describe what you want in Spanish, and the compiler made all the technical decisions for you?
🚀 What It Does
aplicación MiTienda
página inicio en "/"
usar navbar
título "Bienvenido"
mostrar productos recientes
máximo 8
ordenados por precio
si falla
mostrar "Sin conexión"
reintentar en 5 segundos
si el usuario está conectado
botón "Mi cuenta" ir a cuenta
si no
botón "Entrar" ir a login
optimizar para móvil
caché 10 minutos
It automatically compiles into semantic HTML, responsive CSS and optimised JavaScript without you having to touch any of those files.
- Declarative syntax in structured Spanish
- Compilation to production-ready HTML + CSS + JS
- Mobile optimisation, caching and ARIA accessibility by default
- Error messages in Spanish with visual context
- Full CLI:
compile,serve,check,new - Package manager with official packages
- Live reload on the development server
- Official extension for VS Code
🏗️ Compiler Architecture
Telar implements a full three-phase compiler:
- Lexer — tokenises the
.telarfile, recognising Spanish text with accents and the letter ‘ñ’ - Parser — constructs the abstract syntax tree (AST) from the tokens
- Generator — traverses the AST and produces semantic HTML + responsive CSS + JavaScript
Each phase has its own error system with messages in Spanish and specific suggestions on how to resolve them, including visual context from the lines in the file.
📦 Ecosystem
Telar has its own package manager based on GitHub:
telar nuevo mi-proyecto
telar añadir navbar
telar añadir formulario
telar añadir lista
telar servir app.telar
Packages are GitHub repositories prefixed with telar-.
Anyone can create and publish packages for the community.
📊 What’s Interesting About the Project
The most challenging part wasn’t generating the HTML, but rather:
- Designing a grammar that reads like natural Spanish but is deterministic
- Handling the ambiguity of human language without losing precision
- Building useful error messages with visual context of line and column
- Implementing a significant indentation system compatible with the parser
- Creating a package manager without its own infrastructure using GitHub as a registry
The main challenge was finding the balance between human readability and compiler precision — too free and the compiler is ambiguous, too strict and it loses the naturalness of Spanish.
🎯 Current Status
Telar is at v0.5 with a complete compiler, CLI, package manager, VS Code extension, and three official packages. v0.6 will add full tests and CI/CD. v1.0 will include web documentation and community.
📦 Installation
npm install -g @davidbc01/telar
telar nuevo mi-proyecto
cd mi-proyecto
telar servir app.telar