Configuration Examples

This document has configuration examples of tackler for real life use.

Example of Production Setup

This setup has two main features:

  • Setup is done so that it is using version control for the setup itself and also for permanent journal data.

  • Tackler is configured so that it is possible switch back and forth between journal on filesystem and journal data stored on version control.

The first version control setup (auxiliary repository) contains all tools, scripts and documentation how to use and interpreter journal, for example description of Chart of Accounts, etc.

The second version control setup (journal) contains all accounting data and all accounting related settings. Accounting data and settings (Chart of Accounts, report configurations) should be kept in same repository, so that both will evolve in sync over time, and it should be possible to re-run reports from past.

Backend, which is used normally for daily operations, can be either filesystem or git based, and it is possible to switch between backends by command line argument.

Directory and Version Control Structure

Tackler setup structure for fs and git based journal support
books/      # This is: git clone /path/to/books.git
├── .git/   # and contains tools and documentation
│   └── ...
├── .gitignore
├── bin/
│   └── report.sh   # This runs tackler from dist
├── dist/
│   └── tackler     # The tackler binary
├── docs/
│   └── readme.txt
└── journal/        # This is: git clone /path/to/journal.git
    ├── .git/       # and it has journal data and its configuration
    │   └── ...
    ├── conf/
    │   ├── tackler.toml
    │   ├── accounts.toml
    │   ├── commodities.toml
    │   └── tags.toml
    └── txns/       # All journal data, shard by year
        ├── 2016/
        │   ├── 2016-01-01-journal.txn
        │   ├── ...
        │   └── 2016-12-01-journal.txn
        ├── 2017/
        │   ├── 2017-01-01-journal.txn
        .   .
        .
        ├── 2024/
        │   ├── ...

Journal repository

The journal repository should be plain checkout of journal data. It could also be a submodule if needed.

If it’s just plain checkout, then it must be ignored in the books -repositorys git config.

Content of books/.gitignore
# git-ignore of the auxiliar books-repository
/dist/
/journal/

Backend configuration: filesystem or Git

With this setup it is possible to use either filesystem or git backend at the same time.

Switching between backends can be done on the fly with CLI option:

  • Filesystem (if default is git): --input.storage=fs

  • Git backend (if default is fs): --input.storage=git

Configuration setup for filesystem and git backends at the same time
### In this example, "journal" repository is clone
### and it's also used as a working copy.
[input]
# Reports are generated from journal committed to git.
# This can be overriden by --input.storage "fs"
storage = "git"

[fs]
# Path to the toplevel journal directory
path = "../"
# Currently we are working on 2024 accounting,
# and we this branch checked out on working copy
dir = "txns/2024"
ext = "txn"

[git]
# Path to journal/.git -directory
repo = "../.git"
# 'main' branch has all years as above
# '2024' is a branch which holds transactions related to year 2024
ref = "2024"
dir = "txns/2024"
suffix = "txn"

...
### As this tackler.toml is also part of the journal repository
### we could use here year spesific settings for accounts, tags, etc.
...

[transaction]
accounts    = { path = "accounts.toml" }
commodities = { path = "commodities.toml" }
tags        = { path = "tags.toml" }