[Integrations](https://spiral.ai/integrations) › [Gemini CLI](https://spiral.ai/integrations/gemini-cli) › [Amtrak live train positions](https://spiral.ai/integrations/gemini-cli/amtrak-live-train-positions)

# How to Use Amtrak live train positions in Gemini CLI

Returns a snapshot of reported Amtrak train positions and status from Track Your Train. Use it to survey running services before inspecting one train’s stop-by-stop times.

|  |  |
| --- | --- |
| Model | Amtrak live train positions |
| Available through | Alexandria |
| Category | Maps & Reviews |
| Price | $0.00873 per call. |
| Returns | json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with Amtrak live train positions in Gemini CLI

- Use Amtrak live train positions for Northeast Regional and plot the returned reported positions in the project’s map view.
- Use Amtrak live train positions to look this up and give me the result as a table. Save the result in ./assets.
- Pull the latest numbers from Amtrak live train positions and tell me what changed since last week.
- Check Amtrak live train positions and summarize what you find in three bullet points.
- Pull the newest data from Amtrak live train positions and give me the result as a table.

## How to set up Amtrak live train positions in Gemini CLI

Pick the way that suits you. Each takes about two minutes.

### Use Spiral's MCP server

1. **Add the server**: Or add it to `~/.gemini/settings.json` yourself:

```bash
gemini mcp add --scope user --transport http spiral https://api.spiral.ai/mcp
```

2. **Sign in**: Start `gemini` and run:

```text
/mcp auth spiral
```

3. **Check it**: In Gemini CLI, run `/mcp`. From your shell:

```bash
gemini mcp list
```

### Use the Spiral skill

1. **Send Gemini CLI this message**: Your agent reads Spiral's skill and sets itself up.

```
set up https://spiral.ai/SKILL.md
```

2. **Sign in or paste a key**: Approve Spiral in the browser, or give the agent a key from the console.

### Use the Spiral CLI

1. **Install and sign in**: Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

```bash
npx -y spiral-cli@latest init
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run Amtrak live train positions**: One request; the result comes back by polling or a webhook.

```bash
curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "alexandria",
    "model": "amtrak-com/train-status/live_trains",
    "input": {
      "limit": 1
    }
  }'
