npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

Iโ€™ve always been into building performant and accessible sites, but lately Iโ€™ve been taking it extremely seriously. So much so that Iโ€™ve been building a tool to help me optimize and monitor the sites that I build to make sure that Iโ€™m making an attempt to offer the best experience to those who visit them. If youโ€™re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, ๐Ÿ‘‹, Iโ€™m Ryan Hefnerย  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If youโ€™re interested in other things Iโ€™m working on, follow me on Twitter or check out the open source projects Iโ€™ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soonโ€“ish.

Open Software & Tools

This site wouldnโ€™t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you ๐Ÿ™

ยฉ 2026 โ€“ย Pkg Stats / Ryan Hefner

modi-lang

v1.0.0

Published

๐Ÿ‡ฎ๐Ÿ‡ณ Modi Lang โ€” The Deshbhakt Programming Language. Mitron, ab coding bhi deshbhakti hai!

Readme

๐Ÿ‡ฎ๐Ÿ‡ณ Modi Lang

The Deshbhakt Programming Language

"Mitron, ab coding bhi deshbhakti hai!"

npm version License: MIT Node.js VS Code Extension

Modi Lang is a hilarious, fully functional programming language where every keyword is a famous Modi catchphrase. Write programs that compile your patriotism into actual code! ๐ŸŽ‰

โ–ˆโ–ˆโ–ˆโ•—   โ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•—    โ–ˆโ–ˆโ•—      โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ•—   โ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— 
โ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘    โ–ˆโ–ˆโ•‘     โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ•—  โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ• 
โ–ˆโ–ˆโ•”โ–ˆโ–ˆโ–ˆโ–ˆโ•”โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘    โ–ˆโ–ˆโ•‘     โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ–ˆโ•—
โ–ˆโ–ˆโ•‘โ•šโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘    โ–ˆโ–ˆโ•‘     โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ•šโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘
โ–ˆโ–ˆโ•‘ โ•šโ•โ• โ–ˆโ–ˆโ•‘โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•‘    โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘ โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ•‘โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•
โ•šโ•โ•     โ•šโ•โ• โ•šโ•โ•โ•โ•โ•โ• โ•šโ•โ•โ•โ•โ•โ• โ•šโ•โ•    โ•šโ•โ•โ•โ•โ•โ•โ•โ•šโ•โ•  โ•šโ•โ•โ•šโ•โ•  โ•šโ•โ•โ•โ•โ•šโ•โ•โ•โ•โ•โ• 

๐Ÿ“ฅ Installation

Quick Install (Recommended)

npm install -g modi-lang

That's it! The modi command is now available globally. ๐ŸŽ‰

One-Line Install Scripts

Windows (PowerShell):

irm https://raw.githubusercontent.com/bishwa100/modi-lang/main/install.ps1 | iex

Mac / Linux:

curl -fsSL https://raw.githubusercontent.com/bishwa100/modi-lang/main/install.sh | bash

Verify Installation

modi --version    # Modi Lang v1.0.0 ๐Ÿ‡ฎ๐Ÿ‡ณ
modi help         # Show all commands

Uninstall

npm uninstall -g modi-lang

๐ŸŽจ VS Code Extension (IDE Support)

Get full syntax highlighting for .modi files in VS Code!

Install from Source

  1. Copy the modi-lang-vscode folder to your VS Code extensions:
    • Windows: %USERPROFILE%\.vscode\extensions\modi-lang
    • Mac/Linux: ~/.vscode/extensions/modi-lang
  2. Restart VS Code
  3. Open any .modi file โ€” enjoy colorful syntax! ๐ŸŽจ

Install from VSIX

cd modi-lang-vscode
npx -y @vscode/vsce package
# Then in VS Code: Ctrl+Shift+P โ†’ "Install from VSIX"

