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

lumos-language

v2.1.1

Published

Lumos Language - Enhanced Multi-Target Compiler supporting 100+ languages

Readme

Lumos Language

Version 2.1.0 - Multi-Target Compiler & Interpreter

npm version

Lumos Logo

Overview

Lumos Language Enhanced is a comprehensive programming language implementation that supports compilation to over 100 target languages, frameworks, and technologies. This enhanced version builds upon the original Lumos Language with full-stack capabilities, multi-paradigm support, and professional-grade code generation.

Features

Core Capabilities

  • Interactive REPL with multiline support
  • File-based script execution
  • Multi-target compilation to 100+ languages
  • Full abstract syntax tree (AST) generation
  • Comprehensive error handling
  • Built-in standard library

Language Paradigms Supported

  • Imperative programming
  • Object-oriented programming
  • Functional programming
  • Procedural programming
  • Declarative programming
  • Assembly-level programming

Compilation Targets

Interpreted Languages

  • Python
  • Ruby

Framework Support

Backend Frameworks

  • Laravel (PHP)
  • Django, FastAPI, Flask (Python)
  • Express, NestJS, Fastify (Node.js)
  • Phoenix (Elixir)
  • Spring Boot (Java)
  • ASP.NET (C#)
  • Ruby on Rails

Frontend Frameworks

  • React, Vue, Angular
  • Next.js, Nuxt, Gatsby
  • Svelte, SvelteKit
  • Alpine.js, HTMX
  • Tailwind CSS

Database ORMs

  • Prisma, TypeORM
  • SQLAlchemy, Django ORM
  • ActiveRecord
  • Sequelize

Installation

npm install lumos-language

Or install globally:

npm install -g lumos-language

Usage

Interactive REPL

lumos

In the REPL:

lumos> let x = 42
=> 42

lumos> def greet(name) { return "Hello, " + name }
=> [Function]

lumos> greet("World")
=> "Hello, World"

lumos> .compile python
Compiled to python:
---
x = 42

def greet(name):
    return "Hello, " + name
---

Running Files

lumos script.lumos

Compilation

Compile Lumos code to any target language:

lumos compile script.lumos python
lumos compile script.lumos rust
lumos compile script.lumos javascript

With optimization:

lumos compile script.lumos c --optimize

Language Syntax

Variables

let x = 10
const PI = 3.14159
var message = "Hello"

Functions

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

def fibonacci(n) {
    if (n <= 1) {
        return n
    }
    return fibonacci(n - 1) + fibonacci(n - 2)
}

Classes

class Person {
    let name
    let age
    
    def constructor(name, age) {
        this.name = name
        this.age = age
    }
    
    def greet() {
        return "Hello, I'm " + this.name
    }
}

Control Flow

if (x > 10) {
    print("Greater")
} elsif (x < 10) {
    print("Lesser")
} else {
    print("Equal")
}

while (x < 100) {
    x = x + 1
}

for i = 1 to 10 {
    print(i)
}

Error Handling

try {
    let result = riskyOperation()
} catch (error) {
    print("Error:", error)
} finally {
    cleanup()
}

REPL Commands

  • .help - Show help message
  • .exit - Exit the REPL
  • .history - Show command history
  • .compile [target] - Compile to target language
  • .targets - Show all available targets
  • .vars - Show current variables
  • .clear - Clear the console
  • .reset - Reset the runtime

Architecture

Core Components

  • Lexer: Tokenizes source code
  • Parser: Generates Abstract Syntax Tree (AST)
  • Evaluator: Executes AST directly
  • Compiler: Orchestrates multi-target compilation
  • Runtime: Provides built-in functions and module system

Backend Generators

Each target language has a dedicated backend generator that transforms the Lumos AST into idiomatic target code. Generators handle:

  • Syntax transformation
  • Type mapping
  • Standard library translation
  • Platform-specific optimizations

API Usage

const LumosEngine = require('lumos-language-enhanced');

const engine = new LumosEngine();

const code = 'let x = 42';
const result = engine.execute(code);

const pythonCode = engine.compileToTarget(code, 'python');
const rustCode = engine.compileToTarget(code, 'rust');

Testing

npm test

Caution

  • Please write all code on a single line.

Contributing

Contributions are welcome! Please read the contributing guidelines before submitting pull requests.

License

MIT License - Copyright (c) 2025 Hirotoshi Uchida

Credits

Created by Hirotoshi Uchida

Influenced by Python, JavaScript, Ruby, and other modern programming languages.

Links

Support

For issues and feature requests, please visit the GitHub Issues page.

Changelog

Version 2.0.0 (Enhanced)

  • Added multi-target compilation support for 100+ languages
  • Complete rewrite of lexer and parser
  • New AST-based architecture
  • Added comprehensive backend generators
  • Enhanced REPL with compilation support
  • Added class and module system
  • Improved error handling and reporting
  • Added framework integration support
  • Full TypeScript support
  • Database language support
  • Assembly language support

Version 1.1.2 (Original)

  • Initial release
  • Basic interpreter functionality
  • Simple REPL
  • Core language features

2025 © Hirotoshi Uchida