```

Then paste one of the prompts above: Gemini CLI finds Amtrak live train positions on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/gemini-cli

## Amtrak live train positions tools and prices

- [Amtrak · Live trains](https://spiral.ai/tools/alexandria/amtrak-com/train-status/live_trains) (Alexandria): $0.00873 per call.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| limit | 1 to 500 | — | Return at most this many trains (feed order). Default: all. |
| state | Active, Predeparture, Completed | — | Filter by feed state |
| route_name |  | — | Exact route name as the feed states it, e.g. 'Northeast Regional', 'Acela' (case-insensitive) |
| train_number |  | — | Train number, e.g. 2151 Pattern: ^[0-9A-Za-z]{1,6}$. |

## What can you do with Amtrak live train positions in Gemini CLI?

Build a rail travel view that connects Amtrak station information, route stops, and reported train progress. A coding agent can use these responses to populate the project’s station pages and keep scheduled, estimated, and actual stop times distinct.

### Time a station pickup

Find the relevant train in the reported position snapshot, then inspect its estimated or actual arrival at the pickup station. Use the stop times to explain whether the arrival estimate has changed.

### Prepare a corridor status briefing

Survey reported train positions on Northeast Regional, then inspect individual runs for stop-level timing. Summarize which services have estimated arrivals later than their scheduled arrivals.

### Review a connection

Locate the two relevant trains in the current snapshot and compare their reported arrival and departure times at the connecting station. Calculate the gap between the estimates without presenting it as a guaranteed connection.

### Explain a train’s progress

Pair a train’s reported position with its scheduled, estimated, and actual stop times. Produce a plain-English account of where it was last reported and how its progress compares with the schedule.

## Overview

- [Alexandria](https://spiral.ai/providers/alexandria)
- [All Gemini CLI guides](https://spiral.ai/integrations/gemini-cli)

## Amtrak live train positions in other agents

- [Amp](https://spiral.ai/integrations/amp/amtrak-live-train-positions)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/amtrak-live-train-positions)
- [Claude](https://spiral.ai/integrations/claude-desktop/amtrak-live-train-positions)
- [Claude Code](https://spiral.ai/integrations/claude-code/amtrak-live-train-positions)
- [Cline](https://spiral.ai/integrations/cline/amtrak-live-train-positions)
- [Codex](https://spiral.ai/integrations/codex/amtrak-live-train-positions)
- [Cursor](https://spiral.ai/integrations/cursor/amtrak-live-train-positions)
- [Devin](https://spiral.ai/integrations/devin/amtrak-live-train-positions)
- [dots](https://spiral.ai/integrations/dots/amtrak-live-train-positions)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/amtrak-live-train-positions)
- [Gemini](https://spiral.ai/integrations/gemini/amtrak-live-train-positions)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/amtrak-live-train-positions)
- [goose](https://spiral.ai/integrations/goose/amtrak-live-train-positions)
- [Grok](https://spiral.ai/integrations/grok/amtrak-live-train-positions)
- [Grok Build](https://spiral.ai/integrations/grok-build/amtrak-live-train-positions)
- [Hermes](https://spiral.ai/integrations/hermes/amtrak-live-train-positions)
- [Instinct](https://spiral.ai/integrations/instinct/amtrak-live-train-positions)
- [Manus](https://spiral.ai/integrations/manus/amtrak-live-train-positions)
- [Muse](https://spiral.ai/integrations/muse/amtrak-live-train-positions)
- [Muse Code](https://spiral.ai/integrations/muse-code/amtrak-live-train-positions)
- [n8n](https://spiral.ai/integrations/n8n/amtrak-live-train-positions)
- [Notion](https://spiral.ai/integrations/notion/amtrak-live-train-positions)
- [OpenClaw](https://spiral.ai/integrations/openclaw/amtrak-live-train-positions)
- [opencode](https://spiral.ai/integrations/opencode/amtrak-live-train-positions)
- [Perplexity](https://spiral.ai/integrations/perplexity/amtrak-live-train-positions)
- [Raycast](https://spiral.ai/integrations/raycast/amtrak-live-train-positions)
- [VS Code](https://spiral.ai/integrations/vscode/amtrak-live-train-positions)
- [Windsurf](https://spiral.ai/integrations/windsurf/amtrak-live-train-positions)
- [Zapier](https://spiral.ai/integrations/zapier/amtrak-live-train-positions)

## More Gemini CLI guides

- [Agoda top destinations](https://spiral.ai/integrations/gemini-cli/agoda-top-destinations)
- [Amtrak route details](https://spiral.ai/integrations/gemini-cli/amtrak-route-details)
- [Agoda place and hotel suggestions](https://spiral.ai/integrations/gemini-cli/agoda-place-and-hotel-suggestions)
- [Amtrak route directory](https://spiral.ai/integrations/gemini-cli/amtrak-route-directory)
- [Agoda hotel search](https://spiral.ai/integrations/gemini-cli/agoda-hotel-search)
- [Amtrak station details](https://spiral.ai/integrations/gemini-cli/amtrak-station-details)

## Questions about Amtrak live train positions in Gemini CLI

**Can Gemini CLI use Amtrak live train positions?**

Yes. Add Spiral to Gemini CLI as an MCP server, and Gemini CLI can find and run Amtrak live train positions like any built-in tool.

**How much does Amtrak live train positions cost in Gemini CLI?**

$0.00873 per call. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Gemini CLI plan is separate.

**Do I need an Alexandria account to use Amtrak live train positions in Gemini CLI?**

No. Spiral runs Amtrak live train positions on its own Alexandria account. You sign in to Spiral once and never paste a key.

**How long does it take to set up Amtrak live train positions in Gemini CLI?**

About two minutes: add the server, then sign in, then check it.

**Does Gemini CLI wait while Amtrak live train positions runs?**

Amtrak live train positions runs in the background. Gemini CLI starts the run, checks on it and gives you the json when it's ready.

**Does the data cover Canadian stops?**

Amtrak says Track Your Train represents its routes, stations, and active trains across the United States and into Canada. That is Amtrak coverage, rather than a directory of every Canadian rail operator.

**Does this include fares or schedules for a future travel date?**

The provider explicitly excludes fares, schedules by date, and booking. A route’s stop list or a currently tracked train’s times cannot establish what is available for a future trip.

**What station information is available?**

The provider documents station addresses, hours, and amenities alongside station discovery. For example, Amtrak lists Chicago Union Station at 255 South Clinton Street.

**What is the difference between route information and train status?**

Route information supplies ordered stops and train numbers for a named service. Train status supplies currently tracked runs with scheduled, estimated, and actual stop times.

**Are reported arrival times actual arrivals?**

The train status data distinguishes scheduled, estimated, and actual times. An estimated arrival is a prediction; use the actual arrival value when describing a stop the train has reached.