Features

  • ๐ŸŽจ Full syntax highlighting for all Modi Lang keywords
  • โŒจ๏ธ Auto-closing brackets and quotes
  • ๐Ÿ’ฌ Comment toggling with Ctrl+/
  • ๐Ÿ“ .modi file icon and association
  • ๐Ÿ”ง Smart indentation

๐Ÿš€ Quick Start

# Create a new project
modi init my-project
cd my-project

# Run the program
modi run main.modi

# Start interactive REPL
modi repl

# Run any .modi file
modi run examples/hello.modi

# Show help
modi help

๐Ÿ“ Your First Program

Create a file called hello.modi:

namaste

modi greeting = "Mitron, Bhaiyo aur Behno!";
mann_ki_baat(greeting);
mann_ki_baat("Acche din aane wale hain! ๐ŸŽ‰");

jai_hind

Run it:

modi run hello.modi

Output:

Mitron, Bhaiyo aur Behno!
Acche din aane wale hain! ๐ŸŽ‰

๐Ÿ—ฃ๏ธ Language Reference

Keywords

| What You Want | Modi Lang Says | Why It's Funny | |---|---|---| | let / var | modi | Modi creates everything | | print | mann_ki_baat | He speaks to the nation | | if | agar_modi | Conditional on Modi's will | | else | nahi_toh | The alternative | | else if | warna_modi | Another condition, another promise | | true | acche_din | Good days = True โœจ | | false | jumla | Jumla = False ๐Ÿ˜‚ | | while | ghuma_ke | Loops around and around | | for | sabka_saath | Iterate with everyone | | function | mitron | Every speech starts with "Mitron..." | | return | laut_aao | Return home with a value | | null | nota | None of the Above | | input | chai_pe_charcha | Take input over chai โ˜• | | try | modi_hai_toh | Modi hai toh mumkin hai! | | catch | pakoda | When things go wrong, sell pakodas ๐Ÿณ | | break | demonetization | Breaks the loop like it broke the economy ๐Ÿ’ธ | | continue | aage_badho | Skip and move forward | | == | same2same | Equality check, desi style | | != | jumla_hai | That's a jumla! | | AND | aur | And in Hindi | | OR | ya | Or in Hindi | | NOT | bilkul_nahi | Absolutely not! | | // comment | // suno mitron | Listen friends... (ignored) |

๐Ÿคฃ Opposition Party Roasts (The Funniest Feature!)

Use opposition party names as constants โ€” each returns a hilariously fixed value:

| Keyword | Value | The Roast ๐Ÿ˜‚ | |---|---|---| | cpim | 0 | Zero seats, zero impact! CPIM = 0, always! ๐Ÿ˜‚ | | congress | "" (empty) | Empty promises, empty result! Khaali hai! ๐Ÿซ— | | aap | "muft" | Everything is free! Revdi culture! ๐Ÿ†“๐Ÿ’ธ | | tmc | "khela_hobe" | Khela ho raha hai! ๐Ÿ | | rjd | "jungle_raj" | Back to the jungle era! ๐ŸŒฟ๐Ÿ… | | pappu | nota (null) | Pappu can't pass! ๐ŸŽ“โŒ | | sp | "cycle" | Cycle chalate raho! ๐Ÿšฒ | | aimim | 1 | Ek hi seat milti hai, always! 1๏ธโƒฃ๐ŸŽค | | bsp | "haathi" | Elephant walking slow! ๐Ÿ˜ | | jdu | "paltu" | Switches sides every season! ๐Ÿ”„๐ŸฆŽ |

Example:

// CPIM is always 0 โ€” use it like a constant!
mann_ki_baat("CPIM seats: " + cpim);          // Output: CPIM seats: 0

// Pappu is always null โ€” can't pass!
agar_modi (pappu) {
    mann_ki_baat("Impossible!");
} nahi_toh {
    mann_ki_baat("Pappu fail ho gaya!");       // This always runs! ๐Ÿ˜‚
}

