Skip to content

About

πŸš† Indian Railways CLI β€” PNR Status, Live Train Status, Passenger Names & Seat Availability from your terminal. Zero dependencies. Works on Linux, macOS & Termux.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš† TrainTrack β€” Indian Railways CLI

TrainTrack

PNR Status Β· Live Train Status Β· Passenger Names Β· Seat Availability β€” all from your terminal, with a single command.

Python Platform License Zero Dependencies

Tired of opening the IRCTC website or a mobile app just to check your PNR or train status? TrainTrack gives you all the train information you need right from your terminal β€” no app required.


✨ Features

Feature Description
🎫 PNR Status Train, class, berth, fare, chart status β€” everything
πŸ‘€ Passenger Names Real name (masked before chart, full after)
πŸš„ Live Train Status Current location + per-station delays
πŸ”€ Trains Between Stations All trains between any two stations
πŸ’Ί Seat Availability Availability by date and quota
πŸ“ Station Code Helper Quick reference for common station codes

πŸš€ Install (one command)

Works on Linux / macOS / Termux / WSL β€” all the same

curl -fsSL https://raw.githubusercontent.com/Saurabh-gzp/TrainTrack/main/install.sh | bash

⚠️ After installing, fully restart Termux (close the app completely and reopen it) so the custom launch command gets picked up.

Or manually:

git clone https://github.com/Saurabh-gzp/TrainTrack.git
cd TrainTrack
python3 traintrack.py

Requirements: Only Python 3.6+. No pip install. No dependencies.


πŸ“– Usage

python3 traintrack.py

Or, if you set a custom command during install (e.g. train):

train

Menu

  1. PNR Status (+ Names)     ← everything in one place (recommended)
  2. Live Train Status
  3. Trains Between Stations
  4. Seat Availability
  5. PNR Names (IRCTC - masked)
  6. Station Code Helper
  7. Change Launch Command    ← set your own command name
  0. Exit

Set / change your launch command

Run option 7 from the menu and enter any name (e.g. train). After that, just typing train launches TrainTrack from anywhere.

Example β€” PNR Status

Option: 1
10-digit PNR number: 2954982721

  PNR Number        : 2954982721
  Train             : 15708 - ASR KIR EXPRESS
  Class             : 2A
  Booking Fare      : Rs.2015

  PASSENGER NAMES:
    #1: CHAxxxx xxxxx (age 33, Male) | CNF/A1/24/SU

Example β€” Live Status

Option: 2
Train number: 15708
Journey date (YYYYMMDD): 20260814

  Train    : ASR KIR EXPRESS
  Status   : Departed Sabzi Mandi
  Location : lat=29.06, lon=77.01

πŸ“Š Data Sources

Data Source
PNR + Live Status api.trackmytrain.co.in
Passenger Names www.rr.irctctourism.com
Seat/Berth www.ixigo.com
Trains Between erail.in

❓ FAQ

Q: Why does the passenger name show as "CHAxxxx xxxxx"? A: Indian Railways masks the name before chart preparation (privacy rule). Once the chart is prepared (~4 hours before departure), the full name is shown. This is the same across all apps.

Q: Does it work on Termux? A: Yes, 100%. Just run pkg install python, then run the install command.

Q: Do I need an API key? A: No. Everything is ready out of the box.

Q: What happens with an invalid PNR? A: You'll see an "Invalid PNR" error. The PNR must be 10 digits.


πŸ›‘οΈ Security / Privacy

  • The tool only fetches public enquiry data
  • It does not send any login or password
  • It does not store any data (fully stateless)

🀝 Contributing

PRs welcome! Open an issue if you'd like a new feature.

πŸ“œ License

MIT β€” free for everyone.


⭐ If you like this repo, please give it a star! Stars help more people discover it.

About

πŸš† Indian Railways CLI β€” PNR Status, Live Train Status, Passenger Names & Seat Availability from your terminal. Zero dependencies. Works on Linux, macOS & Termux.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages