返回顶部
r

rail-cli

UK National Rail CLI — live departures, arrivals, station search, destination filtering, batch station search from stdin, and lightweight field selection for agents. Use when checking UK rail boards, resolving station names/CRS codes, filtering departures or arrivals, or when an agent needs machine-friendly station search via `rail search --stdin` or `rail search --select`.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 0.2.1
安全检测
已通过
129
下载量
0
收藏
概述
安装方式
版本历史

rail-cli

# rail-cli Use `rail` for UK National Rail data: live departures, arrivals, station search, destination filtering, and agent-friendly batch search. Setup - `npm install -g @shan8851/rail-cli` - Get a free Darwin access token: https://realtime.nationalrail.co.uk/OpenLDBWSRegistration/Registration - `export DARWIN_ACCESS_TOKEN=your_token` or add to `.env` - Station search works without a token. Departures and arrivals require one. Departures - From a station: `rail departures KGX` - By station name: `rail departures "kings cross"` - Filter to destination: `rail departures "edinburgh" --to "york"` - Include calling points: `rail departures KGX --expand` - Limit results: `rail departures KGX --limit 5` Arrivals - At a station: `rail arrivals "leeds"` - By CRS code: `rail arrivals LDS` - Filter from origin: `rail arrivals "leeds" --from "london"` - Include calling points: `rail arrivals LDS --expand` - Limit results: `rail arrivals LDS --limit 5` Station Search - Search by name: `rail search "waterloo"` - Return only CRS codes: `rail search "waterloo" --select crs` - Return only names: `rail search "waterloo" --select name` - Return explicit name + CRS projection: `rail search "waterloo" --select name,crs` - Batch search from stdin: `printf "waterloo\nvictoria\n" | rail search --stdin` - Batch search as JSON: `printf "waterloo\nvictoria\n" | rail search --stdin --json` Output - All commands default to text in TTY, JSON when piped - Force JSON: `rail departures KGX --json` - Force text: `rail departures KGX --text` - Disable colour: `rail --no-color departures KGX` - Success envelope: `{ ok, schemaVersion, command, requestedAt, data }` - Error envelope: `{ ok, schemaVersion, command, requestedAt, error }` Agent Notes - `rail search --stdin` is pipeline-only and expects newline-delimited queries on stdin - `rail search --select` is intentionally narrow: `name`, `crs`, or `name,crs` - `rail search --stdin` and a positional query cannot be used together - Search output stays stable unless projection flags are explicitly used - Errors are structured and suitable for agent retry/self-correction Configuration - `DARWIN_ACCESS_TOKEN` — required for departures/arrivals (free registration) - `RAIL_API_URL` — optional, override Huxley2 instance URL (default: public instance) Notes - Accepts station names ("kings cross", "leeds") and CRS codes (`KGX`, `LDS`, `EDB`) - CRS codes are 3-letter station identifiers - Covers every National Rail station in Great Britain - Data powered by National Rail Darwin via Huxley2 - Exit codes: 0 success, 2 bad input or ambiguity, 3 upstream failure, 4 internal error - When a station name is ambiguous, the error includes candidate suggestions

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 rail-cli-1776032564 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 rail-cli-1776032564 技能

通过命令行安装

skillhub install rail-cli-1776032564

下载 Zip 包

⬇ 下载 rail-cli v0.2.1

文件大小: 2.03 KB | 发布时间: 2026-4-13 11:43

v0.2.1 最新 2026-4-13 11:43
Publish from ~/.openclaw/skills as source of truth; keep OpenClaw metadata and updated agent-first search docs.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部