Trein

Query Dutch Railways (NS) for train departures, trip planning, disruptions, and station search via the trein CLI.

MIT-0 · Free to use, modify, and redistribute. No attribution required.
1 · 1.6k · 0 current installs · 0 all-time installs
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description, required binary (trein), primary env var (NS_API_KEY), and install methods (npm package + GitHub release binaries) all match the stated purpose of a CLI for the NS API.
Instruction Scope
SKILL.md stays within scope (commands for departures, trips, disruptions, stations). It references storing/reading a config file (~/.config/trein/trein.config.json) for an apiKey and aliases; the registry metadata lists no required config paths — this is a minor inconsistency (the config path is optional per README but SKILL.md documents it). The instructions do not request other files, unrelated env vars, or external endpoints beyond the NS API and the project's GitHub releases.
Install Mechanism
Install options are an npm package 'trein' or direct downloads from GitHub Releases (official repo URL in the homepage). These are standard distribution mechanisms; no obscure hosts, shorteners, or arbitrary extract steps are used in the metadata.
Credentials
Only NS_API_KEY is required and declared as the primary credential, which is appropriate for a client of the NS API. No unrelated secrets or broad credential access are requested.
Persistence & Privilege
The skill will persist user aliases and (optionally) the API key in ~/.config/trein/trein.config.json per the README. This is normal for a CLI but is persistent data stored on the user's home directory; the skill does not request elevated system privileges or modify other skill configurations. always:false (no forced inclusion).
Assessment
This skill appears to be what it says: a CLI wrapper for NS. Before installing, verify the npm package and GitHub repo ownership (https://github.com/joelkuijper/trein) to ensure you trust the publisher. Be cautious with your NS_API_KEY: prefer setting it as an environment variable rather than leaving it in a file, or ensure the config file (~/.config/trein/trein.config.json) has restrictive permissions. If possible, check what scopes the NS API key has and avoid using an overly-permissive key. Finally, if you want extra assurance, review the package source or the GitHub release binary checksums before installing.

Like a lobster shell, security has layers — review code before you run it.

Current versionv1.0.0
Download zip
latestvk976y5xn3ek6dhcjqv0tzwcn4h7zxhqg

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

Runtime requirements

🚆 Clawdis
Binstrein
EnvNS_API_KEY
Primary envNS_API_KEY

Install

Install trein (npm)
Bins: trein
npm i -g trein

SKILL.md

trein - Dutch Railways CLI

A CLI for the NS (Dutch Railways) API with real-time departures, trip planning, disruptions, and station search.

Install

npm (recommended):

npm i -g trein

Or download a standalone binary from GitHub Releases.

Setup

Get an API key from https://apiportal.ns.nl/ and set it:

export NS_API_KEY="your-api-key"

Or create ~/.config/trein/trein.config.json:

{ "apiKey": "your-api-key" }

Commands

Departures

trein departures "Amsterdam Centraal"
trein d amsterdam
trein d amsterdam --json  # structured output

Trip Planning

trein trip "Utrecht" "Den Haag Centraal"
trein t utrecht denhaag --json

Disruptions

trein disruptions
trein disruptions --json

Station Search

trein stations rotterdam
trein s rotterdam --json

Aliases (shortcuts)

trein alias set home "Amsterdam Centraal"
trein alias set work "Rotterdam Centraal"
trein alias list
trein d home  # uses alias

Tips

  • Use --json flag for all commands to get structured output for parsing
  • Station names support fuzzy matching (e.g., "adam" -> "Amsterdam Centraal")
  • Aliases are stored in the config file and can be used in place of station names

Files

1 total
Select a file
Select a file to preview.

Comments

Loading comments…