A quick-and-dirty CLI tool for tracking parcels with the La Poste API.
At the time of writing the first version of this tool, I was in some place with a really slow internet access. This means refreshing the tracking information page on laposte.fr was taking minutes. As I wanted to be able to track my parcels with a very low bandwidth impact, I had the idea of using their public tracking API to do this from my terminal.
In my browser, I used to keep some tabs open to track incoming parcels. With
track
, I can now register which parcels to track and get an overview pretty
quickly, even with a high-speed internet access.
With Nix:
nix profile install github:ejpcmac/track
With Cargo:
cargo install --git https://github.com/ejpcmac/track.git
To use track
, you need an account on La Poste
Developer. You can then create a new
application—name it track
for instance—and register to their free tracking
API to get an API key.
Then, configure track
to use your API key:
track init
You can track an individual parcel:
track info <tracking_number>
If you want to track a few parcels regularly, you can add them:
track add [tracking_number] [description]
If you call track add
without parameters, the tracking number and description
will be asked interactively.
To get the status of all tracked parcels:
track all
You can list the tracked parcels:
track list
Or simply remove one from the list:
track remove [tracking_number]
Omitting the tracking number lets you select one from a list.
- There is currently no proper error handling when calling the La Poste API.
- I have tested it only for Colissimo parcels.
Before contributing to this project, please read the CONTRIBUTING.md.
Copyright © 2020, 2022 Jean-Philippe Cugnet
This project is licensed under the GNU General Public License 3.0.