// Congress in a condition โ€” empty = falsy!
agar_modi (congress) {
    mann_ki_baat("Never happens!");
} nahi_toh {
    mann_ki_baat("Congress khaali hai!");      // Always empty! ๐Ÿซ—
}

// Math with opposition
mann_ki_baat(cpim + aimim);                    // Output: 1 (0 + 1)

Program Structure

Every Modi Lang program starts with namaste and ends with jai_hind:

namaste
// your code here
jai_hind

(Both are optional but good deshbhakti practice! ๐Ÿ‡ฎ๐Ÿ‡ณ)


๐Ÿ“š Examples

Variables

modi name = "Mitron";
modi age = 74;
modi is_pm = acche_din;
modi score = nota;

Conditions

agar_modi (votes >= 272) {
    mann_ki_baat("Majority! ๐ŸŽ‰");
} warna_modi (votes >= 200) {
    mann_ki_baat("Coalition needed! ๐Ÿค");
} nahi_toh {
    mann_ki_baat("Opposition mein baitho! ๐Ÿ˜ค");
}

Loops

// For loop
sabka_saath (modi i = 1; i <= 10; i = i + 1) {
    mann_ki_baat(i);
}

// While loop
modi count = 5;
ghuma_ke (count > 0) {
    mann_ki_baat("Countdown: " + count);
    count = count - 1;
}

Functions

mitron add(a, b) {
    laut_aao a + b;
}

mann_ki_baat(add(10, 20));  // 30

Arrays (Rally)

modi states = ["Gujarat", "UP", "Maharashtra"];
mann_ki_baat(states[0]);        // Gujarat
mann_ki_baat(lambai(states));   // 3

Try-Catch

modi_hai_toh {
    modi x = 10 / 0;
} pakoda (error) {
    mann_ki_baat("Error: " + error);
}

FizzBuzz โ€” Modi Edition ๐ŸŽช

namaste

sabka_saath (modi i = 1; i <= 30; i = i + 1) {
    agar_modi (i % 15 same2same 0) {
        mann_ki_baat("๐ŸŽ‰ Acche Din!");
    } warna_modi (i % 3 same2same 0) {
        mann_ki_baat("๐Ÿ‡ฎ๐Ÿ‡ณ Modi!");
    } warna_modi (i % 5 same2same 0) {
        mann_ki_baat("๐ŸŽค Mitron!");
    } nahi_toh {
        mann_ki_baat(i);
    }
}

jai_hind

Recursion โ€” Factorial ๐Ÿ—ฃ๏ธ

namaste

mitron factorial(n) {
    agar_modi (n same2same 0) { laut_aao 1; }
    laut_aao n * factorial(n - 1);
}

mann_ki_baat("5! = " + factorial(5));

jai_hind

๐Ÿ˜ค Error Messages (The Best Part!)

Modi Lang doesn't just show errors โ€” it roasts you:

| Error | Modi Lang Says | |---|---| | Syntax Error | "Mitron, ye kya likh diya? Galat syntax hai! ๐Ÿคฆ" | | Undefined Variable | "Ye variable toh Note-bandi mein chala gaya! ๐Ÿ’ธ" | | Division by Zero | "Zero se divide? Ye toh jumla hai mitron! โž—๐Ÿšซ" | | Type Error | "Chai aur pakoda mix mat karo! ๐Ÿต๐Ÿณ" | | Stack Overflow | "Itna recursion? Modiji bhi thak jayenge! ๐Ÿ˜ตโ€๐Ÿ’ซ" | | Missing Semicolon | "Digital India mein precision zaroori hai! โŒจ๏ธ" | | File Not Found | "Shayad Swachh Bharat mein saaf ho gayi! ๐Ÿงน" | | Runtime Crash | "BREAKING: Program crashed! Blame it on Congress! ๐Ÿ˜‚" |


๐Ÿงฐ Built-in Functions

