Linux mobile app for tracking and managing parcels.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Albert Koczy 143a386cc7 fix: windows compatibility 6 months ago
.github/workflows Remove non-functional android builds 2 years ago
.idea Add the track subcommand 2 years ago
build Add the track subcommand 2 years ago
docs Add a nice readme 2 years ago
swagger fix: remove oauth2 dependency 1 year ago
trackingapi fix typo in error message 1 year ago
.gitignore Add the track subcommand 2 years ago
LICENSE.md Add a nice readme 2 years ago
README.md docs: Change "go get" to "go install" 8 months ago
config.go fix: windows compatibility 6 months ago
go.mod fix: remove oauth2 dependency 1 year ago
go.sum fix: remove oauth2 dependency 1 year ago
inpost.swagger.yml Initial commit 2 years ago
inpost_cli.go Add the track subcommand 2 years ago
list_parcels_cmd.go Add times to statuses in list command 2 years ago
login_cmd.go fix: windows compatibility 6 months ago
open_compartment_cmd.go Initial commit 2 years ago
parcel_info_cmd.go Add the track subcommand 2 years ago
refresh_token_cmd.go Initial commit 2 years ago
terminate_open_compartment.go Initial commit 2 years ago
token_info_cmd.go Initial commit 2 years ago
track_cmd.go Add the track subcommand 2 years ago
util.go Add times to statuses in list command 2 years ago
version.go Update builder 2 years ago

README.md

inpost-cli

inpost-cli is a tool to interact with the Polish InPost storage lockers (Paczkomaty). It has the same features as the InPost mobile app.

With inpost-cli you can:

  • View packages connected to your phone number
  • Generate QR codes for opening the lockers
  • Open the lockers remotely from anywhere in the world (unlike the mobile app which requires you to be physically close to the locker)

Additionally:

  • Using this tool does not disable SMS notifications (unlike the app)
  • Your privacy is respected, no unecessary tracking features are included.

This project was developed solely by me and is not affiliated with InPost in any way. This tool uses the same API as the Android InPost app. This program was created to enable the usage of InPost services from GNU/Linux.

Download

Prebuilt binaries are available for download at the releases page. Linux (arm, arm64, and x64), macOS and windows are supported.

Manual installation

If you have Go (at least version 1.12) installed on your system, you can compile and install inpost-cli this way:

$ go install github.com/alufers/inpost-cli@latest

This will download, compile the program and put it to $GOPATH/bin (~/go/bin by default). You can add this folder to $PATH to use this program as a command.

You can also clone the repository and run in the cloned repository:

$ go build .

This will output a binary named inpost-cli in the directory.

This program uses go modules, which were added in Go 1.12 and that makes 1.12 the minimal required Go version, although I recommend using the latest stable release - 1.15.6 at the time of writing (December 2020).

If for whatever reason you cannot install a new version of Go there binaries available for various operating systems and architectures at the releases page.

Usage

First of all you will need to log in using yout phone number. Issue this command:

$ inpost-cli login

You will be asked for your phone number and then you will recieve a SMS message containng a code which you have to enter. Now you can use all the features of the tool.

Viewing package data

For example you can list all your packages:

$ inpost-cli ls
+--------------------------+-------------------------+-----------+-----------------------------+--------+-----------+------------+
|     SHIPMENT NUMBER      |         SENDER          |  STATUS   |        PICKUP POINT         |  CITY  | OPEN CODE | STORED FOR |
+--------------------------+-------------------------+-----------+-----------------------------+--------+-----------+------------+
| 642600027844200234823732 | ACME INC                | delivered | RYB01N Raciborska 121       | Rybnik |           |            |
| 622400717844200217633243 | Jan Paweł II Sp. J.     | delivered | RYB847 Kotucza/Budowlanych  | Rybnik |           |            |
| 618400489044200213661457 | example@example.com     | delivered | RYB01N Raciborska 121       | Rybnik | 852830    |            |
| 626600367044200218874897 | Drzwi                   | delivered | RYB05M Wawelska 2           | Rybnik | 538810    |            |
| 605077267044200211409628 | Aperture Science        | delivered | RYB05M Wawelska 2           | Rybnik | 515700    |            |
| 653238947044200210962767 | Black mesa              | delivered | RYB01N Raciborska 121       | Rybnik | 935718    |            |
| 643300547044200218603085 | kontakt@2137.pl         | delivered | RYB07A Sławików 2A          | Rybnik | 683130    |            |
+--------------------------+-------------------------+-----------+-----------------------------+--------+-----------+------------+

You can filter the packages by status...

$ inpost-cli ls -s ready_to_pickup

...or output the data in JSON.

$ inpost-cli ls -s out_for_delivery -f json

Retrieving your parcels

When the package is ready to pick up you may either generate a QR code in the terminal to open the locker:

$ inpost-cli qr <shipment-number>

A screenshot showing the terminal outpout of the previous command, including a QR code

TIP: You don't have to enter the whole shipment number, just the few first digits to differentiatie between your parcels.

Alternatively you can use the remote-open feature.

$ inpost-cli open <shipment-number>
Warning: You are about to remotely open a compartment in the pick-up machine (Paczkomat)
Warning: Please double check that you are nearby the correct machine. Somebody can steal your package if you make a mistake!
Press 'y' and enter to open compartment at Raciborska 121, Rybnik (Stacja paliw BP) for shipment number 618400489044200213661457 from example@example.com: \n (n):

inpost-cli does not check whether you are close to the locker, so you can remotely open the compartment for somebody else.

Tracking (package history)

To display the history of the package use:

$ inpost-cli track <shipment-number>
2020-12-03 19:04:21 +0100 CET delivered (DOR)
2020-12-02 19:46:27 +0100 CET ready_to_pickup (UWP)
2020-12-02 09:47:43 +0100 CET out_for_delivery (PDD_2)
2020-12-01 03:33:43 +0100 CET adopted_at_source_branch (PWO)
2020-11-30 15:29:00 +0100 CET collected_from_sender (PKL)
2020-11-28 13:41:08 +0100 CET confirmed (PPN)

This command also works for packages not sent using our phone number. It accepts the --json flag.

Help

For help use:

$ inpost-cli help

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Disclaimer

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

License

MIT