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

starlight-cli

v1.1.21

Published

Starlight Programming Language CLI

Downloads

414

Readme

Starlight Language Guide

Welcome to Starlight Language, a simple and expressive server-side scripting programming language designed for clarity and flexibility.

This guide introduces the core concepts and syntax to help you start writing programs quickly.


1. Hello World

sldeploy "Hello, world!"

2. Variables

Variables are declared using the define keyword.

define name = "Alice"
define age = 20

Supported Value Types

| Type | Example | | ------- | -------------------- | | Number | 10, 3.14 | | String | "hello" | | Boolean | true, false | | Array | [1, 2, 3] | | Object | { "a": 1, "b": 2 } | | Null | null |


3. Output

Use sldeploy to print values:

sldeploy name
sldeploy age

4. Input

Use ask to read user input:

define name = ask("Enter your name:")
sldeploy "Hello " + name

5. Operators

Arithmetic Operators

| Operator | Description | | -------- | -------------- | | + | Addition | | - | Subtraction | | * | Multiplication | | / | Division | | % | Modulus |

Example:

define result = 10 + 5 * 2

Comparison Operators

| Operator | Description | | -------- | --------------------- | | == | Equal | | != | Not equal | | < | Less than | | <= | Less than or equal | | > | Greater than | | >= | Greater than or equal |


Logical Operators

| Operator | Description | | -------- | --------------- | | AND | Logical AND | | OR | Logical OR | | ?? | Null coalescing |

Example:

define x = null ?? 10

6. Conditional Statements

if (age > 18) {
    sldeploy "Adult"
} else {
    sldeploy "Minor"
}

7. Loops

While Loop

define i = 0

while (i < 5) {
    sldeploy i
    i = i + 1
}

For Loop

for (define i = 0; i < 5; i = i + 1) {
    sldeploy i
}

For-In Loop

define arr = [10, 20, 30]

for x in arr {
    sldeploy x
}

8. Functions

Function Declaration

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

Function Usage

define result = add(2, 3)
sldeploy result

Arrow Functions

define add = (a, b) => a + b

9. Arrays

define arr = [1, 2, 3]

sldeploy arr[0]

Common Array Operations

| Function | Description | | -------- | ------------------- | | push | Add element | | pop | Remove last element |

push(arr, 4)
pop(arr)

10. Objects

define user = {
    "name": "Alice",
    "age": 20
}

sldeploy user.name

11. Slicing

define arr = [1, 2, 3, 4, 5]

sldeploy arr[1:4]
sldeploy arr[0:5:2]

Slice Syntax

| Format | Description | | ------------------ | ------------------ | | [start:end] | Basic slicing | | [start:end:step] | Step-based slicing |


12. Error Handling

do {
    define x = y
} track {
    sldeploy "Error occurred"
}

13. Imports

import math from "math"

Supported Imports

| Type | Description | | --------------- | --------------------- | | .sl files | Local modules | | Node.js modules | External dependencies |


14. Built-in Functions

Examples:

len([1,2,3])
upper("hello")
random(1, 10)

Categories

| Category | Examples | | -------- | ---------------- | | String | upper, lower | | Array | push, pop | | Math | random | | Utility | len |


15. Asynchronous Code

define data = await get("https://api.example.com")
sldeploy data

16. Object Construction

func Person(name) {
    this.name = name
}

define p = new Person("Alice")
sldeploy p.name

17. Comments

# This is a comment

18. Language Notes

| Behavior | Description | | ---------------- | --------------------------------- | | Undefined values | Treated as null | | Function return | Defaults to null if unspecified | | Data structures | Dynamic (arrays and objects) | | Error reporting | Includes line and column details |


19. Next Steps

  • Explore built-in functions
  • Write small programs
  • Review full syntax reference
  • Experiment with custom scripts

Keywords

starlight language, scripting language, programming language tutorial, interpreter language, CLI scripting, custom language design