tally
A CLI tool to manage global counters from the command line. Written in Rust with SQLite, it's capable of managing interprocess usage and ideal for iterating and templating.

If you have cargo on your machine you can quickly get started with the following.
# Installation (requires Rust, see alternatives below)
cargo install tally-cli
# Init database
tally
This will install tally in your PATH and after running the tally base command, a SQLite database will be initialized for your counters.
Installation
Shown above, you can easily install tally if you already have Rust and cargo installed on your machine.
cargo install tally-cli
Optionally, you can play around with tally in a container with the following command.
docker run --name tally --rm -it docker.io/uhryniuk/tally
Detailed Usage
This section describes detailed usage for the tally CLI command.
Basic Usage
tally is designed for for managing counters across your terminal environments. After installation, you can initialize the database with.
update counter
You can start interacting with your counter immediately with the following examples.
add counters
Additionally, you can maintain as many counters as you'd like, and view their state with the tally list subcommand.
remove counters
You're able to delete a single counter with the following.
Customize setting
tally offers options that can be updated using the tally set subcommand. The options include
- Count: Set the current value of the provided counter
- Step: The amount to add/sub when the command is used.
- Template: Template to render when the
tally <name>command is used. - Default: Counter to use when the base
tallycommand is called without a name.
These examples demonstrate the extent in which these features could be leveraged.
Updating count and step
Setting default
Using templates
The templates in tally can reference one another, making it easy to start managing complex counting states.
# '{}' is reserved to render the count.
# Use the name in '{}' to reference another counter
warning:
tallywill error if trying to reference a non-existent counter.
Leftovers
Below demonstrates some of the other features pertaining to tally.
raw
Print the counter value even if a template is set.
quiet
Add or subtract from a counter without printing to stdout.
nuke
A SQLite database is maintained at ~/.tally/tally.db, you are able to manually delete it or optionally use the tally nuke subcommand.
)
Acknowledgements
Created by uhryniuk. Licensed under the GPL-3.0 license.