Command line client for the C4 mukas instance (aka Mate-Pad)
  • Lua 96.5%
  • zsh 3.5%
Find a file
2026-04-24 08:05:12 +02:00
.gitattributes Specify language of completion script. 2026-02-09 13:17:42 +01:00
_c4mate Added --barcode argument. 2026-04-24 07:12:52 +02:00
c4mate Allow omitting spaces after single letter options. 2026-04-24 08:05:12 +02:00
LICENSE Initial commit 2024-08-22 18:20:02 +02:00
README.md Rephrased --barcode description. 2026-04-24 07:13:17 +02:00

c4mate - command line client for the C4 mukas instance (aka Mate-Pad)

Requirements

  • lua (versions < 5.3 will have problems displaying non-ASCII characters)
  • curl
  • GNU sed
  • date

Usage

If no username is given via the "-u" command line flag, c4mate will use the value of the $USER environment variable as username.

Usage: c4mate [-u <user>] [ <query> | -b <id> | --barcode | -l | +/-<amount> | -g <amount> <user> [<reason>]]
Display current balance:
    c4mate
Find and buy item (interactive):
    c4mate <query>
Buy by item id (non-interactive, special id '0' will re-buy last item in log):
    c4mate -b|--buy <id>
Buy via webcam and barcode (depends on "zbarcam"):
    c4mate --barcode [<command arguments>]
Show log:
    c4mate -l|--log [<size>]
Add or subtract credits:
    c4mate +/-<amount>
Transfer credits:
    c4mate -t|--transfer <amount> <user> [<reason>]

Zsh completion

Link or move _c4mate into any directory in $fpath or extend $fpath accordingly.

Bar code scanning via webcam

When the --barcode switch is used, c4mate invokes zbarcam (part of zbar) to read bar codes via webcam. Arguments after --barcode are passed to zbarcam:

c4mate --barcode /dev/video2

License

CC0