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

amr-lang

v1.0.8

Published

A simple programming language with bilingual support (English & Arabic)

Downloads

854

Readme

AMR Lang 🚀

A simple programming language with support for both English and Arabic keywords.

Installation

Install globally from npm

npm install -g amr-lang

Or install locally in your project

npm install amr-lang

Usage

Running AMR files

# Run a specific file
amr example.amr
amr test.amr
amr yourfile.amr

# Run the default file (example.amr)
amr

Alternative methods

# Using npm scripts
npm start              # Runs example.amr
amr myfile.amr # Runs any file

Language Syntax

Variables

let x : 10
let name : 5
خلي y : 20

Print Output

show x
show x + 5
اطبع y

Arithmetic Operations

show 10 + 5   # Addition
show 10 - 5   # Subtraction
show 10 * 5   # Multiplication
show 10 / 5   # Division

Comparison Operations

show 10 > 5   # Greater than
show 5 < 10   # Less than

Functions

make add(a, b) {
    return a + b
}

show add(10, 20)

# Arabic version
اعمل multiply(x, y) {
    رجع x * y
}

Conditional Statements

let age : 18
when age > 17 {
    show 1
}

when age > 21 {
    show 100
} otherwise {
    show 0
}

# Arabic version
لو age > 17 {
    اطبع 1
} لولا {
    اطبع 0
}

While Loops

let counter : 5
loop counter > 0 {
    show counter
    let counter : counter - 1
}

# Arabic version
كرر counter > 0 {
    اطبع counter
}

Comments

# This is a comment
show 10  # Inline comment

Keywords

English Keywords

  • let - Variable declaration
  • show - Print output
  • make - Function declaration
  • return - Return from function
  • when - If statement
  • otherwise - Else statement
  • loop - While loop

Arabic Keywords (عربي)

  • خلي - Variable declaration (let)
  • اطبع - Print output (show)
  • اعمل - Function declaration (make)
  • رجع - Return from function (return)
  • لو - If statement (when)
  • لولا - Else statement (otherwise)
  • كرر - While loop (loop)

Example Programs

Example 1: Basic Operations

let x : 10
let y : 5

show x + y
show x * y

Example 2: Factorial Function

make factorial(n) {
    when n < 2 {
        return 1
    }
    return n * factorial(n - 1)
}

show factorial(5)  # Output: 120

Example 3: Mixed English & Arabic

خلي x : 10
let y : 5

اطبع x + y
show x * y

Project Structure

My-Lang/
├── src/
│   ├── index.ts       # Entry point
│   ├── lexer.ts       # Tokenizer
│   ├── parser.ts      # Parser
│   ├── interpreter.ts # Interpreter
│   ├── ast.ts         # AST definitions
│   ├── environment.ts # Variable environment
│   └── run.ts         # Runner
├── bin/
│   └── amr.js         # CLI executable
├── example.amr        # Example program
├── test.amr           # Test program
└── package.json

Development

# Run in development mode
npm start

# Run a specific file
amr yourfile.amr

Features

✅ Variable declarations
✅ Arithmetic operations (+, -, *, /)
✅ Comparison operations (>, <)
✅ Function declarations and calls
✅ Conditional statements (if/else)
✅ While loops
✅ Comments
✅ Bilingual support (English & Arabic)
✅ Recursive functions
✅ Proper operator precedence

License

MIT

Author

Amr Elsherbiny