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

marathilipi

v1.0.1

Published

Write TypeScript using Marathi (Devanagari) keywords — transpiled and executed via the official TypeScript compiler.

Downloads

31

Readme

MarathiLipi 🏆

MarathiLipi is a lightweight language layer that enables developers to write JavaScript and TypeScript using Marathi (Devanagari) syntax.

It transpiles MarathiLipi code into valid TypeScript, which is then compiled to JavaScript and executed using Node.js.


Overview

MarathiLipi does not replace JavaScript or TypeScript.
It builds on top of them.

MarathiLipi → TypeScript → JavaScript → Runtime (Node.js)

Introduction

MarathiLipi lets developers write code in Marathi. A small transpiler converts Marathi keywords to valid TypeScript, which is then compiled and run using the official TypeScript compiler API — no custom parser needed.

MarathiLipi (.ml)
      ↓
  Transpiler       ← keyword replacement (src/core/dictionary.ts)
      ↓
TypeScript Code
      ↓
TypeScript Compiler (ts.transpileModule)
      ↓
  JavaScript
      ↓
Node.js Runtime

Installation

npm install -g marathilipi

Development (from source)

git clone https://github.com/Yuyutsu/marathilipi.git
cd marathilipi
npm install
npm run build
npm link

CLI Usage

marathilipi hello.ml
marathilipi run hello.ml

# Print generated TypeScript before execution
marathilipi run --verbose hello.ml

Quick example

नाव वय = 25

जर (वय > 18) {
  दाखवा("प्रौढ")
}

Syntax Examples

Each example shows MarathiLipi source on the left and the TypeScript it produces on the right.


Hello World

MarathiLipi

दाखवा("जय महाराष्ट्र")

TypeScript

console.log("जय महाराष्ट्र")

Variables

MarathiLipi

नाव व्यक्ती   = "अमोल"   // let
स्थिर नाव PI  = 3.14      // const (two-word phrase)
कायम MAX       = 100       // const (alias)
जुने नाव x    = 0         // var   (two-word phrase)

TypeScript

let व्यक्ती   = "अमोल"
const PI       = 3.14
const MAX      = 100
var x          = 0

If / Else

MarathiLipi

नाव वय = 25

जर (वय > 18) {
  दाखवा("प्रौढ")
} नाहीतर {
  दाखवा("लहान")
}

TypeScript

let वय = 25

if (वय > 18) {
  console.log("प्रौढ")
} else {
  console.log("लहान")
}

Switch / Case

MarathiLipi

निवडा (वय) {
  प्रकरण 18:
    दाखवा("अठरा")
    थांब
  मूळ:
    दाखवा("इतर")
}

TypeScript

switch (वय) {
  case 18:
    console.log("अठरा")
    break
  default:
    console.log("इतर")
}

Functions

MarathiLipi

काम स्वागत(व्यक्ती) {
  परत "नमस्कार " + व्यक्ती
}

TypeScript

function स्वागत(व्यक्ती) {
  return "नमस्कार " + व्यक्ती
}

Loops

MarathiLipi

पुन्हा (नाव i = 0; i < 5; i++) {
  दाखवा(i)
}

TypeScript

for (let i = 0; i < 5; i++) {
  console.log(i)
}

Async / Await

MarathiLipi

समकाल काम डेटाआणा() {
  नाव परिणाम = प्रतीक्षा fetch("/api")
  दाखवा(परिणाम)
}

TypeScript

async function डेटाआणा() {
  let परिणाम = await fetch("/api")
  console.log(परिणाम)
}

Classes

MarathiLipi

प्रकार प्राणी {
  निर्माता(व्यक्ती) {
    हा.व्यक्ती = व्यक्ती
  }
}

TypeScript

class प्राणी {
  constructor(व्यक्ती) {
    this.व्यक्ती = व्यक्ती
  }
}

Error Handling

MarathiLipi

प्रयत्न {
  दाखवा("धोकादायक कोड")
} पकडा (अडचण) {
  चूक(अडचण.message)
} शेवटी {
  दाखवा("शेवट")
}

TypeScript

try {
  console.log("धोकादायक कोड")
} catch (अडचण) {
  console.error(अडचण.message)
} finally {
  console.log("शेवट")
}

Imports / Exports

MarathiLipi

आणा { add } पासून "./utils"
द्या काम greet() {}
मूळ द्या काम main() {}

TypeScript

import { add } from "./utils"
export function greet() {}
export default function main() {}

TypeScript Types

MarathiLipi

अंतरफलक IUser {
  वय: number
}

प्रकारघोषणा ID = string | number

TypeScript

interface IUser {
  वय: number
}

type ID = string | number

How MarathiLipi Works

  1. CLI (src/cli/cli.ts) parses command-line arguments and delegates to the Runner.
  2. Runner (src/core/runner.ts) reads the .ml file, calls the Transpiler, and then uses ts.transpileModule() to compile TypeScript to JavaScript which is executed in a sandboxed VM context.
  3. Transpiler (src/core/transpiler.ts) iterates over the keyword list in sort order (multi-word phrases first, then by length) and replaces each Marathi keyword with its TypeScript equivalent using word-boundary-aware regular expressions.
  4. Dictionary (src/core/dictionary.ts) is the single source of truth for all translations. Each entry groups one or more Marathi aliases that map to the same TypeScript keyword, together with a description and optional Latin-script shorthands for VS Code autocomplete.
  5. Keyword Map (src/core/keywordMap.ts) is derived automatically from the dictionary and re-exports the same flat Record<string, string> used by the runner and existing tooling.

Keyword Reference

Multi-word phrases (e.g. स्थिर नाव) are matched as complete phrases before their component words. Rows with / list aliases that all map to the same TypeScript keyword.

| MarathiLipi | TypeScript | |------------------------------|------------------| | नाव | let | | स्थिर नाव / कायम | const | | जुने नाव | var | | जर | if | | नाहीतर | else | | निवडा | switch | | प्रकरण | case | | मूळ | default | | पुन्हा | for | | जोपर्यंत | while | | करा | do | | थांब | break | | पुढे | continue | | काम | function | | परत | return | | वेढा | yield | | समकाल / असिन्क्रॉन | async | | प्रतीक्षा | await | | प्रकार | class | | वाढवा | extends | | नवीन | new | | हा | this | | पालक | super | | निर्माता | constructor | | आणा | import | | पासून | from | | द्या | export | | मूळ द्या | export default | | प्रयत्न | try | | पकडा | catch | | शेवटी | finally | | फेका | throw | | दाखवा / सांगा / सांग / छापा | console.log | | चूक | console.error | | सूचना | console.warn | | माहिती | console.info | | हटवा | delete | | मध्ये | in | | उदाहरण | instanceof | | प्रकारघोषणा | type | | अंतरफलक | interface | | नामविश्व | namespace | | जाहीर | declare | | अमूर्त | abstract | | सार्वजनिक | public | | खाजगी | private | | संरक्षित | protected | | स्थिरसदस्य | static | | फक्तवाचा | readonly | | की | keyof | | अनुमान | infer | | संतोष | satisfies |