| Function | Description | |---|---| | mann_ki_baat(value) | Print to console | | chai_pe_charcha(prompt) | Read user input โ˜• | | lambai(array_or_string) | Get length | | aankda(value) | Convert to number | | bhaashan(value) | Convert to string | | jodo_rally(array, value) | Push to array | | nikalo(array) | Pop from array | | type_kya_hai(value) | Get type name | | split(str, delimiter) | Split string | | uppercase(str) | To uppercase | | lowercase(str) | To lowercase | | abs(value) | Absolute value | | power(base, exp) | Exponentiation | | random() / random(min, max) | Random number ๐ŸŽฒ | | floor(value) | Floor | | ceil(value) | Ceiling | | round(value) | Round |


๐Ÿ—๏ธ Architecture

Source Code (.modi)  โ†’  Lexer (Tokens)  โ†’  Parser (AST)  โ†’  Evaluator (Execute)  โ†’  Output

Built as a tree-walking interpreter in Node.js. No external dependencies!


๐Ÿ“ Project Structure

Modi Lang/
โ”œโ”€โ”€ bin/modi.js              # CLI entry point (the `modi` command)
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ tokens.js            # Token types & keywords
โ”‚   โ”œโ”€โ”€ ast.js               # AST node definitions
โ”‚   โ”œโ”€โ”€ lexer.js             # Tokenizer
โ”‚   โ”œโ”€โ”€ parser.js            # Parser
โ”‚   โ”œโ”€โ”€ evaluator.js         # Interpreter
โ”‚   โ”œโ”€โ”€ environment.js       # Variable scoping
โ”‚   โ”œโ”€โ”€ builtins.js          # Built-in functions
โ”‚   โ”œโ”€โ”€ errors.js            # Funny error messages
โ”‚   โ””โ”€โ”€ repl.js              # Interactive REPL
โ”œโ”€โ”€ examples/                # Example .modi programs
โ”‚   โ”œโ”€โ”€ hello.modi           # Hello World
โ”‚   โ”œโ”€โ”€ fizzbuzz.modi        # FizzBuzz Modi edition
โ”‚   โ”œโ”€โ”€ demo.modi            # Full feature demo
โ”‚   โ””โ”€โ”€ ...                  # Many more examples!
โ”œโ”€โ”€ tests/                   # Test suite
โ”‚   โ””โ”€โ”€ test_basic.js        # Comprehensive tests
โ”œโ”€โ”€ modi-lang-vscode/        # VS Code extension
โ”‚   โ”œโ”€โ”€ syntaxes/            # TextMate grammar
โ”‚   โ”œโ”€โ”€ language-configuration.json
โ”‚   โ””โ”€โ”€ package.json
โ”œโ”€โ”€ install.sh               # Mac/Linux install script
โ”œโ”€โ”€ install.ps1              # Windows install script
โ”œโ”€โ”€ package.json             # npm package config
โ”œโ”€โ”€ LICENSE                  # MIT License
โ””โ”€โ”€ README.md

๐Ÿ› ๏ธ CLI Commands

| Command | Description | |---|---| | modi run <file.modi> | Run a Modi Lang program | | modi repl | Start interactive REPL | | modi init [name] | Create a new Modi Lang project | | modi help | Show help | | modi version | Show version | | modi <file.modi> | Run directly (shorthand) |


๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes
  4. Run tests: npm test
  5. Commit: git commit -m 'Add amazing feature'
  6. Push: git push origin feature/amazing-feature
  7. Open a Pull Request

๐Ÿ“ฆ Publishing

Publish to npm

npm login
npm publish

Publish VS Code Extension

cd modi-lang-vscode
npx -y @vscode/vsce package
npx -y @vscode/vsce publish

๐ŸŽ‰ Disclaimer

This is a satirical/fun project meant purely for entertainment and learning about programming language design. No political affiliation intended โ€” just good old desi humor! ๐Ÿ˜„

Jai Hind! ๐Ÿ‡ฎ๐Ÿ‡ณ