Deutsche Bahn CLI

TotalClaw 作者 tobiasbischoff v1.0.0

使用 bahn-cli 工具搜索 Deutsche Bahn 火车连接。当您需要查找德国车站之间的火车连接、检查出发时间或帮助制定旅行计划时使用。适用于“Berlin Hbf”、“München”、“Hannover”等车站名称。

源码 ↗

安装 / 下载方式

TotalClaw CLI推荐
totalclaw install totalclaw:tobiasbischoff~tobiasbischoff-bahn
cURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atobiasbischoff~tobiasbischoff-bahn/file -o tobiasbischoff-bahn.md
Git 仓库获取源码
git clone https://github.com/clawdbot/skills/commit/82d928c3b516447060d055b94edc90f4b261ab85
## 概述(中文)

使用 bahn-cli 工具搜索 Deutsche Bahn 火车连接。当您需要查找德国车站之间的火车连接、检查出发时间或帮助制定旅行计划时使用。适用于“Berlin Hbf”、“München”、“Hannover”等车站名称。

## 原文

# Deutsche Bahn CLI

Search train connections using the `bahn-cli` tool.

## Installation

The tool should be installed globally or in the workspace. If not installed:

```bash
cd ~/Code/bahn-cli && npm install
```

## Usage

Search train connections:

```bash
cd ~/Code/bahn-cli && node index.js search "<from>" "<to>" [options]
```

### Options

- `--date YYYY-MM-DD` - Departure date (default: today)
- `--time HH:MM` - Departure time (default: current time)
- `--results <number>` - Number of results to show (default: 5)

### Examples

Search connections from Hannover to Bonn:
```bash
cd ~/Code/bahn-cli && node index.js search "Hannover Hbf" "Bonn Hbf" --results 3
```

Search with specific date and time:
```bash
cd ~/Code/bahn-cli && node index.js search "Berlin" "München" --date 2026-02-05 --time 14:30
```

## Station Names

- Use common German station names
- "Hbf" means Hauptbahnhof (main station)
- Examples: "Berlin Hbf", "München Hbf", "Frankfurt(Main)Hbf", "Köln Hbf"
- Station names are case-insensitive

## Output

The tool shows:
- Departure and arrival times
- Platform numbers
- Duration
- Number of changes
- Intermediate stops for connections with changes
- Train numbers (ICE, IC, RE, etc.)

## Notes

- The CLI uses the db-vendo-client library
- Some station names in output may show "undefined" (cosmetic issue, doesn't affect functionality)
- Direct connections are listed first
- Times are in 24-hour format