How to Add New Keywords

  1. Open src/core/dictionary.ts.
  2. Add a new entry (or add an alias to an existing entry's patterns array):
    {
      patterns: ["मराठी_शब्द"],          // one or more Marathi aliases
      replace: "tsKeyword",               // TypeScript equivalent
      description: "Short description",
      romanizedPrefixes: ["roman"],       // optional: Latin-script autocomplete hints
    },
  3. Rebuild: npm run build.

That's it — keywordMap.ts derives itself from the dictionary automatically, and the VS Code extension picks up the new entry from the same source.


Project Structure

marathilipi/
├── src/
│   ├── cli/
│   │   └── cli.ts          # CLI entry point
│   ├── core/
│   │   ├── dictionary.ts   # ← single source of truth (structured keyword entries)
│   │   ├── keywordMap.ts   # flat map derived from dictionary.ts
│   │   ├── transpiler.ts   # Marathi → TypeScript conversion
│   │   ├── runner.ts       # orchestrates read → transpile → compile → run
│   │   └── types.ts        # shared type definitions
│   ├── utils/
│   │   └── fileUtils.ts    # file I/O helpers
│   └── index.ts            # public library API
├── examples/
│   ├── hello.ml            # hello world example
│   └── age_check.ml        # if/else example
├── tests/
│   ├── transpiler.test.ts  # transpiler unit tests
│   └── dictionary.test.ts  # dictionary structure & ordering tests
├── vscode-extension/
│   └── src/
│       └── extension.ts    # autocomplete, hover, diagnostics
├── package.json
├── tsconfig.json
└── README.md

Running Tests

npm test

MarathiLipi Playground

A fully interactive browser playground — no installation needed.

Running the playground locally

# Clone the repository (if you haven't already)
git clone https://github.com/Yuyutsu/marathilipi.git
cd marathilipi

# Open the playground in your browser
open playground/index.html          # macOS
xdg-open playground/index.html      # Linux
start playground/index.html         # Windows

The playground loads Monaco Editor (VS Code) from CDN, so an internet connection is required on first open. Everything else runs entirely in the browser — no build step, no server.

Features

| Feature | Detail | |---------|--------| | Monaco Editor | VS Code editor with full keyboard support | | Syntax highlighting | Custom marathilipi language with keyword colouring | | Run | Click Run or press Ctrl+Enter | | Console output | दाखवा / console.log output appears in the right panel | | Error display | Runtime errors shown in red in the console | | Copy output | Copy all console lines to clipboard | | Resizable panes | Drag the divider to adjust editor / console widths |

Example

Write this in the editor:

नाव व्यक्ती = "अमोल"

दाखवा("जय महाराष्ट्र")

जर (व्यक्ती) {
  दाखवा("नमस्कार " + व्यक्ती)
}

Press Run — the console shows:

जय महाराष्ट्र
नमस्कार अमोल

VS Code Extension

Install the MarathiLipi Language Support extension for full syntax highlighting directly in VS Code.

Install from VSIX

cd vscode-extension
npm install
npm run package          # builds marathilipi-language-0.1.0.vsix

code --install-extension marathilipi-language-0.1.0.vsix

Load unpacked (development)

  1. Open the vscode-extension/ folder in VS Code.
  2. Press F5 — a new Extension Development Host window opens.
  3. Open any .ml file to see coloured Marathi keywords.

Features

| Feature | Detail | |---------|--------| | Syntax highlighting | All MarathiLipi keywords, strings, numbers, comments | | Language detection | Automatic for .ml files | | Bracket matching | {} [] () | | Auto-closing pairs | Brackets and quotes | | Comment shortcuts | # line comments, /* */ block comments | | Indentation | Smart indent/outdent around blocks | | Autocomplete | Suggests full Marathi phrases while typing Devanagari | | Romanized autocomplete | Type a Latin-script shorthand to surface the Marathi phrase (see table below) | | Hover | Shows TypeScript equivalent and description for any keyword | | Diagnostics | Warns about unrecognised Devanagari tokens |

Romanized Autocomplete Shorthands

Type a Latin prefix in a .ml file and the extension suggests the matching Marathi keyword — useful when you don't have a Devanagari IME active.

| Type… | Suggests | Maps to | |-------|----------|----------| | sth | स्थिर नाव | const | | kay | कायम | const | | nav | नाव | let | | jun | जुने नाव | var | | dak | दाखवा | console.log | | san | सांगा | console.log | | jar | जर | if | | nah | नाहीतर | else | | kam | काम | function | | par | परत | return | | sam | समकाल | async | | prat | प्रतीक्षा | await |


Roadmap

  • AST-level parsing
  • Marathi error messages
  • English → Marathi translator