# TokiCLI Toki.app command-line client. Access your Toki data from the local database or from the App.net backup channel. ![TokiCLI](https://files.app.net/21krs3SJm.png) ## Installation gem install TokiCLI ## Usage ### Log The **log** command shows the entire log (history) for one app. You don't have to specify the exact name of the identifier: for example, typing 'iterm' will find 'com.googlecod.iterm2'. `toki log iterm` The results are sorted by ascending date and time. When pulling the data from ADN instead of the local database, the results are sorted by ascending synced message. ### Total The **total** command shows the total usage time for all apps. `toki total` The results are sorted by ascending usage time. ### Top The **top** command shows your top used apps. `toki top` TokiCLI shows the top 5 by default, but you can specify a number with the `-n` option: `toki top -n 10` ### Day The **day** command shows your top used apps on a specific day. The date you type has to be formatted like this: year-month-day `toki day 2014-04-19` ### Range The **range** command shows your top used apps between two specific days. The dates you type have to be formatted like this: year-month-day and separated by a single space. `toki range 2014-04-17 2014-04-19` ### Auth In order to be able to access your ADN channel (optional), TokiCLI has to obtain a "token" (secret code) from App.net. Just do `toki auth` and follow the steps, this is fast and easy. ### Global option: ADN TokiCLI accesses the local Toki database by default. If you want to access the App.net backup channel instead, you have to specify the `-a` option: `toki total -a` `toki log vlc -a` `toki top -n 10 -a` ### Global option: JSON Export the Toki results as a JSON file with the `-j` option: `toki total -j` `toki day 2014-04-18 -j` `toki top -n 10 -j` ### Global option: CSV Export the Toki results as a CSV file with the `-c` option: `toki total -c` `toki day 2014-04-18 -c` `toki top -n 10 -c` ## Toki [Toki](https://itunes.apple.com/fr/app/toki/id861749202?mt=12) is a Mac OS X app written by [Keitaroh Kobayashi](http://app.net/keita). It's a time tracker for your apps that sits in the menu bar. ## Important **TokiCLI does _not_ track your apps.** **Tracking is the job of Toki.app by @keita.** TokiCLI interacts only with the Toki.app database or the App.net backup channel. ## Next Teasing: TokiCLI has only read-only commands... for now. ;) ## Thanks Keita was super nice and said "Awesome!" instead of just "Yes" or "GTFO" when I asked him if I could use the 'Toki' name for this companion Gem. Many thanks and congrats to Keita! :)