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

railil

v1.1.0

Published

Israel Rail API and CLI

Readme

railil

A modern, type-safe Node.js CLI and API client for Israel Railways.

railil allows you to query train schedules directly from your terminal or integrate Israel Rail data into your Node.js applications. It features fuzzy station searching, multiple output formats, and a zero-dependency architecture (runtime).

Features

  • 🚄 CLI & API: Use it as a command-line tool or a library.

  • 🔄 Transfer Support: Detailed visibility for journeys requiring transfers or bus substitutions.

  • 🔍 Fuzzy Search: Smart matching for station names (e.g., "Savidor", "Modiin").

  • ⏰ Smart Scheduling: Automatically finds upcoming trains starting from "now" (Israel time), filtering out past departures.

  • 🎨 Flexible Output: JSON (for piping), Markdown (for notes), or beautiful CLI Tables.

  • ⚡ Modern: Built with Node.js 22+ native fetch and ESM.

  • 📦 Type-Safe: Written in TypeScript with full type definitions.

Installation

CLI Usage

You can run it directly using npx without installation:

npx railil --from "Tel Aviv Savidor" --to "Haifa"

Or install globally:

npm install -g railil

Library Usage

Install as a dependency in your project:

npm install railil

CLI Reference

Options

| Flag | Short | Type | Description | Default | |------|-------|------|-------------|---------| | --from | -f | string | Required. Origin station name or ID. Supports fuzzy matching. | - | | --to | -t | string | Required. Destination station name or ID. Supports fuzzy matching. | - | | --date | -d | string | Date in YYYY-MM-DD format. | Today (Israel) | | --time | | string | Time in HH:MM format. | Now (Israel) | | --limit| | number | Number of results to display. | 5 | | --output| -o | string | Output format: markdown, table, json. | markdown | | --json | | boolean| Alias for --output json. | false | | --help | -h | boolean| Show help message. | - |

Examples

Search for the next 5 trains from Tel Aviv Savidor to Haifa Hof HaKarmel (starting from now):

railil --from "Savidor" --to "Hof Carmel"

Search for a specific time and date:

# Next trains after 16:30 today
railil -f "Tel Aviv" -t "Haifa" --time 16:30

# Specific date and time
railil -f "Modiin" -t "Jerusalem" --date 2026-02-01 --time 08:00

Output as a CLI Table:

railil -f "Modiin" -t "Jerusalem" --output table

Output as JSON (useful for scripts/automation):

railil -f 5800 -t 4600 --json

API Reference

import { searchTrains, stations } from 'railil';

// 1. Search for trains
const { travels, from, to } = await searchTrains(
  '3700', // Tel Aviv Savidor Center (ID)
  '2300'  // Haifa - Hof HaKarmel (ID)
);

console.log(`Searching from ${from.name.en} to ${to.name.en}`);
console.log(`Next train leaves at: ${travels[0].departureTime}`);

// 2. Lookup station IDs
const station = stations.find(s => s.name.en.includes('Savidor'));
console.log(station.id); // "3700"

See API Documentation for full reference.

Development

  1. Clone: git clone https://github.com/lirantal/railil.git
  2. Install: npm install
  3. Build: npm run build
  4. Test: npm test
  5. Run CLI:
    • Development: npm start -- -f "Modiin" -t "Savidor"
    • Production: node dist/bin/cli.cjs -f "Modiin" -t "Savidor"

License

Apache-2.0