# Toward a more intuitive input syntax for plain text accounting

**URL:** <https://forum.plaintextaccounting.org/t/toward-a-more-intuitive-input-syntax-for-plain-text-accounting/197>\
**Category:** General\
**Tags:** beancount\
**Created:** [March 17, 2024, 7:05pm UTC](https://forum.plaintextaccounting.org/t/toward-a-more-intuitive-input-syntax-for-plain-text-accounting/197 "2024-03-17T19:05:29Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![simonmic](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.plaintextaccounting.org/simonmic/32/1_2.png) [@simonmic](https://forum.plaintextaccounting.org/u/simonmic)\
**Post date:** [March 17, 2024, 7:05pm UTC](https://forum.plaintextaccounting.org/t/toward-a-more-intuitive-input-syntax-for-plain-text-accounting/197/1 "2024-03-17T19:05:30Z")

</div>

[https://www.reddit.com/r/plaintextaccounting/comments/1bh3x7o/toward\_a\_more\_intuitive\_input\_syntax\_for\_plain](https://www.reddit.com/r/plaintextaccounting/comments/1bh3x7o/toward_a_more_intuitive_input_syntax_for_plain)

> I propose using _unsigned_ amounts in transactions, along with GnuCash-like keywords to specify the sign (Debit/Credit). For instance, one might enter:
> 
> ```auto
> 2024-03-17 "Buy a book"
> Expenses:Entertainment 8.95 USD expense
> Liabilities:CreditCard 8.95 USD charge
> 
> ```

---

<div class="post-metadata">

**Author:** ![f-a](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.plaintextaccounting.org/f-a/32/32_2.png) [@f-a](https://forum.plaintextaccounting.org/u/f-a)\
**Post date:** [March 17, 2024, 7:23pm UTC](https://forum.plaintextaccounting.org/t/toward-a-more-intuitive-input-syntax-for-plain-text-accounting/197/2 "2024-03-17T19:23:02Z")

</div>

I am not a fan in general, getting accustomed to double-entry bookkeeping is not a nuisance, but a worthy goal.  
But if we want to go towards the “it is intuitive road”, what would be the signs of a paycheque transaction?

```auto
2024-03-17 forthnightly wage
  Revenue:Job —80¤ revenue
  Assets:Bank —80¤ deposit

```

For laymen, revenue with a minus sign before it is not intuitive.

---

<div class="post-metadata">

**Author:** ![simonmic](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.plaintextaccounting.org/simonmic/32/1_2.png) [@simonmic](https://forum.plaintextaccounting.org/u/simonmic)\
**Post date:** [March 17, 2024, 7:31pm UTC](https://forum.plaintextaccounting.org/t/toward-a-more-intuitive-input-syntax-for-plain-text-accounting/197/3 "2024-03-17T19:31:33Z")

</div>

I think the OP is proposing just this:

```auto
2024-03-17 fortnightly wage
  Revenue:Job 80 revenue
  Assets:Bank 80 deposit

```

Ie don’t write signs at all, replace them with keywords.

And then you might say the keyword is redundant or potentially conflicting with the account, so why not omit both sign and keyword and figure out the directionality from the account’s name/type and/or a transaction type.

---

<div class="post-metadata">

**Author:** ![f-a](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.plaintextaccounting.org/f-a/32/32_2.png) [@f-a](https://forum.plaintextaccounting.org/u/f-a)\
**Post date:** [March 17, 2024, 7:37pm UTC](https://forum.plaintextaccounting.org/t/toward-a-more-intuitive-input-syntax-for-plain-text-accounting/197/4 "2024-03-17T19:37:47Z")

</div>

Then not a fan of those specific keywords. 😛 You add a car to your assets, do you “deposit” it?

> so why not omit both sign and keyword and figure out the directionality from the account’s name/type and/or a transaction type.

This makes more sense, but still somewhat tricky to figure out correctly for non-trivial transactions.

---

<div class="post-metadata">

**Author:** ![shlewislee](https://avatars.discourse-cdn.com/v4/letter/s/ed655f/32.png) [@shlewislee](https://forum.plaintextaccounting.org/u/shlewislee)\
**Post date:** [March 18, 2024, 10:48am UTC](https://forum.plaintextaccounting.org/t/toward-a-more-intuitive-input-syntax-for-plain-text-accounting/197/5 "2024-03-18T10:48:16Z")

</div>

OP’s solution, to me, solves nothing.

```auto
2024-01-01 Yet another transaction
Expense 300 debit
Cash 300 credit

```

What about this? I think one of the reasons PTA feels unintuitive(at least for me) is that it adds another unintuitive element(+ for spending? - for earning?) to something that is pretty much unintuitive on its own which is accounting. Assets belong in debit not because it’s _added_ or _going up_ but it is where they belong, same thing with liabilities. Using (+/-) kinda ignores that point but

Using debit/credit just like corporate accountant would do removes extra layer of unintuitiveness.

---

<div class="post-metadata">

**Author:** ![simonmic](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.plaintextaccounting.org/simonmic/32/1_2.png) [@simonmic](https://forum.plaintextaccounting.org/u/simonmic)\
**Post date:** [March 18, 2024, 6:08pm UTC](https://forum.plaintextaccounting.org/t/toward-a-more-intuitive-input-syntax-for-plain-text-accounting/197/6 "2024-03-18T18:08:04Z")

</div>

> [@shlewislee](#):
>
> Using debit/credit just like corporate accountant would do removes extra layer of unintuitiveness.

I think that’s relative… what’s intuitive is not the same for everyone. For me + for going to, - for coming from was intuitive (and with that as foundation my understanding of debit and credit improved).

It would be relatively easy and low impact for PTA tools to support `dr`/`debit` and `cr`/`credit` keywords as synonyms for `+` and `-` in journal entries, like:

```auto
2024-01-01
    expenses:food debit $50
    assets:cash credit $50

2024-01-01
    expenses:food dr $50
    assets:cash cr $50

```

Maybe some people would prefer that notation, though perhaps a minority given PTA’s techie bias. It would certainly help underline that sign and debit/credit are equivalent in PTA.

Using that notation in reports is another step and also possible. Ledger can do it with `--dc` (showing the numbers at least, without the keywords). Here’s what that looks like, for the record:

```auto
~/src/hledger$ ledger -f examples/sample.journal bal --flat -E                                                                                                                                   
                   0 assets:bank:checking                                                                                                                                                       
                  $1 assets:bank:saving                                                                                                                                                         
                 $-2 assets:cash                                                                                                                                                                
                  $1 expenses:food                                                                                                                                                              
                  $1 expenses:supplies                                                                                                                                                          
                 $-1 income:gifts                                                                                                                                                               
                 $-1 income:salary                                                                                                                                                              
                  $1 liabilities:debts                                                                                                                                                          
--------------------                                                                                                                                                                             
                   0                                                                                                                                                                             
~/src/hledger$ ledger -f examples/sample.journal bal --flat -E --dc
            $2 $2 0 assets:bank:checking                                                                                                                               
            $1 0 $1 assets:bank:saving                                                                                                                                 
             0 $2 $-2 assets:cash                                                                                                                                        
            $1 0 $1 expenses:food                                                                                                                                      
            $1 0 $1 expenses:supplies                                                                                                                                  
             0 $1 $-1 income:gifts                                                                                                                                       
             0 $1 $-1 income:salary                                                                                                                                      
            $1 0 $1 liabilities:debts                                                                                                                                  
--------------------------------------------                                                                                                                                                     
            $6 $6 0                                                                                                                                                     

```

(The columns are sum of debits, sum of credits, and their total.)

---

<div class="post-metadata">

**Author:** ![adept](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.plaintextaccounting.org/adept/32/36_2.png) [@adept](https://forum.plaintextaccounting.org/u/adept)\
**Post date:** [March 18, 2024, 9:49pm UTC](https://forum.plaintextaccounting.org/t/toward-a-more-intuitive-input-syntax-for-plain-text-accounting/197/7 "2024-03-18T21:49:17Z")

</div>

I am not a fan of this proposal, mostly because “debit” and “credit” over time accumulated lots of different meanings, and by adopting “debit/credit” we don’t adopt just one preferred meaning, we pull in all of them, implicitly. Also, “debit” and “credit” could be both a noun and a verb, unlike, say “positive/negative” or “add/subtract”.

I agree that in some cases it looks nice : “I debit my debit card to buy some ice cream”.

But tomorrow I am buying a car: “I debit my credit card to buy a car”. Why am I not crediting my credit card instead? 🙂 Because two instances of the word “credit” have different meanings.

I agree with one point: if you started your journey into accounting with “debit/credit”, and they are firmly internalized into your mental model, then “+/-” might be confusing and require extra mental effort. For a while, at least.

However, if one is not a chartered accountant already (one that natively speaks English to boot), then it is possible that “debit/credit” is way more confusing. Now, lets bring in all the possibly synonyms (revenue, deposit, charge, rebate, …) and add i18n into the mix (for extra confusion, in some other languages you can use both debit/credit as loan words as well as native equivalents, and sometimes they are not synonims, but actually mean slightly different things) and everything quicky get messy.

+/- is wonderfully neutral in this regard

---

<div class="post-metadata">

**Author:** ![shlewislee](https://avatars.discourse-cdn.com/v4/letter/s/ed655f/32.png) [@shlewislee](https://forum.plaintextaccounting.org/u/shlewislee)\
**Post date:** [March 18, 2024, 11:15pm UTC](https://forum.plaintextaccounting.org/t/toward-a-more-intuitive-input-syntax-for-plain-text-accounting/197/8 "2024-03-18T23:15:03Z")

</div>

I can now agree with you with most of the things. I use Arch and Vim and all but I also know accounting way more than I know about _computer stuff_ so I’m clearly biased.

> [@adept](#):
>
> But tomorrow I am buying a car: “I debit my credit card to buy a car”. Why am I not crediting my credit card instead? 🙂 Because two instances of the word “credit” have different meanings.

Well, that’s just how accounting is though. But then again, I understand that it can be confusing. I was just trying to make a point that It’d be nicer if it actually has visible resemblance to the real-world case.

---

<div class="post-metadata">

**Author:** ![simonmic](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.plaintextaccounting.org/simonmic/32/1_2.png) [@simonmic](https://forum.plaintextaccounting.org/u/simonmic)\
**Post date:** [March 18, 2024, 11:17pm UTC](https://forum.plaintextaccounting.org/t/toward-a-more-intuitive-input-syntax-for-plain-text-accounting/197/9 "2024-03-18T23:17:07Z")

</div>

I hear that. I think it’s interesting to think about more or differently “intuitive/friendly” presentation and ui options, as is standard in mainstream finance apps, but of course without sacrificing clarity at the base.

And you’re right that “debit” & “credit” are anglocentric, and keywords/uis means i18n issues. “Dr” & “cr” are (a little) better in that regard being short and latin (abbreviations for “debere” and “credere”, it is said, though actually who knows, see [wikipedia](https://en.wikipedia.org/wiki/Debits_and_credits#History)).

---

<div class="post-metadata">

**Author:** ![IssaRice](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.plaintextaccounting.org/issarice/32/56_2.png) [@IssaRice](https://forum.plaintextaccounting.org/u/IssaRice)\
**Post date:** [March 19, 2024, 2:42am UTC](https://forum.plaintextaccounting.org/t/toward-a-more-intuitive-input-syntax-for-plain-text-accounting/197/10 "2024-03-19T02:42:50Z")

</div>

> [@f-a](#):
>
> Then not a fan of those specific keywords. 😛 You add a car to your assets, do you “deposit” it?

The idea is that different keywords can be used depending on the transaction taking place; my implementation has a [table of allowed keywords](https://github.com/riceissa/beanslate/blob/3a3d055aaf1d3cabc229bd4f461ddfa90d94ee7c/beanslate.py#L6-L50). When you get a wage payment, then Assets:Bank might get a “deposit”, but if you add a car to your assets, you might just say “increase” or “opening balance”. GnuCash (where I got inspiration for the idea) does something like this too. For instance, a bank account type has columns Deposit/Withdrawal, whereas a cash account type has columns Receive/Spend, even though both are Assets.

---

<div class="post-metadata">

**Author:** ![zako](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.plaintextaccounting.org/zako/32/21_2.png) [@zako](https://forum.plaintextaccounting.org/u/zako)\
**Post date:** [March 19, 2024, 10:56am UTC](https://forum.plaintextaccounting.org/t/toward-a-more-intuitive-input-syntax-for-plain-text-accounting/197/11 "2024-03-19T10:56:36Z")

</div>

Discussion is really interesting and there is people with more understanding of accounting and PTA… But IMHO there are two different issues to consider: (1) format of plaint text files of PTA and (2) input/output data according to PTA or classical accounting with credit/debit columns.

Although modifying the format of PTA could provide better integration with classical accounting, i think with correct input tools (cli tools, web based…) and output tools (credit/debit columns for balances, registers…) the text format of PTA is not required to be modified. As we do not need to modify the binary format or xml format of other accounting tools such as Gnucash.

---

<div class="post-metadata">

**Author:** ![Ooker](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.plaintextaccounting.org/ooker/32/251_2.png) [@Ooker](https://forum.plaintextaccounting.org/u/Ooker)\
**Post date:** [October 7, 2025, 4:10am UTC](https://forum.plaintextaccounting.org/t/toward-a-more-intuitive-input-syntax-for-plain-text-accounting/197/12 "2025-10-07T04:10:18Z")

</div>

Related discussion: [Examples of negative balances](https://forum.plaintextaccounting.org/t/examples-of-negative-balances/638)
