10 releases (stable)
Uses new Rust 2024
new 25.4.2 | Apr 8, 2025 |
---|---|
25.4.1 | Apr 4, 2025 |
25.1.1 | Jan 19, 2025 |
24.12.2 | Dec 26, 2024 |
0.1.0 | Jan 19, 2023 |
#2 in Finance
219 downloads per month
640KB
17K
SLoC
Tackler-NG: Tackler CLI Application
Tackler is fast (1), reliable bookkeeping tool with native GIT SCM support for plain text accounting, written in Rust.
cargo install --locked tackler
tackler new demo
tackler --config demo/conf/tackler.toml
This will produce balance and register reports for the demo journal.
Balance Report
--------------
0.00 17.50 Expenses
0.00 12.00 Expenses:Food
12.00 12.00 Expenses:Food:Fast-Food
0.00 5.50 Expenses:Sweets
2.50 2.50 Expenses:Sweets:Candy
3.00 3.00 Expenses:Sweets:Ice·Cream
=====================
17.50
Register Report
---------------
...
- Tackler can process 120_000 - 250_000 transactions per second on modern laptop. See Tackler Performance for details.
Project Status
Tackler-NG is in feature parity with and beyond of the old Scala code base. It's basis of all Tackler development.
NOTE: Tackler-NG is tested with 417 tracked test vectors
All Tackler CLI functionality is supported, including Tackler Journal Format, transaction storages (FS backend, Gitoxide based Git backend), all reports (Balance, Balance Group, Register) and all exports (Equity, Identity).
Other notable features are:
- Commodities, Currencies and Shares
- Market Value of Commodities and Shares, including different valuation (Mark-to-Market) methods:
- Transaction Filters for powerfull selectors of accounting data
- Real transaction timestamps up to nanosecond resolution and with timezone information
- Accounting based on Geo Location and Transaction GIS Filters
See tackler --help
and Tackler Configuration how to use tackler-ng.
Installation
You can install tackler binary directly by cargo:
# Latest released version
cargo install --locked tackler
# Latest development version
cargo install --locked --git https://github.com/tackler-ng/tackler tackler
Or build it from the source.
Build the Source Code
The main
branch should build and pass
all tests all the time.
You have to clone the tackler source code with git submodules, as test vectors are located in a separate repository.
git clone --recurse-submodules https://github.com/tackler-ng/tackler
Then build the tackler binary - if you have just
installed,
building tackler is just:
cd tackler
just release-build
Or with plain cargo command:
cd tackler
cargo build --release --locked --bin tackler
Tackler binary will be located at target/release/tackler
Examples
Check out Tackler's repository for full list of examples.
These examples need tackler source code and test vectors, so make sure you have cloned it out with submodules. If not, update the test suite submodule:
git submodule init
git submodule update
Simple example
This setup doesn't have any checks enabled and it uses plain filesystem as transaction storage.
Journal
2024-03-20 'Lucky Day!
Assets:Bank:Acme_Inc 420
Income:Lottery
2024-06-20 'Sweet'n Sour Candies
Expenses:Sweets:Candy 2.50
Assets:Cash
2024-09-22 'Hot dogs
Expenses:Food:FastFood 12
Assets:Visa:4012_8888_8888_1881
2024-12-21 'Strawberry ice cream
Expenses:Sweets:Ice·Cream 3
Assets:Cash
Command
target/release/tackler --config examples/simple.toml
Output
Balance Report
--------------
0.00 17.50 Expenses
0.00 12.00 Expenses:Food
12.00 12.00 Expenses:Food:FastFood
0.00 5.50 Expenses:Sweets
2.50 2.50 Expenses:Sweets:Candy
3.00 3.00 Expenses:Sweets:Ice·Cream
=====================
17.50
Let's play for real
Following examples use bare git repository as transaction storage, and also strict and audit mode is activated by configuration.
The triplet of git commit id, Txn Set Checksum and Account Selector Checksum provides auditable (cryptographic) proof of transactions used by reports.
Use Git repository as Transaction storage
Reports with Txn Checksum
target/release/tackler \
--config examples/audit.toml \
Output
Git Storage
commit : 4aa4e9797501c1aefc92f32dff30ab462dae5545
reference : txns-1E1
directory : txns
suffix : .txn
message : txns-1E1: 2016/12
Txn Set Checksum
SHA-256 : 9b29071e1bf228cfbd31ca2b8e7263212e4b86e51cfee1e8002c9b795ab03f76
Set size : 10
**********************************************************************************
Account Selector Checksum
SHA-256 : 19d31a48bf9a8604a1128ccfd281511f961c5469748a97897a21fc0fa2a5f519
Balance Report
--------------
-6.00 a:ay2016:am02
-14.00 a:ay2016:am03
-19.00 a:ay2016:am04
-26.00 a:ay2016:am05
-1.00 a:ay2016:am07
-7.00 a:ay2016:am08
-13.00 a:ay2016:am09
-19.00 a:ay2016:am10
-25.00 a:ay2016:am11
-31.00 a:ay2016:am12
=====================
-161.00
##################################################################################
Report with 100_000 Transactions
There is git ref 'txns-1E5' inside the example audit -repository.
target/release/tackler \
--config examples/audit.toml \
--input.git.ref txns-1E5
Output
Git Storage
commit : cb56fdcdd2b56d41fc08cc5af4a3b410896f03b5
reference : txns-1E5
directory : txns
suffix : .txn
message : txns-1E5: 2016/12
Txn Set Checksum
SHA-256 : 27060dc1ebde35bebd8f7af2fd9815bc9949558d3e3c85919813cd80748c99a7
Set size : 100000
**********************************************************************************
Account Selector Checksum
SHA-256 : 19d31a48bf9a8604a1128ccfd281511f961c5469748a97897a21fc0fa2a5f519
Balance Report
--------------
-135600.00 a:ay2016:am01
-118950.00 a:ay2016:am02
-135631.00 a:ay2016:am03
-127137.00 a:ay2016:am04
-135616.00 a:ay2016:am05
-127154.00 a:ay2016:am06
-135600.00 a:ay2016:am07
-135603.00 a:ay2016:am08
-127140.00 a:ay2016:am09
-135619.00 a:ay2016:am10
-127126.00 a:ay2016:am11
-133433.00 a:ay2016:am12
=========================
-1574609.01
##################################################################################
Transaction Filters
Filter definition
target/release/tackler \
--config examples/audit.toml \
--input.git.ref txns-1E5 \
--api-filter-def '{"txnFilter":{"TxnFilterPostingAccount":{"regex":"a:ay2016:am12"}}}'
The transaction filter definition could be given also as Base64 ascii armored string:
--api-filter-def \
base64:eyJ0eG5GaWx0ZXIiOnsiVHhuRmlsdGVyUG9zdGluZ0FjY291bnQiOnsicmVnZXgiOiJhOmF5MjAxNjphbTEyIn19fQ==
Output
Git Storage
commit : cb56fdcdd2b56d41fc08cc5af4a3b410896f03b5
reference : txns-1E5
directory : txns
suffix : .txn
message : txns-1E5: 2016/12
Txn Set Checksum
SHA-256 : 51faa6d2133d22d3ff8b60aff57722d1869fc4677911b13161dce558e7498073
Set size : 8406
Filter
Posting Account: "a:ay2016:am12"
**********************************************************************************
Account Selector Checksum
SHA-256 : 19d31a48bf9a8604a1128ccfd281511f961c5469748a97897a21fc0fa2a5f519
Balance Report
--------------
-133433.00 a:ay2016:am12
========================
-133433.00
##################################################################################
Further info
- Tackler Journal Format
- Txn Filters with Shell Script
- Tackler-NG repository
- Tackler website
- Plain Text Accounting
Tackler components on Crates.io
- Tackler CLI application: tackler
- Tackler Client API: tackler-api
- Tackler Server API: tackler-core
- Tackler Rusty Services: tackler-rs
Dependencies
~23–35MB
~559K SLoC