5 releases (2 stable)
24.11.2 | Nov 24, 2024 |
---|---|
24.11.1 | Nov 17, 2024 |
0.3.0 | Nov 1, 2024 |
0.2.0 | Apr 8, 2023 |
0.1.0 | Jan 19, 2023 |
#3 in Finance
259 downloads per month
755KB
17K
SLoC
Tackler-NG: Tackler CLI Application
Tackler is fast, reliable bookkeeping engine with native GIT SCM support for plain text accounting written in rust. Tackler-NG is rusty version of Tackler.
Project Status
The rusty Tackler-NG is in feature parity with old scala based Tackler CLI, and this will be the basis of all future Tackler development.
Basic functionality is fully 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 supported features are:
- Commodities and Shares
- All Transaction Filters
- Accounting based on Geo Location and Transaction GIS Filters
See tackler --help
and Tackler Configuration how to use tackler-ng.
NOTE: Tackler-NG is tested with the most essential tackler tests vectors at the moment.
Build and install tackler
# Get the source code
git clone --recurse-submodules https://github.com/e257-fi/tackler-ng
cd tackler-ng
# The main branch should build and pass all tests.
# To build a release, check relased versions:
git tag -l
# Get the release, e.g. v24.11.2
git checkout v24.11.2
# Build tackler
cargo build --release --locked --bin tackler
# the binary is located at 'target/release/tackler'
Simple example
This setup doesn't have any checks enabled and it uses plain filesystem as transaction storage.
Command
target/release/tackler --config examples/simple.toml
Output
**********************************************************************************
Balance Report
--------------
0.00 12.00 Expenses:Food
12.00 12.00 Expenses:Food:Groceries
0.00 3.32 Expenses:Sweets
2.12 2.12 Expenses:Sweets:Ice·cream
1.20 1.20 Expenses:Sweets:Salmiakki
=====================
15.32
##################################################################################
**********************************************************************************
...
...
...
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
--------------
0.00 -161.0000 a:ay2016
-6.0000 -6.0000 a:ay2016:am02
-14.0000 -14.0000 a:ay2016:am03
-19.0000 -19.0000 a:ay2016:am04
-26.0000 -26.0000 a:ay2016:am05
-1.0000 -1.0000 a:ay2016:am07
-7.0000 -7.0000 a:ay2016:am08
-13.0000 -13.0000 a:ay2016:am09
-19.0000 -19.0000 a:ay2016:am10
-25.0000 -25.0000 a:ay2016:am11
-31.0000 -31.0000 a:ay2016:am12
=====================
-161.0000
##################################################################################
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
--------------
0.00 -1574609.0100 a:ay2016
-135600.0008 -135600.0008 a:ay2016:am01
-118950.0008 -118950.0008 a:ay2016:am02
-135631.0008 -135631.0008 a:ay2016:am03
-127137.0008 -127137.0008 a:ay2016:am04
-135616.0008 -135616.0008 a:ay2016:am05
-127154.0008 -127154.0008 a:ay2016:am06
-135600.0008 -135600.0008 a:ay2016:am07
-135603.0008 -135603.0008 a:ay2016:am08
-127140.0008 -127140.0008 a:ay2016:am09
-135619.0008 -135619.0008 a:ay2016:am10
-127126.0008 -127126.0008 a:ay2016:am11
-133433.0008 -133433.0008 a:ay2016:am12
=========================
-1574609.0100
##################################################################################
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:eyJ0eG5GaWx0ZXIiOnsiVHhuRmlsdGVyUG9zdGluZ0FjY291bnQiOnsicmVnZXgiOiJeYTpheTIwMTY6YW0xMiJ9fX0=
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
--------------
0.00 -133433.0008 a:ay2016
-133433.0008 -133433.0008 a:ay2016:am12
========================
-133433.0008
##################################################################################
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
~22–34MB
~547K SLoC