{"id":16087236,"url":"https://github.com/nef10/swiftbeancount","last_synced_at":"2025-04-05T15:12:36.199Z","repository":{"id":44335055,"uuid":"268382378","full_name":"Nef10/SwiftBeanCount","owner":"Nef10","description":"Plain-Text Double-Entry Accounting in Swift","archived":false,"fork":false,"pushed_at":"2023-10-08T05:49:28.000Z","size":47,"stargazers_count":11,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-02-11T11:53:34.318Z","etag":null,"topics":["beancount","ledger","plaintext-accounting","swiftbeancount"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Nef10.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":"2020-05-31T23:32:41.000Z","updated_at":"2024-11-28T08:51:06.000Z","dependencies_parsed_at":"2024-10-31T07:05:01.536Z","dependency_job_id":"9c51c13b-606a-459e-b265-4eba93a50a05","html_url":"https://github.com/Nef10/SwiftBeanCount","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nef10%2FSwiftBeanCount","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nef10%2FSwiftBeanCount/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nef10%2FSwiftBeanCount/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nef10%2FSwiftBeanCount/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nef10","download_url":"https://codeload.github.com/Nef10/SwiftBeanCount/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247353742,"owners_count":20925329,"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":["beancount","ledger","plaintext-accounting","swiftbeancount"],"created_at":"2024-10-09T13:28:53.466Z","updated_at":"2025-04-05T15:12:36.179Z","avatar_url":"https://github.com/Nef10.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# SwiftBeanCount: Plain-Text Double-Entry Accounting in Swift\n\n[![License: MIT](https://img.shields.io/github/license/Nef10/SwiftBeanCount)](https://github.com/Nef10/SwiftBeanCount/blob/master/LICENSE)\n\nThis is the main repository of SwiftBeanCount. It does not contain any code, but only documentation.\n\n## What\n\nSwiftBeanCount is a double-entry accounting software written in Swift. It is inspired by [beancount](https://github.com/beancount/beancount) (hence the name) and therefore reads and writes [plain text accounting](http://plaintextaccounting.org) files.\n\n## Why\n\nBeancount is an amazing project and I am an active user of it. I'd recommend it to everybody who is good in the commandline and wants to take control of their finances. My aim is not to create a competitor. I started this project and continue to work on it in my spare time for different reasons:\n\n  - Learn, practice and keep up to date with Swift\n  - Learn SwiftUI\n  - Do some native MacOS developement (normally I focus on iOS)\n  - Gain experience in GitHub Actions\n  - Practice TDD\n\n## Goal\n\nAs metioned above my goal is not to create a competitor to beancount. Beancount is used by a lot of people and has proven itself over years, while this project is the hobby of a single person.\n\nThe goal is to supplement my usage of beancount and [fava](https://github.com/beancount/fava). As it operates on plain text files, you can use them in beancount and SwiftBeanCount, perfoming operations in which tool better fits your needs, switching as often as you like. Therefore I aim to keep the syntax of SwiftBeanCount mostly a subset of the syntax beancount uses (read more about this below).\n\n## How\n\nThe project is split across several repositories, please consult their readmes to get more instructions:\n\n### Apps\n\nApps with a user interface:\n\n* [SwiftBeanCountImporterApp](https://github.com/Nef10/SwiftBeanCountImporterApp): App to import CSV files and texts from banks websites, as well as download data directly from there, and return the user transactions to add to their ledger\n* [SwiftBeanCountCLI](https://github.com/Nef10/SwiftBeanCountCLI): CLI tool for basic operations on the ledger\n* [SwiftBeanCountApp](https://github.com/Nef10/SwiftBeanCountApp): GUI tool for basic operations on the ledger\n\n### Libraries\n\nThe code is split up in several internal libraries, which allows functionality to be re-used across different apps:\n\n* [SwiftBeanCountModel](https://github.com/Nef10/SwiftBeanCountModel): Model which holds all data as well as the logic\n* [SwiftBeanCountParser](https://github.com/Nef10/SwiftBeanCountParser): Parser which reads the plain text and transforms it into an instance of the model\n* [SwiftBeanCountParserUtils](https://github.com/Nef10/SwiftBeanCountParserUtils): Utility functions for parsing, which are shared by the parser and some importers / mappers\n* [SwiftBeanCountImporter](https://github.com/Nef10/SwiftBeanCountImporter): Library to read CSV files and texts (e.g. from banks) and transform them into transactions\n* [SwiftBeanCountTax](https://github.com/Nef10/SwiftBeanCountTax): Library to help calculate tax related values from your ledger\n* [SwiftBeanCountSheetSync](https://github.com/Nef10/SwiftBeanCountSheetSync): Library to sync transaction between a Google Sheet and a ledger\n* [GoogleAuthentication](https://github.com/Nef10/GoogleAuthentication): Library to help authenticate to Google APIs\n* [WealthsimpleDownloader](https://github.com/Nef10/WealthsimpleDownloader): Library to download data from Wealthsimple\n* [SwiftBeanCountWealthsimpleMapper](https://github.com/Nef10/SwiftBeanCountWealthsimpleMapper): Library to convert downloaded data from Wealthsimple\n* [RogersBankDownloader](https://github.com/Nef10/RogersBankDownloader): Library to download data from Rogers Bank\n* [SwiftBeanCountRogersBankMapper](https://github.com/Nef10/SwiftBeanCountRogersBankMapper): Library to convert downloaded data from Rogers Bank\n* [TangerineDownloader](https://github.com/Nef10/TangerineDownloader): Library to download data from Tangerine\n* [SwiftBeanCountTangerineMapper](https://github.com/Nef10/SwiftBeanCountTangerineMapper): Library to convert downloaded data from Tangerine\n* [CompassCardDownloader](https://github.com/Nef10/CompassCardDownloader): Library to download data from the CompassCard website\n* [SwiftBeanCountCompassCardMapper](https://github.com/Nef10/SwiftBeanCountCompassCardMapper): Library to convert downloaded data from the CompassCard website\n\n### Dependency Diagram\n\nA simplified diagram of the package dependencies:\n\n```mermaid\nflowchart LR\n  subgraph Core\n    SwiftBeanCountModel\n    SwiftBeanCountParser\n    SwiftBeanCountParserUtils\n    SwiftBeanCountModel --\u003e SwiftBeanCountParser\n    SwiftBeanCountParserUtils --\u003e SwiftBeanCountParser\n  end\n  subgraph CompassCard\n    SwiftBeanCountCompassCardMapper\n    CompassCardDownloader\n    SwiftBeanCountCompassCardMapper ~~~ CompassCardDownloader\n  end\n  subgraph Tangerine\n    SwiftBeanCountTangerineMapper\n    TangerineDownloader\n    SwiftBeanCountTangerineMapper ~~~ TangerineDownloader\n  end\n  subgraph Wealthsimple\n    SwiftBeanCountWealthsimpleMapper\n    WealthsimpleDownloader\n    WealthsimpleDownloader --\u003e SwiftBeanCountWealthsimpleMapper\n  end\n  subgraph Rogers\n    SwiftBeanCountRogersBankMapper\n    RogersBankDownloader\n    RogersBankDownloader --\u003e SwiftBeanCountRogersBankMapper\n  end\n  subgraph GoogleSheets\n    SwiftBeanCountSheetSync\n    GoogleAuthentication\n    GoogleAuthentication --\u003e SwiftBeanCountSheetSync\n  end\n  SwiftScraper --\u003e TangerineDownloader\n  SwiftScraper --\u003e CompassCardDownloader\n  CSV --\u003e SwiftBeanCountCompassCardMapper\n  Wealthsimple --\u003e SwiftBeanCountImporter\n  Tangerine ---\u003e SwiftBeanCountImporter\n  CompassCard --\u003e SwiftBeanCountImporter\n  Rogers --\u003e SwiftBeanCountImporter\n  Core --\u003e SwiftBeanCountRogersBankMapper\n  Core --\u003e SwiftBeanCountImporter\n  Core --\u003e SwiftBeanCountWealthsimpleMapper\n  Core --\u003e SwiftBeanCountTangerineMapper\n  Core --\u003e SwiftBeanCountCompassCardMapper\n  Core ---\u003e SwiftBeanCountImporterApp\n  Core --\u003e SwiftBeanCountSheetSync\n  SwiftBeanCountImporter --\u003e SwiftBeanCountImporterApp\n  KeychainAccess ----\u003e SwiftBeanCountImporterApp\n  KeychainAccess ---\u003e GoogleAuthentication\n  OAuthSwift --\u003e GoogleAuthentication\n  SwiftBeanCountSheetSync --\u003e SwiftBeanCountImporter\n  Core ---\u003e SwiftBeanCountTax\n  SwiftBeanCountTax --\u003e SwiftBeanCountCLI\n  Core ----\u003e SwiftBeanCountCLI\n  swift-argument-parser ---\u003e SwiftBeanCountCLI\n  SwiftyTextTable ---\u003e SwiftBeanCountCLI\n  Rainbow ---\u003e SwiftBeanCountCLI\n  CSV --\u003e SwiftBeanCountImporter\n  click SwiftBeanCountModel \"https://github.com/Nef10/SwiftBeanCountModel\"\n  click SwiftBeanCountParser \"https://github.com/Nef10/SwiftBeanCountParser\"\n  click SwiftBeanCountParserUtils \"https://github.com/Nef10/SwiftBeanCountParserUtils\"\n  click SwiftBeanCountTax \"https://github.com/Nef10/SwiftBeanCountTax\"\n  click SwiftBeanCountWealthsimpleMapper \"https://github.com/Nef10/SwiftBeanCountWealthsimpleMapper\"\n  click WealthsimpleDownloader \"https://github.com/Nef10/WealthsimpleDownloader\"\n  click SwiftBeanCountRogersBankMapper \"https://github.com/Nef10/SwiftBeanCountRogersBankMapper\"\n  click RogersBankDownloader \"https://github.com/Nef10/RogersBankDownloader\"\n  click SwiftBeanCountTangerineMapper \"https://github.com/Nef10/SwiftBeanCountTangerineMapper\"\n  click CompassCardDownloader \"https://github.com/Nef10/CompassCardDownloader\"\n  click SwiftBeanCountCompassCardMapper \"https://github.com/Nef10/SwiftBeanCountCompassCardMapper\"\n  click TangerineDownloader \"https://github.com/Nef10/TangerineDownloader\"\n  click SwiftBeanCountImporter \"https://github.com/Nef10/SwiftBeanCountImporter\"\n  click SwiftBeanCountImporterApp \"https://github.com/Nef10/SwiftBeanCountImporterApp\"\n  click SwiftBeanCountSheetSync \"https://github.com/Nef10/SwiftBeanCountSheetSync\"\n  click SwiftBeanCountCLI \"https://github.com/Nef10/SwiftBeanCountCLI\"\n  click GoogleAuthentication \"https://github.com/Nef10/GoogleAuthentication\"\n  click SwiftScraper \"https://github.com/Nef10/SwiftScraper\"\n  click swift-argument-parser \"https://github.com/apple/swift-argument-parser\"\n  click SwiftyTextTable \"https://github.com/scottrhoyt/SwiftyTextTable\"\n  click Rainbow \"https://github.com/onevcat/Rainbow\"\n  click OAuthSwift \"https://github.com/OAuthSwift/OAuthSwift\"\n  click KeychainAccess \"https://github.com/kishikawakatsumi/KeychainAccess\"\n  click CSV \"https://github.com/yaslab/CSV.swift\"\n  classDef default fill:#99CCFF;\n  classDef box fill:#F5F5F5;\n  classDef app fill:#99FF99;\n  classDef external fill:#FF99FF;\n  classDef cli fill:#FFCC99;\n  class Core,Rogers,Wealthsimple,Tangerine,CompassCard,GoogleSheets box;\n  class SwiftBeanCountImporterApp,App app;\n  class CSV,OAuthSwift,KeychainAccess,External,swift-argument-parser,SwiftyTextTable,Rainbow external;\n  class SwiftBeanCountCLI cli;\n```\n```mermaid\nflowchart LR\n  subgraph Legend\n    Library\n    External[External Library]\n    CLI\n    App\n  end\n  classDef default fill:#99CCFF;\n  classDef box fill:#F5F5F5;\n  classDef app fill:#99FF99;\n  classDef external fill:#FF99FF;\n  classDef cli fill:#FFCC99;\n  class App app;\n  class External external;\n  class CLI cli;\n  class Legend box;\n```\n\n##  Status\n\nThis project is in an alpha stage, please do not use unless you are open to experiment or contribute.\n\n## Comparasion to beancount\n\n### Syntax\n\n#### Syntax beancount supports but SwiftBeanCount does not\n\n*If you want to use SwiftBeanCount please make sure your ledger file does not include any of this:*\n\n  - Date with slashes instead of dashes\n  - \"txn\" instead of * as ok flag\n  - Flags on Postings\n  - An optional pipe between payee and narration\n  - Leave out payee / narration field\n  - Amount Interpolation ([Ticket](https://github.com/Nef10/SwiftBeanCountParser/issues/23))\n  - Inline math\n  - Links\n  - Pad ([Ticket](https://github.com/Nef10/SwiftBeanCountParser/issues/30))\n  - Documents ([Ticket](https://github.com/Nef10/SwiftBeanCountModel/issues/49))\n  - Options ([Ticket](https://github.com/Nef10/SwiftBeanCountModel/issues/47))\n  - Notes ([Ticket](https://github.com/Nef10/SwiftBeanCountModel/issues/48))\n  - Includes\n  - Plugins\n  - Tag stacks ([Ticket](https://github.com/Nef10/SwiftBeanCountParser/issues/29))\n  - Balance checks on parent accounts\n  - Accounts with more than one defined commodity\n  - Lines with unrecognizable input (will output warning in SwiftBeanCount)\n\n#### Syntax SwiftBeanCount supports but beancount does not\n\n*If you use this synax please note that your file will probably stop working in beancount. Threrefore I strongly recommend against using any of this:*\n\n  - Full unicode support\n  - Commodities with more than 24 characters\n\n### Other differences\n\n* SwiftBeanCounts parsing is not (yet) optimized and therefore slow\n* SwiftBeanCount count only support percision which without decimal point fits into UInt64 (should not be a problem in the real world)\n\n## Contributing\n\nContributions in form of bug reports or pull requests are very welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnef10%2Fswiftbeancount","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnef10%2Fswiftbeancount","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnef10%2Fswiftbeancount/lists"}