Code karo Hindi mein, Duniya hila do! ๐
JugaadLang is a modern, beginner-friendly, fun programming language inspired by Python, designed for Indian developers. It replaces Python's core keywords with English-spelled Hindi (Roman Hindi) terms and features custom funny error diagnostic outputs, a built-in package manager, and standard libraries.
JugaadLang transpiles directly to native Python AST, meaning it runs with zero runtime performance overhead and provides full compatibility with the entire Python ecosystem.
- Online Playground (Try Without Installing!)
- Core Philosophy
- Installation
- Language Keywords Reference
- Example Usage
- Built-in Fun Functions
- Ecosystem & Tooling
- Standard Library (Stdlib)
- Funny Error System
- Automated Testing
Want to code in JugaadLang immediately without installing Python or setting up a local environment? Use our free, in-browser interactive compiler & playground:
๐ Launch JugaadLang Online Playground ๐
- โก 100% Client-Side: Powered by WebAssembly (Pyodide) โ zero server dependencies, instant execution.
- ๐จ Monaco Editor: Full VS Code-like coding environment with custom syntax highlighting and indentation.
- ๐ Dual-Pane Transpiler: View your generated standard Python code side-by-side in real time.
- ๐ก Desi Error Diagnostics: Hilarious and helpful error diagnostics with real-time red squiggly error markers pointing to the exact line.
- ๐พ Export & Download: Download your program as
.jug(source) or.py(transpiled Python) with a single click.
- Python simplicity: Clear, indentation-based block syntax.
- Hindi-English keywords: Express logic in the language you think in.
- Humorous diagnostics: Error messages that make you laugh, not crash.
- Zero-overhead transpilation: Compiles to Python bytecode and executes in the native Python VM.
Get started with JugaadLang in just a few minutes.
Before installing JugaadLang, make sure you have:
- Python 3.10 or later
- pip package manager
Check your Python version:
python --versionor
python3 --versionpip install jugaadlangjug --versionExpected output:
JugaadLang v1.2.8 ๐ฎ๐ณ
Create a file named hello.jug
bolo("Namaste Duniya ๐")
Run it:
jug run hello.jugOutput:
Namaste Duniya ๐
Option A: Using Homebrew (Recommended)
brew tap jugaadlang/tap
brew install jugaadlangOption B: Using pip
pip3 install jugaadlangjug --versionjug run hello.jugOption A: Using Homebrew (Recommended)
brew tap jugaadlang/tap
brew install jugaadlangOption B: Using pip
pip3 install jugaadlangjug --versionjug run hello.jugInstall directly from GitHub:
pip install git+https://github.com/JugaadLang/jugaadlang.gitVerify:
jug --versionJugaadLang includes a built-in package manager.
jug install chaijug search chaijug updatejug remove chaiStart the JugaadLang shell:
jug replExample:
>>> bolo("Namaste")
Namaste
| Command | Description |
|---|---|
jug run <file.jug> |
Run a JugaadLang program |
jug compile <file.jug> |
Transpile a JugaadLang program to native Python |
jug repl |
Start the interactive REPL shell |
jug install <pkg> |
Install a package or bundle (e.g., web) |
jug update <pkg> |
Update an installed package |
jug search <pkg> |
Search for packages in index |
jug remove <pkg> |
Uninstall a package |
jug new <project> |
Create a new project boilerplate |
jug check <file.jug> |
Validate syntax without executing |
jug typecheck <file.jug> |
Type check using mypy |
jug doctor |
Diagnose environment and dependencies |
jug -h, --help |
Show CLI help with descriptions & examples |
jug --version |
Show JugaadLang version |
| Python Keyword | JugaadLang | Hindi Literal Meaning |
|---|---|---|
print |
bolo |
Say / Speak |
input |
poochho |
Ask |
if |
agar |
If |
elif |
shayad |
Maybe / Perhaps |
else |
warna |
Otherwise |
for |
ghumo |
Iterate / Roam |
while |
jabtak |
Until / As long as |
def |
banao |
Create / Make |
return |
wapas |
Return / Back |
class |
ustad |
Master / Teacher |
self |
khud |
Self |
import |
lao |
Import / Bring |
from |
se |
From |
lazy import (3.15+) |
sust |
Deferred / Suspended |
break |
rukja |
Stop! |
continue |
chalte_raho |
Keep going |
try |
koshish |
Try / Attempt |
except |
gadbad |
Problem / Exception |
finally |
aakhir_me |
In the end |
raise |
udao |
Throw / Raise |
True |
sahi |
Correct / True |
False |
galat |
Wrong / False |
None |
kuch_nahi |
Nothing / None |
and |
aur |
And |
or |
ya |
Or |
not |
nahi |
Not |
async |
tez |
Fast / Async |
await |
intezaar |
Wait / Await |
yield |
baanto |
Distribute / Yield |
pass |
theek_hai |
Fine / Pass |
global |
sabka |
Everyone's / Global |
lambda |
chota_funkshan |
Little function |
in |
mein |
In |
is |
hai |
Is |
match |
agar_match |
Pattern match subject block |
case |
kaand |
Case block in pattern match |
JugaadLang supports Roman Hindi wrappers for standard Python built-in functions. They map directly to Python's built-ins:
| Python Built-in | JugaadLang | Hindi Translation | Description |
|---|---|---|---|
abs |
maan |
Value / Magnitude | Absolute value of a number |
all |
sab |
All | True if all items in iterable are true |
any |
koi_bhi |
Any / Anyone | True if any item in iterable is true |
bin |
binary |
Binary | Binary representation of an integer |
bool |
satyata |
Truth value | Evaluates boolean value |
callable |
bulaane_yogya |
Callable | Checks if object is callable |
chr |
akshar |
Character | Returns character from Unicode point |
delattr |
gun_hatao |
Remove attribute | Deletes attribute from object |
dict |
kosh |
Dictionary / Lexicon | Returns a dictionary (map) |
divmod |
bhag_shesh |
Quotient-Remainder | Returns (quotient, remainder) |
enumerate |
ginti |
Counting / Enumerate | Returns indexed list generator |
exec |
chalao |
Run / Execute | Executes dynamic Python code |
filter |
chhano |
Filter | Filters elements through a function |
frozendict |
jamhi_kosh |
Frozen dictionary | Immutable mapping (Python 3.15+) |
getattr |
gun_lao |
Get attribute | Returns attribute value of object |
hasattr |
gun_hai |
Has attribute | Checks if attribute exists on object |
help |
madad |
Help | Starts built-in help text utility |
id |
pehchan |
Identity / ID | Returns unique identity of object |
int |
purnank |
Integer | Converts value to standard integer |
isinstance |
prakar_hai |
Is type of | Checks if object is instance of class |
issubclass |
subclass_hai |
Is subclass of | Checks if class is subclass of another |
len |
lambaee |
Length | Returns length of a sequence |
list |
suchi |
List / Sequence | Creates/converts to list |
max |
adhiktam |
Maximum | Returns largest item |
min |
nyuntam |
Minimum | Returns smallest item |
next |
agla |
Next | Retrieves next item from iterator |
object |
vastu |
Object | Base class object creator |
open |
kholo |
Open | Opens a file handle |
pow |
ghat |
Power / Exponent | Raises number to power (x ** y) |
reversed |
ulta |
Reversed | Returns reversed order iterator |
sentinel |
pahredaar |
Sentinel / Guardian | Unique marker object (Python 3.15+) |
setattr |
gun_badlo |
Change attribute | Modifies attribute value of object |
slice |
tukda |
Slice | Returns slice object for indexes |
sorted |
kramwar |
Sorted / Sequential | Returns sorted copy of iterable |
str |
shabd |
String / Word | Converts object to string |
sum |
yog |
Sum / Addition | Returns sum of items in iterable |
type |
prakar |
Type / Kind | Returns the type of an object |
JugaadLang keeps up with CPython's What's New releases. Each feature compiles to the native construct on interpreters that understand it and to an equivalent older construct otherwise, so one .jug file runs on every supported Python (3.10+).
| Feature | Python | JugaadLang syntax |
|---|---|---|
| Template strings (PEP 750) | 3.14+ | bolo(roop(t"Namaste {naam}!")) |
!r / !s / !a + format specs in f-strings |
โ | bolo(f"{daam:>8.2f}") |
Bracket-less except (PEP 758) |
3.14+ | gadbad ValueError, TypeError: |
| Unpacking in comprehensions (PEP 798) | 3.15+ | [*l ghumo l mein jodon], {**d ghumo d mein daftar} |
| Unpacking in literals (PEP 448) | โ | [*sab, 4], {"a": 1, **daftar} |
| Lazy imports (PEP 810) | 3.15+ | sust lao json, sust se pathlib lao Path |
frozendict / sentinel builtins (PEP 814, 661) |
3.15+ | jamhi_kosh(a=1), pahredaar |
roop(template) renders a t"..." back to text; without it bolo prints the template object, since templates keep their literal pieces separate for SQL, HTML, or logging. Below Python 3.15 the new builtins raise a JugaadLang error naming the required version.
# Ask for user name
poochho naam
agar naam == "Sumangal":
bolo("Legend mil gaya! ๐")
warna:
bolo("Namaste " + naam)
Run it:
jug run hello.jugustad Developer:
banao shuru(khud, naam, language):
khud.naam = naam
khud.language = language
banao batao(khud):
bolo(khud.naam + " code likh raha hai " + khud.language + " mein!")
dev = Developer("Sumangal", "JugaadLang")
dev.batao()
### 3. Pattern Matching (`match.jug`)
```jugaadlang
banao test_match(x):
agar_match x:
kaand sahi:
wapas "boolean true"
kaand 1:
wapas "one"
kaand [a, b]:
wapas "sequence of " + str(a) + " and " + str(b)
kaand _:
wapas "something else"
bolo(test_match(1))
bolo(test_match(sahi))
bolo(test_match([10, 20]))
---
## Built-in Fun Functions
Enjoy several custom interactive built-ins directly at runtime:
* `chai()`: Prints a warm cup of ASCII tea (`โ Chai pi lo.`)
* `himmat()`: Prints a motivational programming boost (`๐ฅ Hidden feature detected.`)
* `ghaas_chhoo()`: Gently reminds you to go touch some grass (`๐ฑ Bahar ghoom aao.`)
* `bachao()`: Starts a mock search for help (`๐จ StackOverflow search shuru.`)
* `fortune()`: Tells a programmer's fortune (`๐ฎ Bug line 347 mein ho sakta hai.`)
* `jugaad()`: Gives a random hacking/debugging tip.
* `nazar()`: Blocks bad vibes and bugs (`๐งฟ Nazar suraksha kavach active! Bad vibes/bugs blocked. ๐งฟ`).
* `ashirwad()`: Boosts runtime success rate with elder blessings (`๐ต Sadbhavna aur aashirwad active! Success rate boosted to 100%! ๐ต`).
* `dhanya_waad()`: Expresses polite gratitude (`๐ Dhanyawaad! Code chalaane ke liye aapka aabhari hoon. Keep coding! ๐`).
* `bhagwan_bhala_kare()`: Prays for errors to disappear (`๐ฟ Hey bhagwan, iss error ko apne aap thik kar do! Please! ๐ฟ`).
* `paisa_wasool()`: Reminds you that JugaadLang is free (`๐ธ Paisa Wasool! JugaadLang is 100% free and open-source, your money is safe! ๐ธ`).
* `bas_kar_bhai()`: Advises to stop coding and sleep (`๐ Bas kar bhai! Kitna code likhega? So ja thodi der. ๐`).
* `chilla_mat()`: Calms you down during debugging (`๐คซ Chilla mat, deep breath le aur debug kar. ๐คซ`).
* `kundli()`: Performs astrological diagnostics on your code to see if Shani or Rahu are transit-blocking your variables/loops.
* `roop(t"...")`: Renders a template string back to text โ `bolo(roop(t"Namaste {naam}!"))` (Python 3.14+; a no-op passthrough on older interpreters).
---
## Ecosystem & Tooling
### CLI Runner
* **Run a file:** `jug run main.jug` (supports script argument passing like `jug run main.jug arg1 arg2`)
* **Check syntax:** `jug check main.jug`
* **Static type-checking:** `jug typecheck main.jug` (performs static analysis using `mypy` behind the scenes)
* **Transpile to Python source:** `jug compile main.jug -o main.py`
* **Create a boilerplate project:** `jug new my_project`
### Interactive REPL
Launch a beautiful interactive terminal shell:
```bash
jug repl
Features auto-completion for all keywords, live syntax highlighting, input history, and double-Enter multiline block detection.
Integrate pip packages or custom bundles:
- Install:
jug install web(installs Flask, requests, httpx, and aiohttp) - Remove:
jug remove web - Update:
jug update web - Search:
jug search query
Launch the extension from vscode_extension/. Features full syntax highlighting for .jug files, 25+ snippets, hovered keyword documentation in Hindi, and a status bar icon.
Import standard libraries using lao (e.g. lao ganit):
ganit: Hindi wrappers for arithmetic/geometry (e.g.ganit.sin,ganit.pi,ganit.sqrt).web: HTTP request wrappers (web.get,web.post) and JugaadWeb framework with@web.agar_route("/")andweb.chalao().faili: Clean file system API (faili.padho,faili.likho,faili.jodo).json: Native parser (json.banao_string,json.banao_object).samay: DateTime operations (samay.abhibhi(),samay.aaj(),samay.soja()).tantra: Access system variables (tantra.argv,tantra.exit(),tantra.platform).crypto: Hash encryption (crypto.sha256,crypto.base64_encode).database: SQLite ORM (JugaadORM) backing tables withbachao()andfilter().- Fun Libraries:
chai,jokes,motivation,fortune,memes,catfacts.
Tired of dry Tracebacks? JugaadLang features humorous Hindi exceptions:
๐คฆ Bhai kya likh diya?
Faili: hello.jug Line 3, Col 12
agar x ==
^
Error Details: Expected value.
Keyboard strike par hai kya?
๐ต๏ธ Variable 'x' dhundte dhundte thak gaya.
Faili: hello.jug Line 12
> bolo(x)
Kya gadbad hai?
'x' mila hi nahi.
Possible reasons:
โข Typo kiya hai
โข Variable declare karna bhool gaye
โข Universe collapse ho gaya
๐ Zero se divide?
Faili: hello.jug Line 5
Kya gadbad hai?
Newton bhi confuse ho gaya. Maths seekh lo thoda.
For local development and testing, we provide a unified helper script run.sh to automate tasks:
# Clean previous builds, run tests, and perform editable installation
./run.sh all
# Run test suite dynamically under the active Python environment
./run.sh test
# Clean build artifacts and package wheels/tarballs
./run.sh build
# Install JugaadLang locally in editable mode with all development dependencies
./run.sh install
All test cases are written using `pytest` inside the `tests/` directory.
---
## Architecture & Project Technical Specification
### ๐๏ธ Project Architecture & Pipeline
JugaadLang transpiles Roman Hindi syntax into native Python AST with zero runtime overhead:
```text
Source (.jug) โโโบ Lexer (Token Stream) โโโบ Parser (JL AST) โโโบ Transformer (Python AST) โโโบ compile() / exec()- Language: Python 3.10+ (Tested across Python 3.10, 3.11, 3.12, 3.13, 3.14, 3.15)
- CLI Engine:
clickwith customJugaadGroupandJugaadCommand - Terminal UI & Diagnostics:
rich - Linting & Code Quality:
ruff - Testing & Coverage:
pytest&pytest-cov(81%+ code coverage)
jug_cli.main:main: Central Click group supporting-h/--help, formatted command descriptions, and an interactiveExamplessection.jugaadlang.lexer.lexer.Lexer: Indentation-aware tokenizer converting Hindi keywords to tokens.jugaadlang.parser.parser.Parser: Recursive descent parser producing language AST.jugaadlang.transformer.to_python.JugaadToPythonTransformer: AST transformer rewriting JugaadLang constructs to standardastnodes.jugaadlang.runtime.interpreter.JugaadInterpreter: Execution engine handling bytecode compilation and runtime error traps.jugaadlang.package_manager.manager.JugaadPackageManager: Package installation, removal, update, and search engine.
- Enhanced CLI Help Output: Implemented native definition list rendering (
write_dl) for examples injug --helpand subcommands. - Dual Flag Support: Enabled
-halias alongside standard--help. - Clean Command Summaries: Fixed Click sentence-splitting bug that previously truncated the
installcommand description.
# 1. Setup virtual environment
python -m venv .venv
.venv\Scripts\activate # Windows
source .venv/bin/activate # Linux/macOS
# 2. Install editable with development extras
pip install -e .[dev,all]
# 3. Linting check
ruff check .
# 4. Run test suite with coverage
pytest --cov=jugaadlang