{"id":15678120,"url":"https://github.com/kt3k/moneybit","last_synced_at":"2025-05-07T02:23:57.178Z","repository":{"id":26322610,"uuid":"29770953","full_name":"kt3k/moneybit","owner":"kt3k","description":"A Cli tool for creating the general ledger of a journal https://npm.im/moneybit","archived":false,"fork":false,"pushed_at":"2024-04-23T07:53:35.000Z","size":1650,"stargazers_count":13,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-19T06:47:16.208Z","etag":null,"topics":["accounting","balance-sheet","cli","fintech","general-ledger","javascript","journal"],"latest_commit_sha":null,"homepage":"http://kt3k.github.io/moneybit/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"kennethreitz/pipenv","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kt3k.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-01-24T08:52:12.000Z","updated_at":"2024-12-03T13:42:45.000Z","dependencies_parsed_at":"2022-07-08T01:10:36.207Z","dependency_job_id":"25548b44-8347-4529-a4e6-f6ca5a877afa","html_url":"https://github.com/kt3k/moneybit","commit_stats":{"total_commits":329,"total_committers":7,"mean_commits":47.0,"dds":0.2036474164133738,"last_synced_commit":"bce23653192cbdaad97d41b2cf6838255c99188d"},"previous_names":["kt3k/ledgerman"],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kt3k%2Fmoneybit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kt3k%2Fmoneybit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kt3k%2Fmoneybit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kt3k%2Fmoneybit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kt3k","download_url":"https://codeload.github.com/kt3k/moneybit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252799656,"owners_count":21806032,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["accounting","balance-sheet","cli","fintech","general-ledger","javascript","journal"],"created_at":"2024-10-03T16:17:07.200Z","updated_at":"2025-05-07T02:23:57.131Z","avatar_url":"https://github.com/kt3k.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# \u003cimg src=\"http://kt3k.github.io/moneybit/media/wide-logo.svg\"\u003e\n\n\u003e A Cli tool for creating a general ledger from the journal.\n\n[![CircleCI](https://circleci.com/gh/kt3k/moneybit.svg?style=svg)](https://circleci.com/gh/kt3k/moneybit)\n[![codecov](https://codecov.io/gh/kt3k/moneybit/branch/master/graph/badge.svg)](https://codecov.io/gh/kt3k/moneybit)\n\n\n# How to use\n\nFirst, install the cli via npm:\n\n    npm i -g moneybit\n\nThis installs `mb` command.\n\nThen run:\n\n    mb ledger journal.yml --chart chart.yml\n\nThis outputs the general ledger in yaml format to stdout according to the given yaml files `journal.yml` and `chart.yml`. See the below for details.\n\n# Journal YAML\n\nThe journal is the series of trades in chronological order. Each trade should have the following format\n\n```yml\nid: 1001\ndate: 2015-01-05\ndesc: Start the business\ndr:\n  Cash in bank: 1000\ncr:\n  Capital: 1000\n```\n\n- `id` is an arbitrary string and has to be unique in the journal.\n- `date` is the date of the trade.\n- `desc` is the description of the trade.\n- `dr` means the debits of the trade.\n  - `dr` has at least one account. In this case, it has `Cash in bank` account with the amount `1000`.\n  - `dr` can have multiple accounts.\n- `cr` means the credits of the trade.\n  - `cr` has at least one account. In this case, it has `Capital` account with the amount `1000`.\n  - `cr` can have multiple accounts.\n- The total amount of the credits and debits must be the same in a account.\n\nMultiple entry journal looks like the following:\n\n```yml\nid: 1\ndate: 2015-01-05\ndesc: Start the business\ndr:\n  Cash in bank: 1000\ncr:\n  Capital: 1000\n---\nid: 2\ndate: 2015-01-30\ndesc: Sold the item\ndr:\n  Cash in bank: 1000\ncr:\n  Sales: 1000\n---\n...\n```\n\nEach document in a yaml represents a trade.\n\n# Chart YAML\n\nThis file defines which account belongs to which major account type. For example, the account `Sales` belongs `Revenue`, `Cash` belongs to `Asset` etc.\n\nThe format is like the following:\n\n```yml\nasset:\n- Account receivable\n- Cash in deposit\nliability:\n- Account payable\nequity:\n- Capital\nrevenue:\n- Sales\nexpense:\n- Freight\n- Communications\n- Business trip\n- Library cost\n```\n\n# Ledger YAML\n\nThis is the output of this cli and represents the general ledger. The accounts in the input journal are collected by its account type and its major type. It has the following format.\n\n```yml\nasset:\n  Cash in bank:\n    total: 1050\n    accounts:\n      - date: 2015-01-01\n        desc: Start the business\n        dr: 1000\n        cor: Capital\n        ref: 1001\nliability: ...\nequity: ...\nrevenue: ...\nexpense: ...\n```\n\n# CLI\n\n## mb ledger\n\nThe usage of cli is as follows:\n\n    mb ledger path/to/journal.yml [--chart path/to/chart.yml]\n\nThe default for `--chart` is `chart.yml`.\n\n## mb bs\n\n`bs` subcommand outputs the balance sheet as yaml.\n\n```\n$ mb bs path/to/journal [--chart path/to/chart.yml]\nasset:\n  Cash in hand: 37072\n  Accounts receivable: 0\n  Cash in bank: 892000\n  total: 929072\nliability:\n  Accounts payable: 5616\n  total: 5616\nequity:\n  Capital: 2432\n  Retained earnings: 921024\n  total: 923456\ntotal: 929072\n```\n\n## mb monthly\n\n`monthly` subcommand outputs the monthly total of the given type. (This information is required in Japanese official tax document.)\n\n    mb monthly path/to/journal \"Cash in hand\" [--chart path/to/chart.yml]\n\n## mb monthly-ledger\n\n`monthly-ledger` subcommand outputs the monthly ledger of the given type.\n\n    mb monthly-ledger path/to/journal \"Sales\" [--chart path/to/chart.yml]\n\n# History\n\n- 2019-12-14   v0.11.0   Added accountTypeChart.replace method.\n- 2019-03-21   v0.10.0   Added ledger.hasSubledgerOfAccountType method.\n- 2018-07-30   v0.9.1    journal.trades is sorted by date.\n\n# LICENSE\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkt3k%2Fmoneybit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkt3k%2Fmoneybit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkt3k%2Fmoneybit/lists"}