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

samskritam-lang

v1.0.0

Published

A toy programming language with Sanskrit keywords - like Bhailang but in Sanskrit!

Readme

Samskritam (संस्कृतम्)

A toy programming language with Sanskrit keywords. Inspired by Bhailang — but in the language of the gods!

namaskaram

  vadah "Namaste, Vishva!";

viramah

Installation

npm install -g samskritam-lang

Usage

# Run a program
samskritam run hello.sam

# Interactive REPL
samskritam repl

# Show help
samskritam help

Syntax Reference

| Samskritam | Equivalent | Sanskrit Meaning | |---|---|---| | namaskaram | Program Start | Greetings | | viramah | Program End | Stop | | mana | let/var | Think | | vadah | print | Speak | | yadi | if | If | | athava yadi | else if | Or if | | anyatha | else | Otherwise | | yavat | while | As long as | | viramah kuru | break | Do stop | | agrima | continue | Next | | kriya | function | Action | | pratyarpaya | return | Give back | | satyam | true | Truth | | asatyam | false | Untruth | | shunya | null | Void/Zero |

Data Types

  • Numbers: 42, 3.14, -7
  • Strings: "Namaste", 'hello'
  • Booleans: satyam (true), asatyam (false)
  • Null: shunya

Examples

Variables

namaskaram
  mana naam = "Arjuna";
  mana vayah = 25;
  vadah "Naam: " + naam;
  vadah "Vayah: " + vayah;
viramah

Conditionals

namaskaram
  mana marks = 85;
  yadi (marks >= 90) {
    vadah "Uttamam! (Excellent!)";
  } athava yadi (marks >= 60) {
    vadah "Shobhanam! (Good!)";
  } anyatha {
    vadah "Prayatnam kuru! (Try harder!)";
  }
viramah

Loops

namaskaram
  mana i = 1;
  yavat (i <= 5) {
    vadah i;
    i += 1;
  }
viramah

Functions & Recursion

namaskaram
  kriya factorial(n) {
    yadi (n <= 1) {
      pratyarpaya 1;
    }
    pratyarpaya n * factorial(n - 1);
  }

  vadah "5! = " + factorial(5);
  // Output: 5! = 120
viramah

FizzBuzz

namaskaram
  mana i = 1;
  yavat (i <= 30) {
    yadi (i % 15 == 0) {
      vadah "SamskritamBuzz!";
    } athava yadi (i % 3 == 0) {
      vadah "Samskritam";
    } athava yadi (i % 5 == 0) {
      vadah "Buzz";
    } anyatha {
      vadah i;
    }
    i += 1;
  }
viramah

Development

# Install dependencies
npm install

# Build
npm run build

# Run tests
npm test

# Bundle for browser
npm run build:browser

# Run example
npx ts-node cli/index.ts run examples/hello.sam

Project Structure

sanskrit-lang/
  src/
    lexer/       # Tokenizer
    parser/      # Recursive descent parser + AST
    interpreter/ # Tree-walking interpreter
    errors/      # Sanskrit error messages
  cli/           # CLI tool
  website/       # Interactive playground
  examples/      # Example .sam programs
  tests/         # Test suite

Live Playground

Try it online: sanskrit-lang.vercel.app

Author

Built by aannuuj | LinkedIn

License

MIT


Built with love for Sanskrit & Programming. Inspired by Bhailang.