https://github.com/untoldwind/acari
Command-line client for mite time-tracking
https://github.com/untoldwind/acari
mite mite-api time-tracking
Last synced: 7 months ago
JSON representation
Command-line client for mite time-tracking
- Host: GitHub
- URL: https://github.com/untoldwind/acari
- Owner: untoldwind
- License: mit
- Created: 2020-02-01T13:36:54.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-09-24T08:19:33.000Z (8 months ago)
- Last Synced: 2025-09-24T10:28:34.412Z (8 months ago)
- Topics: mite, mite-api, time-tracking
- Language: Rust
- Homepage:
- Size: 235 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# Command-line client for mite time-tracking
## Requirements
Rust >=1.41.0 (unless you use the pre-compiled binaries)
## Installation
Simple way
```
cargo install acari-cli
```
Alternative: Checkout the project and do
```
cargo install --path cli --force --locked
```
Or you can download the pre-compiled statically linked binaries from the releases page.
## Shell completions
### Fish
Copy or symlink `cli/shell_completions/acari.fish` to `~/.config/fish/completions`.
### Zsh
Copy `cli/shell_completions/zsh/_acari` to somewhere in your `$fpath` (usually something like `/usr/local/share/zsh/site-functions` or `/usr/share/zsh/site-functions`).
Note: This is barely tested right now and should probably be done differently.
### Bash
Right now there are three options:
* Migrate to the slightly more colorful side of `zsh`
* Migrate to the much more colorful side of `fish`
* Contribute your own completions. I will gladly accept pull requests.
## Basic usage
### Initialization
You need to get an API token from mite. This can be found on your account page. Then you just have to do
```
acari init
```
which will ask for your mite domain and token.
Alternatively you simply create a `~/.config/acari/config.toml`
```
domain = '.mite.yo.lk'
token = ''
cache_ttl_minutes = 1440
```
After this you may check your connection with
```
acari check
```
with will print your account and user information.
### Query customers/projects/services
List customers
```
acari customers
```
List projects
```
acari projects
```
or if you are interested in the projects of a specific customer
```
acari projects ""
```
List services
```
acari services
```
All of these information will be cached. You can modify the cache duration in your `~/.config/acari/config.toml` (default: 1 day).
If you think that something is missing you can try running the above commands with the `--no-cache` option, or run
```
acari clear-cache
```
or simple erase the `~/.cache/acari` directory.
### Query time entries
```
acari entries
```
Whereas `timespan` can be
* `today` or `now`: Just today
* `yesterday`: Just yesterday
* `this-week` or `week`: All entries of this week
* `last-week`: all entries of last week
* `this-month` or `month`: all entries of this month
* `last-month`: all entries of last month
* `YYYY-MM-DD`: entries of a specific day
* `YYYY-MM-DD/YYYY-MM-DD`: all entries from a specific day up to another day
### Tracking time
Start time-tracking
```
acari start
```
optionally you can also add a starting offset
```
acari start
```
whereas minutes are either actual minutes or in the form of `hh:mm`.
Stop time-tracking
```
acari stop
```
Show current time tracking
```
acari tracking
```
(Note: This might change, have not found a good naming yet)
### Modify time entries
Chance an entry for today
```
acari set
```
whereas minutes are either actual minutes or in the form of `hh:mm`.
Chany an entry for a specific day
```
acari set
```
Whereas `date` can be
* `today` or `now`: Change today
* `yesterday`: Change yesterday
* `YYYY-MM-DD`: Change a specific day
**Note**: If the specified day contains multiple entries for the same cuatomer, project and service these will be squisched down to a single entry. The idea of the set command is to just set the time spend on a task for the day entirely.
Alternatively, if you simply want to add an entry without regarding any existing entries for that project/service, you can just use:
```
acari add
```
### Modify the output
The output of all commandy can be modified via the `--output` or `-o` option. E.g.
```
acari --output=json customers
```
Supported output formats are:
* `pretty`: Show pretty tables (this is the default)
* `json`: Dump all available information as json
* `flat`: Very condensed form of `pretty` that may be helpful processing information in shell-scripts or `awk`
### Profiles
In case you have to track your time in multiple mite accounts, it is possible to create a profile for each additional account by using the `--profile` or `-p` option. E.g.
```
acari --profile= init
acari --profile= customers
```
... this is a pretty exotic use-case, unluckily one of mine, so ...