Add the following code to your project's shard.yml under:
to use in production
- OR -
development_dependencies to use in development
This is a work in progress and (currently) primarily built to suit my own needs.
This repo is severely lacking tests at the moment so I may be a bit relucant to accept pull requests depending on complexity as without tests it can be very difficult to avoid regressions.
Regardless of this, if you find this useful and have feature requests / ideas feel free to submit a pull request / issue :~)
asdf install crystal 1.7.2
Or you can checkout this link for platform specific instructions
./bin/tanda_cliassuming you're in the root directory of this repository
This project doesn't currently distribute to any package managers or release any binaries. I recommend aliasing if you intend on using it outside of the repo directory
Upon running any command for the first time, you will be taken through an authentication flow where you will need to enter your username and password.
The retrieved token is stored in
~/.tanda_cli/config.json (format / structure is subject to change at the moment)
# View information about the currently authenticated user (including organisations) tanda_cli me # View or set the current user/organisation tanda_cli current_user tanda_cli current_user --set "Dan's Donuts" # shows "current users" saved in config file # if you want a fresh version use `tanda_cli refetch_users` to refetch from API or `tanda_cli me` to view from API tanda_cli current_user --list # refetch and save users/organisations to config tanda_cli refetch_users # View or set the current time zone tanda_cli time_zone tanda_cli time_zone --set "Australia/Brisbane" # Check time worked today tanda_cli time_worked today tanda_cli time_worked today --display # Check time worked this week tanda_cli time_worked week tanda_cli time_worked week --display # Clock in or clock out (including breaks) tanda_cli clockin start tanda_cli clockin finish tanda_cli clockin break start tanda_cli clockin break finish # Skip clock in validations tanda_cli clockin start --skip-validations # View current clock in status tanda_cli clockin status # Display clock ins for today tanda_cli clockin display # Display leave balance information tanda_cli balance # Set "mode" (production | staging) tanda_cli mode production # default tanda_cli mode staging # Refetch token for the current environment # This will take you through the auth flow allowing a different region to be selected as well tanda_cli refetch_token
# With debug logs enabled crystal run src/tanda_cli.cr -- me # Without debug logs crystal run src/tanda_cli.cr --no-debug -- me